QwAnalysis
|
#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. More... | |
virtual | ~QwEPICSEvent () |
Virtual destructor. More... | |
void | ProcessOptions (QwOptions &options) |
Process the configuration options. More... | |
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. More... | |
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 | FillSlowControlsStrigs (QwParityDB *db) |
void | FillSlowControlsSettings (QwParityDB *db) |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
Construct the branch and tree vector. More... | |
void | FillTreeVector (std::vector< Double_t > &values) const |
Fill the tree vector. More... | |
void | WriteEPICSStringValues () |
Static Public Member Functions | |
static void | DefineOptions (QwOptions &options) |
Define the configuration options. More... | |
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. More... | |
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. More... | |
static const int | kDebug = 0 |
static const int | kEPICS_Error = -1 |
static const int | kEPICS_OK = 1 |
static const Double_t | kInvalidEPICSData = -999999.0 |
Definition at line 26 of file QwEPICSEvent.h.
EPICS data types.
Enumerator | |
---|---|
kEPICSString | |
kEPICSFloat | |
kEPICSInt |
Definition at line 31 of file QwEPICSEvent.h.
QwEPICSEvent::QwEPICSEvent | ( | ) |
Default constructor.
Definition at line 47 of file QwEPICSEvent.cc.
References InitDefaultAutogainList(), kDebug, PrintVariableList(), and SetDataLoaded().
|
virtual |
Int_t QwEPICSEvent::AddEPICSTag | ( | const string & | tag, |
const string & | table = "" , |
||
EQwEPICSDataType | datatype = kEPICSFloat |
||
) |
Definition at line 221 of file QwEPICSEvent.cc.
References fEPICSTableList, fEPICSVariableList, fEPICSVariableMap, fEPICSVariableType, and fNumberEPICSVariables.
Referenced by LoadChannelMap().
void QwEPICSEvent::CalculateRunningValues | ( | ) |
Definition at line 235 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, | ||
std::vector< Double_t > & | values | ||
) |
Construct the branch and tree vector.
Definition at line 161 of file QwEPICSEvent.cc.
References QwLog::endl(), fEPICSVariableList, fEPICSVariableType, fTreeArrayIndex, fTreeArrayNumEntries, kEPICSFloat, kEPICSInt, kEPICSString, and QwError.
|
static |
Define the configuration options.
Defines configuration options using QwOptions functionality.
options | Options object |
Definition at line 69 of file QwEPICSEvent.cc.
References QwOptions::AddOptions(), and default_bool_value.
Referenced by QwOptions::DefineOptions().
Int_t QwEPICSEvent::DetermineIHWPPolarity | ( | ) | const |
Definition at line 1338 of file QwEPICSEvent.cc.
References QwLog::endl(), fExtraHelicityReversal, GetDataString(), QwDebug, and QwWarning.
Referenced by QwBlinder::Update().
EQwWienMode QwEPICSEvent::DetermineWienMode | ( | ) | const |
Definition at line 1359 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 314 of file QwEPICSEvent.cc.
References DetermineWienMode(), fEPICSDataEvent, fEPICSVariableList, FindIndex(), fIsDataLoaded, QwParameterFile::HasVariablePair(), Qw::in, kDebug, kEPICS_Error, QwParameterFile::ReadNextLine(), SetDataLoaded(), SetDataValue(), QwParameterFile::TrimWhitespace(), and WienModeName().
Referenced by QwEventBuffer::FillEPICSData().
void QwEPICSEvent::FillDB | ( | QwParityDB * | db | ) |
Definition at line 707 of file QwEPICSEvent.cc.
References QwDatabase::Connect(), QwDatabase::Disconnect(), QwLog::endl(), fDisableDatabase, FillSlowControlsData(), FillSlowControlsSettings(), FillSlowControlsStrigs(), QwParityDB::GetRunletID(), QwDatabase::Query(), and QwError.
void QwEPICSEvent::FillSlowControlsData | ( | QwParityDB * | db | ) |
Definition at line 753 of file QwEPICSEvent.cc.
References QwDatabase::Connect(), QwDatabase::Disconnect(), QwLog::endl(), fEPICSCumulativeData, fEPICSTableList, fEPICSVariableList, fEPICSVariableType, QwParityDB::GetRunletID(), QwParityDB::GetSlowControlDetectorID(), kEPICSFloat, kEPICSInt, QwDatabase::Query(), QwDebug, and QwError.
Referenced by FillDB().
void QwEPICSEvent::FillSlowControlsSettings | ( | QwParityDB * | db | ) |
Definition at line 929 of file QwEPICSEvent.cc.
References QwDatabase::Connect(), QwDatabase::Disconnect(), QwLog::endl(), fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, FindIndex(), fNumberEPICSEvents, fPrecessionReversal, QwParityDB::GetRunletID(), kEPICS_Error, QwDatabase::Query(), QwDebug, QwError, QwWarning, and WienModeIndex().
Referenced by FillDB().
void QwEPICSEvent::FillSlowControlsStrigs | ( | QwParityDB * | db | ) |
Definition at line 857 of file QwEPICSEvent.cc.
References QwDatabase::Connect(), QwDatabase::Disconnect(), QwLog::endl(), fEPICSDataEvent, fEPICSTableList, fEPICSVariableList, fEPICSVariableType, QwParityDB::GetRunletID(), QwParityDB::GetSlowControlDetectorID(), kEPICSString, QwDatabase::Query(), QwDebug, QwError, and QwWarning.
Referenced by FillDB().
void QwEPICSEvent::FillTreeVector | ( | std::vector< Double_t > & | values | ) | const |
Fill the tree vector.
Definition at line 193 of file QwEPICSEvent.cc.
References QwLog::endl(), fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fTreeArrayIndex, kEPICSFloat, kEPICSInt, kEPICSString, and QwError.
Int_t QwEPICSEvent::FindIndex | ( | const string & | tag | ) | const |
Find the index of an EPICS variable, or return error.
Definition at line 347 of file QwEPICSEvent.cc.
References fEPICSVariableMap, and kEPICS_Error.
Referenced by ExtractEPICSValues(), FillSlowControlsSettings(), GetDataString(), GetDataValue(), and SetDataValue().
TString QwEPICSEvent::GetDataString | ( | const string & | tag | ) | const |
Definition at line 374 of file QwEPICSEvent.cc.
References fEPICSDataEvent, fEPICSVariableType, FindIndex(), kEPICS_Error, and kEPICSString.
Referenced by DetermineIHWPPolarity(), and QwBlinder::Update().
Double_t QwEPICSEvent::GetDataValue | ( | const string & | tag | ) | const |
Definition at line 362 of file QwEPICSEvent.cc.
References fEPICSDataEvent, FindIndex(), kEPICS_Error, and kInvalidEPICSData.
Referenced by DetermineWienMode(), main(), ReportAutogains(), and QwBlinder::Update().
|
inlinestatic |
Definition at line 108 of file QwEPICSEvent.h.
References fDefaultAutogainList.
|
private |
Definition at line 1237 of file QwEPICSEvent.cc.
References fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, and kEPICSString.
|
inline |
Definition at line 68 of file QwEPICSEvent.h.
References fIsDataLoaded.
Referenced by main().
|
staticprivate |
Initialize the default autogain list.
Definition at line 386 of file QwEPICSEvent.cc.
References fDefaultAutogainList.
Referenced by QwEPICSEvent().
|
inlineprivate |
Definition at line 133 of file QwEPICSEvent.h.
Referenced by SetDataValue().
Int_t QwEPICSEvent::LoadChannelMap | ( | TString | mapfile | ) |
Definition at line 90 of file QwEPICSEvent.cc.
References AddEPICSTag(), QwLog::endl(), fBlinderReversalForRunTwo, fEPICSVariableList, fEPICSVariableType, fExtraHelicityReversal, fNominalWienAngle, fNumberEPICSVariables, fPrecessionReversal, kDebug, kEPICSFloat, kEPICSInt, kEPICSString, QwDebug, QwError, ResetCounters(), and QwParameterFile::TrimComment().
Referenced by main().
void QwEPICSEvent::PrintAverages | ( | ) | const |
Definition at line 496 of file QwEPICSEvent.cc.
References fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fNumberEPICSEvents, kEPICSFloat, kEPICSInt, and kEPICSString.
void QwEPICSEvent::PrintVariableList | ( | ) | const |
Definition at line 571 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 83 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 581 of file QwEPICSEvent.cc.
References GetDataValue().
void QwEPICSEvent::ReportEPICSData | ( | ) | const |
Definition at line 601 of file QwEPICSEvent.cc.
References fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fNumberEPICSEvents, kEPICSFloat, kEPICSInt, and kEPICSString.
void QwEPICSEvent::ResetCounters | ( | ) |
Definition at line 675 of file QwEPICSEvent.cc.
References fEPICSCumulativeData, fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, fIsDataLoaded, fNumberEPICSEvents, and fNumberEPICSVariables.
Referenced by LoadChannelMap().
|
inlineprivate |
Definition at line 96 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 436 of file QwEPICSEvent.cc.
References FindIndex().
Referenced by ExtractEPICSValues(), and SetDataValue().
int QwEPICSEvent::SetDataValue | ( | const string & | tag, |
const string & | value, | ||
const int | event | ||
) |
Definition at line 442 of file QwEPICSEvent.cc.
References FindIndex(), and SetDataValue().
int QwEPICSEvent::SetDataValue | ( | int | index, |
const double | value, | ||
const int | event | ||
) |
Definition at line 448 of file QwEPICSEvent.cc.
References fEPICSDataEvent, kEPICS_Error, and kInvalidEPICSData.
int QwEPICSEvent::SetDataValue | ( | int | index, |
const string & | value, | ||
const int | event | ||
) |
Definition at line 463 of file QwEPICSEvent.cc.
References fEPICSDataEvent, fEPICSVariableType, IsNumber(), kEPICS_Error, kEPICSFloat, kEPICSInt, kEPICSString, kInvalidEPICSData, and SetDataValue().
|
static |
Definition at line 429 of file QwEPICSEvent.cc.
References fDefaultAutogainList.
void QwEPICSEvent::WriteEPICSStringValues | ( | ) |
Definition at line 1271 of file QwEPICSEvent.cc.
References QwLog::endl(), fEPICSDataEvent, fEPICSVariableList, fEPICSVariableType, kEPICSString, and QwDebug.
|
private |
Definition at line 173 of file QwEPICSEvent.h.
Referenced by LoadChannelMap().
|
staticprivate |
Default autogain list.
Definition at line 116 of file QwEPICSEvent.h.
Referenced by GetDefaultAutogainList(), InitDefaultAutogainList(), and SetDefaultAutogainList().
|
private |
Definition at line 130 of file QwEPICSEvent.h.
Referenced by FillDB(), and ProcessOptions().
|
private |
Definition at line 160 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), FillSlowControlsData(), FillSlowControlsSettings(), PrintAverages(), ReportEPICSData(), and ResetCounters().
|
private |
Definition at line 146 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), ExtractEPICSValues(), FillSlowControlsSettings(), FillSlowControlsStrigs(), FillTreeVector(), GetDataString(), GetDataValue(), GetEPICSStringValues(), PrintAverages(), ReportEPICSData(), ResetCounters(), SetDataValue(), and WriteEPICSStringValues().
|
private |
Definition at line 166 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), FillSlowControlsData(), and FillSlowControlsStrigs().
|
private |
Definition at line 165 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), CalculateRunningValues(), ConstructBranchAndVector(), ExtractEPICSValues(), FillSlowControlsData(), FillSlowControlsSettings(), FillSlowControlsStrigs(), FillTreeVector(), GetEPICSStringValues(), LoadChannelMap(), PrintAverages(), PrintVariableList(), ReportEPICSData(), ResetCounters(), and WriteEPICSStringValues().
|
private |
Definition at line 169 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), and FindIndex().
|
private |
Definition at line 167 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), CalculateRunningValues(), ConstructBranchAndVector(), FillSlowControlsData(), FillSlowControlsStrigs(), FillTreeVector(), GetDataString(), GetEPICSStringValues(), LoadChannelMap(), PrintAverages(), ReportEPICSData(), ResetCounters(), SetDataValue(), and WriteEPICSStringValues().
|
private |
Definition at line 177 of file QwEPICSEvent.h.
Referenced by DetermineIHWPPolarity(), and LoadChannelMap().
|
private |
Definition at line 95 of file QwEPICSEvent.h.
Referenced by ExtractEPICSValues(), HasDataLoaded(), ResetCounters(), and SetDataLoaded().
|
private |
Definition at line 176 of file QwEPICSEvent.h.
Referenced by DetermineWienMode(), and LoadChannelMap().
|
private |
Definition at line 163 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), FillSlowControlsSettings(), PrintAverages(), ReportEPICSData(), and ResetCounters().
|
private |
Definition at line 164 of file QwEPICSEvent.h.
Referenced by AddEPICSTag(), CalculateRunningValues(), LoadChannelMap(), and ResetCounters().
|
private |
Definition at line 174 of file QwEPICSEvent.h.
Referenced by FillSlowControlsSettings(), and LoadChannelMap().
|
private |
Definition at line 91 of file QwEPICSEvent.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 92 of file QwEPICSEvent.h.
Referenced by ConstructBranchAndVector().
|
staticprivate |
Definition at line 123 of file QwEPICSEvent.h.
Referenced by CalculateRunningValues(), ExtractEPICSValues(), LoadChannelMap(), and QwEPICSEvent().
|
staticprivate |
Definition at line 124 of file QwEPICSEvent.h.
Referenced by ExtractEPICSValues(), FillSlowControlsSettings(), FindIndex(), GetDataString(), GetDataValue(), and SetDataValue().
|
staticprivate |
Definition at line 125 of file QwEPICSEvent.h.
|
staticprivate |
Definition at line 126 of file QwEPICSEvent.h.
Referenced by GetDataValue(), and SetDataValue().