JAPAn
Just Another Parity Analyzer
|
EPICS slow controls data management. More...
#include <QwEPICSEvent.h>
Data Structures | |
struct | EPICSCumulativeRecord |
struct | EPICSVariableRecord |
Public Types | |
enum | EQwEPICSDataType { kEPICSString , kEPICSFloat , kEPICSInt } |
EPICS data types. More... | |
Public Member Functions | |
QwEPICSEvent () | |
Default constructor. | |
virtual | ~QwEPICSEvent () |
Virtual destructor. | |
void | ProcessOptions (QwOptions &options) |
Process the configuration options. | |
Int_t | AddEPICSTag (const string &tag, const string &table="", EQwEPICSDataType datatype=kEPICSFloat) |
Int_t | LoadChannelMap (TString mapfile) |
std::vector< Double_t > | ReportAutogains (std::vector< std::string > tag_list=fDefaultAutogainList) |
void | ExtractEPICSValues (const string &data, int event) |
Int_t | FindIndex (const string &tag) const |
Find the index of an EPICS variable, or return error. | |
Double_t | GetDataValue (const string &tag) const |
TString | GetDataString (const string &tag) const |
int | SetDataValue (const string &tag, const double value, const int event) |
int | SetDataValue (const string &tag, const string &value, const int event) |
int | SetDataValue (int index, const double value, const int event) |
int | SetDataValue (int index, const string &value, const int event) |
Bool_t | HasDataLoaded () const |
Int_t | DetermineIHWPPolarity () const |
EQwWienMode | DetermineWienMode () const |
void | CalculateRunningValues () |
void | PrintAverages () const |
void | PrintVariableList () const |
void | ReportEPICSData () const |
void | ResetCounters () |
void | FillDB (QwParityDB *db) |
void | FillSlowControlsData (QwParityDB *db) |
void | FillSlowControlsStrings (QwParityDB *db) |
void | FillSlowControlsSettings (QwParityDB *db) |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) |
Construct the branch and tree vector. | |
void | FillTreeVector (QwRootTreeBranchVector &values) const |
Fill the tree vector. | |
void | WriteEPICSStringValues () |
Static Public Member Functions | |
static void | DefineOptions (QwOptions &options) |
Define the configuration options. | |
static std::vector< std::string > | GetDefaultAutogainList () |
static void | SetDefaultAutogainList (std::vector< std::string > &input_list) |
Private Member Functions | |
void | SetDataLoaded (Bool_t flag) |
Bool_t | IsNumber (const string &word) |
TList * | GetEPICSStringValues () |
Static Private Member Functions | |
static void | InitDefaultAutogainList () |
Initialize the default autogain list. | |
Private Attributes | |
size_t | fTreeArrayIndex |
size_t | fTreeArrayNumEntries |
Bool_t | fIsDataLoaded |
bool | fDisableDatabase |
std::vector< EPICSVariableRecord > | fEPICSDataEvent |
std::vector< EPICSCumulativeRecord > | fEPICSCumulativeData |
Int_t | fNumberEPICSEvents |
Int_t | fNumberEPICSVariables |
std::vector< std::string > | fEPICSVariableList |
std::vector< std::string > | fEPICSTableList |
std::vector< EQwEPICSDataType > | fEPICSVariableType |
std::map< std::string, Int_t > | fEPICSVariableMap |
Bool_t | fBlinderReversalForRunTwo |
Bool_t | fPrecessionReversal |
Double_t | fNominalWienAngle |
Int_t | fExtraHelicityReversal |
Static Private Attributes | |
static std::vector< std::string > | fDefaultAutogainList |
Default autogain list. | |
static const int | kDebug = 0 |
static const int | kEPICS_Error = -1 |
static const int | kEPICS_OK = 1 |
static const Double_t | kInvalidEPICSData = -999999.0 |
EPICS slow controls data management.
Handles EPICS slow controls data including beam parameters, magnet settings, and other experimental conditions. Provides storage, retrieval, and database interface for slow controls information.
Definition at line 41 of file QwEPICSEvent.h.
EPICS data types.
Enumerator | |
---|---|
kEPICSString | |
kEPICSFloat | |
kEPICSInt |
Definition at line 46 of file QwEPICSEvent.h.
QwEPICSEvent::QwEPICSEvent | ( | ) |
Default constructor.
Definition at line 57 of file QwEPICSEvent.cc.
References fBlinderReversalForRunTwo, fNominalWienAngle, fNumberEPICSVariables, fPrecessionReversal, InitDefaultAutogainList(), kDebug, PrintVariableList(), and SetDataLoaded().
|
virtual |
Int_t QwEPICSEvent::AddEPICSTag | ( | const string & | tag, |
const string & | table = "", | ||
EQwEPICSDataType | datatype = kEPICSFloat ) |
Definition at line 296 of file QwEPICSEvent.cc.
References fEPICSTableList, fEPICSVariableList, fEPICSVariableMap, fEPICSVariableType, and fNumberEPICSVariables.
Referenced by LoadChannelMap().
void QwEPICSEvent::CalculateRunningValues | ( | ) |
Definition at line 310 of file QwEPICSEvent.cc.
References fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fNumberEPICSEvents, fNumberEPICSVariables, kDebug, kEPICSFloat, and kEPICSInt.
Referenced by main().
void QwEPICSEvent::ConstructBranchAndVector | ( | TTree * | tree, |
TString & | prefix, | ||
QwRootTreeBranchVector & | values ) |
Construct the branch and tree vector.
Definition at line 176 of file QwEPICSEvent.cc.
References QwLog::endl(), fEPICSVariableList, fEPICSVariableType, fTreeArrayIndex, fTreeArrayNumEntries, kEPICSFloat, kEPICSInt, kEPICSString, QwRootTreeBranchVector::LeafList(), QwRootTreeBranchVector::push_back(), QwError, and QwRootTreeBranchVector::size().
|
static |
Define the configuration options.
Defines configuration options using QwOptions functionality.
options | Options object |
Definition at line 81 of file QwEPICSEvent.cc.
References QwOptions::AddOptions().
Referenced by QwOptions::DefineOptions().
Int_t QwEPICSEvent::DetermineIHWPPolarity | ( | ) | const |
Definition at line 1381 of file QwEPICSEvent.cc.
References QwLog::endl(), fExtraHelicityReversal, GetDataString(), QwDebug, and QwWarning.
Referenced by QwBlinder::Update().
EQwWienMode QwEPICSEvent::DetermineWienMode | ( | ) | const |
Definition at line 1415 of file QwEPICSEvent.cc.
References fNominalWienAngle, GetDataValue(), kWienBackward, kWienForward, kWienHorizTrans, kWienIndeterminate, and kWienVertTrans.
Referenced by ExtractEPICSValues(), and QwBlinder::Update().
void QwEPICSEvent::ExtractEPICSValues | ( | const string & | data, |
int | event ) |
Definition at line 389 of file QwEPICSEvent.cc.
References DetermineWienMode(), fEPICSDataEvent, fEPICSVariableList, FindIndex(), fIsDataLoaded, QwParameterFile::HasVariablePair(), kDebug, kEPICS_Error, QwParameterFile::ReadNextLine(), SetDataLoaded(), SetDataValue(), QwParameterFile::TrimWhitespace(), and WienModeName().
Referenced by QwEventBuffer::FillEPICSData().
void QwEPICSEvent::FillDB | ( | QwParityDB * | db | ) |
void QwEPICSEvent::FillSlowControlsData | ( | QwParityDB * | db | ) |
void QwEPICSEvent::FillSlowControlsSettings | ( | QwParityDB * | db | ) |
void QwEPICSEvent::FillSlowControlsStrings | ( | QwParityDB * | db | ) |
void QwEPICSEvent::FillTreeVector | ( | QwRootTreeBranchVector & | values | ) | const |
Fill the tree vector.
Definition at line 207 of file QwEPICSEvent.cc.
References QwLog::endl(), fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fTreeArrayIndex, kEPICSFloat, kEPICSInt, kEPICSString, QwError, and QwRootTreeBranchVector::SetValue().
Int_t QwEPICSEvent::FindIndex | ( | const string & | tag | ) | const |
Find the index of an EPICS variable, or return error.
Definition at line 422 of file QwEPICSEvent.cc.
References fEPICSVariableMap, and kEPICS_Error.
Referenced by ExtractEPICSValues(), GetDataString(), GetDataValue(), SetDataValue(), and SetDataValue().
TString QwEPICSEvent::GetDataString | ( | const string & | tag | ) | const |
Definition at line 449 of file QwEPICSEvent.cc.
References fEPICSDataEvent, fEPICSVariableType, FindIndex(), kEPICS_Error, and kEPICSString.
Referenced by DetermineIHWPPolarity().
Double_t QwEPICSEvent::GetDataValue | ( | const string & | tag | ) | const |
Definition at line 437 of file QwEPICSEvent.cc.
References fEPICSDataEvent, FindIndex(), kEPICS_Error, and kInvalidEPICSData.
Referenced by DetermineWienMode(), ReportAutogains(), and QwBlinder::Update().
|
inlinestatic |
Definition at line 130 of file QwEPICSEvent.h.
References fDefaultAutogainList.
|
private |
Definition at line 1280 of file QwEPICSEvent.cc.
References fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, and kEPICSString.
|
inline |
Definition at line 83 of file QwEPICSEvent.h.
References fIsDataLoaded.
Referenced by main().
|
staticprivate |
Initialize the default autogain list.
Definition at line 461 of file QwEPICSEvent.cc.
References fDefaultAutogainList.
Referenced by QwEPICSEvent().
|
inlineprivate |
Definition at line 155 of file QwEPICSEvent.h.
Referenced by SetDataValue().
Int_t QwEPICSEvent::LoadChannelMap | ( | TString | mapfile | ) |
Definition at line 105 of file QwEPICSEvent.cc.
References AddEPICSTag(), QwParameterFile::Close(), QwLog::endl(), fBlinderReversalForRunTwo, fEPICSVariableList, fEPICSVariableType, fExtraHelicityReversal, fNominalWienAngle, fNumberEPICSVariables, fPrecessionReversal, QwParameterFile::GetTypedNextToken(), QwParameterFile::HasVariablePair(), kDebug, kEPICSFloat, kEPICSInt, kEPICSString, QwParameterFile::LineIsEmpty(), QwDebug, QwError, QwParameterFile::ReadNextLine(), ResetCounters(), QwParameterFile::TrimComment(), and QwParameterFile::TrimWhitespace().
Referenced by main().
void QwEPICSEvent::PrintAverages | ( | ) | const |
Definition at line 571 of file QwEPICSEvent.cc.
References fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fNumberEPICSEvents, kEPICSFloat, kEPICSInt, and kEPICSString.
void QwEPICSEvent::PrintVariableList | ( | ) | const |
Definition at line 646 of file QwEPICSEvent.cc.
References QwLog::endl(), fEPICSVariableList, and QwMessage.
Referenced by QwEPICSEvent().
void QwEPICSEvent::ProcessOptions | ( | QwOptions & | options | ) |
Process the configuration options.
Parse the configuration options and store in class fields
options | Options object |
Definition at line 97 of file QwEPICSEvent.cc.
References fDisableDatabase, and QwOptions::GetValue().
Referenced by main().
std::vector< Double_t > QwEPICSEvent::ReportAutogains | ( | std::vector< std::string > | tag_list = fDefaultAutogainList | ) |
Definition at line 656 of file QwEPICSEvent.cc.
References GetDataValue().
void QwEPICSEvent::ReportEPICSData | ( | ) | const |
Definition at line 676 of file QwEPICSEvent.cc.
References fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fNumberEPICSEvents, kEPICSFloat, kEPICSInt, and kEPICSString.
void QwEPICSEvent::ResetCounters | ( | ) |
Definition at line 750 of file QwEPICSEvent.cc.
References fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fIsDataLoaded, fNumberEPICSEvents, and fNumberEPICSVariables.
Referenced by LoadChannelMap(), and main().
|
inlineprivate |
Definition at line 111 of file QwEPICSEvent.h.
References fIsDataLoaded.
Referenced by ExtractEPICSValues(), and QwEPICSEvent().
int QwEPICSEvent::SetDataValue | ( | const string & | tag, |
const double | value, | ||
const int | event ) |
Definition at line 511 of file QwEPICSEvent.cc.
References FindIndex(), and SetDataValue().
Referenced by ExtractEPICSValues(), SetDataValue(), SetDataValue(), and SetDataValue().
Definition at line 517 of file QwEPICSEvent.cc.
References FindIndex(), and SetDataValue().
int QwEPICSEvent::SetDataValue | ( | int | index, |
const double | value, | ||
const int | event ) |
Definition at line 523 of file QwEPICSEvent.cc.
References fEPICSDataEvent, kEPICS_Error, and kInvalidEPICSData.
int QwEPICSEvent::SetDataValue | ( | int | index, |
const string & | value, | ||
const int | event ) |
Definition at line 538 of file QwEPICSEvent.cc.
References fEPICSDataEvent, fEPICSVariableType, IsNumber(), kEPICS_Error, kEPICSFloat, kEPICSInt, kEPICSString, kInvalidEPICSData, and SetDataValue().
|
static |
Definition at line 504 of file QwEPICSEvent.cc.
References fDefaultAutogainList.
void QwEPICSEvent::WriteEPICSStringValues | ( | ) |
Definition at line 1314 of file QwEPICSEvent.cc.
References QwLog::endl(), fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, kEPICSString, and QwDebug.
|
private |
Definition at line 195 of file QwEPICSEvent.h.
Referenced by LoadChannelMap(), and QwEPICSEvent().
|
staticprivate |
Default autogain list.
Definition at line 138 of file QwEPICSEvent.h.
Referenced by GetDefaultAutogainList(), InitDefaultAutogainList(), and SetDefaultAutogainList().
|
private |
Definition at line 152 of file QwEPICSEvent.h.
Referenced by ProcessOptions().
|
private |
Definition at line 182 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), PrintAverages(), ReportEPICSData(), and ResetCounters().
|
private |
Definition at line 168 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), ExtractEPICSValues(), FillTreeVector(), GetDataString(), GetDataValue(), GetEPICSStringValues(), PrintAverages(), ReportEPICSData(), ResetCounters(), SetDataValue(), SetDataValue(), and WriteEPICSStringValues().
|
private |
Definition at line 188 of file QwEPICSEvent.h.
Referenced by AddEPICSTag().
|
private |
Definition at line 187 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), CalculateRunningValues(), ConstructBranchAndVector(), ExtractEPICSValues(), FillTreeVector(), GetEPICSStringValues(), LoadChannelMap(), PrintAverages(), PrintVariableList(), ReportEPICSData(), ResetCounters(), and WriteEPICSStringValues().
|
private |
Definition at line 191 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), and FindIndex().
|
private |
Definition at line 189 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), CalculateRunningValues(), ConstructBranchAndVector(), FillTreeVector(), GetDataString(), GetEPICSStringValues(), LoadChannelMap(), PrintAverages(), ReportEPICSData(), ResetCounters(), SetDataValue(), and WriteEPICSStringValues().
|
private |
Definition at line 199 of file QwEPICSEvent.h.
Referenced by DetermineIHWPPolarity(), and LoadChannelMap().
|
private |
Definition at line 110 of file QwEPICSEvent.h.
Referenced by ExtractEPICSValues(), HasDataLoaded(), ResetCounters(), and SetDataLoaded().
|
private |
Definition at line 198 of file QwEPICSEvent.h.
Referenced by DetermineWienMode(), LoadChannelMap(), and QwEPICSEvent().
|
private |
Definition at line 185 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), PrintAverages(), ReportEPICSData(), and ResetCounters().
|
private |
Definition at line 186 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), CalculateRunningValues(), LoadChannelMap(), QwEPICSEvent(), and ResetCounters().
|
private |
Definition at line 196 of file QwEPICSEvent.h.
Referenced by LoadChannelMap(), and QwEPICSEvent().
|
private |
Definition at line 106 of file QwEPICSEvent.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 107 of file QwEPICSEvent.h.
Referenced by ConstructBranchAndVector().
|
staticprivate |
Definition at line 145 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), ExtractEPICSValues(), LoadChannelMap(), and QwEPICSEvent().
|
staticprivate |
Definition at line 146 of file QwEPICSEvent.h.
Referenced by ExtractEPICSValues(), FindIndex(), GetDataString(), GetDataValue(), SetDataValue(), and SetDataValue().
|
staticprivate |
Definition at line 147 of file QwEPICSEvent.h.
|
staticprivate |
Definition at line 148 of file QwEPICSEvent.h.
Referenced by GetDataValue(), SetDataValue(), and SetDataValue().