JAPAn
Just Another Parity Analyzer
|
Virtual base class for the parity handlers. More...
#include <QwDataHandlerArray.h>
Public Member Functions | |
QwDataHandlerArray (QwOptions &options, QwHelicityPattern &helicitypattern, const TString &run) | |
Constructor from helicity pattern with options. | |
QwDataHandlerArray (QwOptions &options, QwSubsystemArrayParity &detectors, const TString &run) | |
Constructor from subsystem array with options. | |
QwDataHandlerArray (const QwDataHandlerArray &source) | |
Copy constructor by reference. | |
~QwDataHandlerArray () override | |
Default destructor. | |
void | ProcessOptions (QwOptions &options) |
Process configuration options for the datahandler array itself. | |
template<class T> | |
void | LoadDataHandlersFromParameterFile (QwParameterFile &mapfile, T &detectors, const TString &run) |
Load data handlers from a parameter file. | |
void | push_back (VQwDataHandler *handler) |
Add the datahandler to this array. | |
void | push_back (std::shared_ptr< VQwDataHandler > handler) |
VQwDataHandler * | GetDataHandlerByName (const TString &name) |
Get the handler with the specified name. | |
std::vector< VQwDataHandler * > | GetDataHandlerByType (const std::string &type) |
void | ConstructTreeBranches (QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="") |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) |
Construct a branch and vector for this handler with a prefix. | |
void | FillTreeBranches (QwRootFile *treerootfile) |
void | FillTreeVector (QwRootTreeBranchVector &values) const |
Fill the vector for this handler. | |
void | ConstructNTupleFields (QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="") |
RNTuple methods. | |
void | FillNTupleFields (QwRootFile *treerootfile) |
void | ConstructHistograms () |
Construct the histograms for this subsystem. | |
void | ConstructHistograms (TDirectory *folder) |
Construct the histograms for this subsystem in a folder. | |
void | ConstructHistograms (TDirectory *folder, TString &prefix) |
Construct the histograms in a folder with a prefix. | |
void | FillHistograms () |
Fill the histograms. | |
void | FillDB (QwParityDB *db, TString type) |
Fill the database. | |
void | ClearEventData () |
void | ProcessEvent () |
void | UpdateBurstCounter (Short_t burstcounter) |
QwDataHandlerArray & | operator= (const QwDataHandlerArray &value) |
Assignment operator. | |
void | AccumulateRunningSum () |
Update the running sums for devices accumulated for the global error non-zero events/patterns. | |
void | AccumulateRunningSum (const QwDataHandlerArray &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) |
Update the running sums for devices accumulated for the global error non-zero events/patterns. | |
void | AccumulateAllRunningSum (const QwDataHandlerArray &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) |
Update the running sums for devices check only the error flags at the channel level. Only used for stability checks. | |
void | CalculateRunningAverage () |
Calculate the average for all good events. | |
void | PrintErrorCounters () const |
Report the number of events failed due to HW and event cut failures. | |
void | PrintValue () const |
Print value of all channels. | |
void | WritePromptSummary (QwPromptSummary *ps, TString type) |
void | ProcessDataHandlerEntry () |
void | FinishDataHandler () |
![]() | |
MQwPublishable () | |
Default constructor Initializes empty variable publishing maps. | |
MQwPublishable (const MQwPublishable &source) | |
Copy constructor Creates a new container with cleared publishing maps (variables are not copied). | |
virtual | ~MQwPublishable () |
Virtual destructor. | |
Bool_t | RequestExternalValue (const TString &name, VQwHardwareChannel *value) const |
Retrieve a variable value from external sources by copying Searches for the named variable in external subsystem arrays and copies its value into the provided data element. | |
const VQwHardwareChannel * | RequestExternalPointer (const TString &name) const |
Retrieve a direct pointer to an external variable Searches for the named variable in external subsystem arrays and returns a direct pointer to the data element. | |
virtual const VQwHardwareChannel * | ReturnInternalValue (const TString &name) const |
Retrieve an internal variable by name (pointer version) Searches for the named variable among published internal variables and returns a direct pointer to the data element. | |
Bool_t | ReturnInternalValue (const TString &name, VQwHardwareChannel *value) const |
Retrieve an internal variable by name (copy version) Searches for the named variable among published internal variables and copies its value into the provided data element. | |
void | ListPublishedValues () const |
List all published variables with descriptions Prints a summary of all currently published variables and their descriptions to the logging output for debugging and inspection purposes. | |
Bool_t | PublishInternalValue (const TString name, const TString desc, const VQwDataHandler *subsys, const VQwHardwareChannel *element) |
Publish an internal variable from a subsystem Registers a variable from one of the contained subsystems in the publishing framework, making it available for external access by name. | |
Static Public Member Functions | |
static void | DefineOptions (QwOptions &options) |
Define configuration options for global array. | |
Protected Types | |
enum | EDataHandlerArrayScope { kUnknownScope =-1 , kEventScope , kPatternScope } |
Protected Member Functions | |
void | SetPointer (QwHelicityPattern &helicitypattern) |
void | SetPointer (QwSubsystemArrayParity &detectors) |
Bool_t | ScopeMismatch (TString name) |
Static Protected Member Functions | |
static Bool_t | CanContain (VQwDataHandler *handler) |
Test whether this handler array can contain a particular handler. | |
Protected Attributes | |
QwHelicityPattern * | fHelicityPattern |
Pointer for the original data source. | |
QwSubsystemArrayParity * | fSubsystemArray |
std::string | fDataHandlersMapFile |
Filename of the global detector map. | |
EDataHandlerArrayScope | fArrayScope |
std::vector< std::string > | fDataHandlersDisabledByName |
List of disabled types. | |
std::vector< std::string > | fDataHandlersDisabledByType |
List of disabled names. | |
Bool_t | fPrintRunningSum |
Private Types | |
typedef std::vector< std::shared_ptr< VQwDataHandler > > | HandlerPtrs |
Private Member Functions | |
QwDataHandlerArray () | |
Private default constructor. | |
Additional Inherited Members | |
![]() | |
std::vector< std::vector< TString > > | fPublishList |
Virtual base class for the parity handlers.
Virtual base class for the classes containing the event-based information from each parity handler. This will define the interfaces used in communicating with the CODA routines.
Definition at line 45 of file QwDataHandlerArray.h.
|
private |
Definition at line 50 of file QwDataHandlerArray.h.
|
protected |
Enumerator | |
---|---|
kUnknownScope | |
kEventScope | |
kPatternScope |
Definition at line 214 of file QwDataHandlerArray.h.
|
private |
Private default constructor.
References QwDataHandlerArray().
Referenced by AccumulateAllRunningSum(), AccumulateRunningSum(), AccumulateRunningSum(), operator=(), QwDataHandlerArray(), and QwDataHandlerArray().
QwDataHandlerArray::QwDataHandlerArray | ( | QwOptions & | options, |
QwHelicityPattern & | helicitypattern, | ||
const TString & | run ) |
Constructor from helicity pattern with options.
Create a handler array based on the configuration option 'detectors'
Definition at line 20 of file QwDataHandlerArray.cc.
References QwLog::endl(), fArrayScope, fDataHandlersMapFile, fHelicityPattern, fSubsystemArray, kPatternScope, LoadDataHandlersFromParameterFile(), ProcessOptions(), and QwMessage.
QwDataHandlerArray::QwDataHandlerArray | ( | QwOptions & | options, |
QwSubsystemArrayParity & | detectors, | ||
const TString & | run ) |
Constructor from subsystem array with options.
Create a handler array based on the configuration option 'detectors'
Definition at line 34 of file QwDataHandlerArray.cc.
References QwLog::endl(), fArrayScope, fDataHandlersMapFile, fHelicityPattern, fSubsystemArray, kEventScope, LoadDataHandlersFromParameterFile(), ProcessOptions(), and QwMessage.
QwDataHandlerArray::QwDataHandlerArray | ( | const QwDataHandlerArray & | source | ) |
Copy constructor by reference.
Copy constructor by reference
source | Source handler array |
Definition at line 49 of file QwDataHandlerArray.cc.
References fDataHandlersDisabledByName, fDataHandlersDisabledByType, fDataHandlersMapFile, fHelicityPattern, fSubsystemArray, and QwDataHandlerArray().
|
override |
Default destructor.
Destructor.
Definition at line 74 of file QwDataHandlerArray.cc.
void QwDataHandlerArray::AccumulateAllRunningSum | ( | const QwDataHandlerArray & | value, |
Int_t | count = 0, | ||
Int_t | ErrorMask = 0xFFFFFFF ) |
Update the running sums for devices check only the error flags at the channel level. Only used for stability checks.
Definition at line 576 of file QwDataHandlerArray.cc.
References VQwDataHandler::AccumulateRunningSum(), QwLog::endl(), QwDataHandlerArray(), and QwError.
void QwDataHandlerArray::AccumulateRunningSum | ( | ) |
Update the running sums for devices accumulated for the global error non-zero events/patterns.
References QwDataHandlerArray().
void QwDataHandlerArray::AccumulateRunningSum | ( | const QwDataHandlerArray & | value, |
Int_t | count = 0, | ||
Int_t | ErrorMask = 0xFFFFFFF ) |
Update the running sums for devices accumulated for the global error non-zero events/patterns.
Definition at line 543 of file QwDataHandlerArray.cc.
References VQwDataHandler::AccumulateRunningSum(), QwLog::endl(), QwDataHandlerArray(), and QwError.
void QwDataHandlerArray::CalculateRunningAverage | ( | ) |
Calculate the average for all good events.
Definition at line 532 of file QwDataHandlerArray.cc.
References VQwDataHandler::CalculateRunningAverage().
|
inlinestaticprotected |
Test whether this handler array can contain a particular handler.
Definition at line 223 of file QwDataHandlerArray.h.
Referenced by LoadDataHandlersFromParameterFile(), push_back(), and push_back().
void QwDataHandlerArray::ClearEventData | ( | ) |
Definition at line 328 of file QwDataHandlerArray.cc.
References VQwDataHandler::ClearEventData().
Referenced by main().
void QwDataHandlerArray::ConstructBranchAndVector | ( | TTree * | tree, |
TString & | prefix, | ||
QwRootTreeBranchVector & | values ) |
Construct a branch and vector for this handler with a prefix.
Definition at line 391 of file QwDataHandlerArray.cc.
References VQwDataHandler::ConstructBranchAndVector().
|
inline |
Construct the histograms for this subsystem.
Definition at line 122 of file QwDataHandlerArray.h.
References ConstructHistograms().
Referenced by ConstructHistograms(), and ConstructHistograms().
|
inline |
Construct the histograms for this subsystem in a folder.
Definition at line 126 of file QwDataHandlerArray.h.
References ConstructHistograms().
void QwDataHandlerArray::ConstructHistograms | ( | TDirectory * | folder, |
TString & | prefix ) |
Construct the histograms in a folder with a prefix.
Definition at line 413 of file QwDataHandlerArray.cc.
void QwDataHandlerArray::ConstructNTupleFields | ( | QwRootFile * | treerootfile, |
const std::string & | treeprefix = "", | ||
const std::string & | branchprefix = "" ) |
RNTuple methods.
Definition at line 366 of file QwDataHandlerArray.cc.
Referenced by main().
void QwDataHandlerArray::ConstructTreeBranches | ( | QwRootFile * | treerootfile, |
const std::string & | treeprefix = "", | ||
const std::string & | branchprefix = "" ) |
Definition at line 345 of file QwDataHandlerArray.cc.
Referenced by main().
|
static |
Define configuration options for global array.
Define configuration options for global array
options | Options |
Definition at line 231 of file QwDataHandlerArray.cc.
References QwOptions::AddOptions().
Referenced by DefineOptionsParity().
void QwDataHandlerArray::FillDB | ( | QwParityDB * | db, |
TString | type ) |
Fill the database.
void QwDataHandlerArray::FillHistograms | ( | ) |
Fill the histograms.
Definition at line 422 of file QwDataHandlerArray.cc.
References VQwDataHandler::FillHistograms().
void QwDataHandlerArray::FillNTupleFields | ( | QwRootFile * | treerootfile | ) |
Definition at line 378 of file QwDataHandlerArray.cc.
Referenced by main().
void QwDataHandlerArray::FillTreeBranches | ( | QwRootFile * | treerootfile | ) |
Definition at line 357 of file QwDataHandlerArray.cc.
Referenced by main().
void QwDataHandlerArray::FillTreeVector | ( | QwRootTreeBranchVector & | values | ) | const |
Fill the vector for this handler.
Definition at line 401 of file QwDataHandlerArray.cc.
References VQwDataHandler::FillTreeVector().
void QwDataHandlerArray::FinishDataHandler | ( | ) |
Definition at line 715 of file QwDataHandlerArray.cc.
Referenced by main().
VQwDataHandler * QwDataHandlerArray::GetDataHandlerByName | ( | const TString & | name | ) |
Get the handler with the specified name.
Get the handler in this array with the specified name
name | Name of the handler |
Definition at line 280 of file QwDataHandlerArray.cc.
Referenced by push_back(), and push_back().
std::vector< VQwDataHandler * > QwDataHandlerArray::GetDataHandlerByType | ( | const std::string & | type | ) |
Get the list of handlers in this array of the specified type
type | Type of the handler |
Definition at line 305 of file QwDataHandlerArray.cc.
void QwDataHandlerArray::LoadDataHandlersFromParameterFile | ( | QwParameterFile & | mapfile, |
T & | detectors, | ||
const TString & | run ) |
Load data handlers from a parameter file.
Parses the map file and constructs/initializes handlers, connecting them to the provided source container.
T | Source type (QwHelicityPattern or QwSubsystemArrayParity). |
mapfile | Parameter file describing handlers and settings. |
detectors | Source object to connect handlers to. |
run | Run label used for per-run configuration. |
Definition at line 86 of file QwDataHandlerArray.cc.
References CanContain(), VQwDataHandler::ConnectChannels(), QwLog::endl(), fArrayScope, fDataHandlersDisabledByName, fDataHandlersDisabledByType, VQwDataHandler::InitRunningSum(), kPatternScope, VQwDataHandler::LoadChannelMap(), VQwDataHandler::ParseConfigFile(), push_back(), QwError, QwMessage, QwVerbose, QwWarning, QwParameterFile::ReadNextSection(), QwParameterFile::ReadSectionPreamble(), ScopeMismatch(), MQwPublishable_child< U, T >::SetParent(), SetPointer(), VQwDataHandler::SetPointer(), and VQwDataHandler::SetRunLabel().
Referenced by QwDataHandlerArray(), and QwDataHandlerArray().
QwDataHandlerArray & QwDataHandlerArray::operator= | ( | const QwDataHandlerArray & | source | ) |
Assignment operator.
Assignment operator
source | DataHandler array to assign to this array |
Definition at line 469 of file QwDataHandlerArray.cc.
References QwLog::endl(), QwDataHandlerArray(), and QwError.
void QwDataHandlerArray::PrintErrorCounters | ( | ) | const |
Report the number of events failed due to HW and event cut failures.
void QwDataHandlerArray::PrintValue | ( | ) | const |
Print value of all channels.
Definition at line 517 of file QwDataHandlerArray.cc.
References VQwDataHandler::PrintValue().
void QwDataHandlerArray::ProcessDataHandlerEntry | ( | ) |
Definition at line 705 of file QwDataHandlerArray.cc.
Referenced by main().
void QwDataHandlerArray::ProcessEvent | ( | ) |
Definition at line 338 of file QwDataHandlerArray.cc.
References VQwDataHandler::ProcessData().
void QwDataHandlerArray::ProcessOptions | ( | QwOptions & | options | ) |
Process configuration options for the datahandler array itself.
Handle configuration options for the handler array itself
options | Options |
Definition at line 260 of file QwDataHandlerArray.cc.
References fDataHandlersDisabledByName, fDataHandlersDisabledByType, fDataHandlersMapFile, fPrintRunningSum, QwOptions::GetValue(), QwOptions::GetValueVector(), and QwOptions::HasValue().
Referenced by QwDataHandlerArray(), and QwDataHandlerArray().
void QwDataHandlerArray::push_back | ( | std::shared_ptr< VQwDataHandler > | handler | ) |
Add the handler to this array. Do nothing if the handler is null or if there is already a handler with that name in the array.
handler | DataHandler to add to the array |
Definition at line 627 of file QwDataHandlerArray.cc.
References CanContain(), QwLog::endl(), GetDataHandlerByName(), and QwError.
void QwDataHandlerArray::push_back | ( | VQwDataHandler * | handler | ) |
Add the datahandler to this array.
Add the handler to this array. Do nothing if the handler is null or if there is already a handler with that name in the array.
handler | DataHandler to add to the array |
Definition at line 199 of file QwDataHandlerArray.cc.
References CanContain(), QwLog::endl(), GetDataHandlerByName(), VQwDataHandler::GetName(), and QwError.
Referenced by LoadDataHandlersFromParameterFile().
|
inlineprotected |
Definition at line 207 of file QwDataHandlerArray.h.
References fArrayScope, kEventScope, kPatternScope, and kUnknownScope.
Referenced by LoadDataHandlersFromParameterFile().
|
inlineprotected |
Definition at line 193 of file QwDataHandlerArray.h.
References fHelicityPattern.
Referenced by LoadDataHandlersFromParameterFile().
|
inlineprotected |
Definition at line 196 of file QwDataHandlerArray.h.
References fSubsystemArray.
|
inline |
Definition at line 142 of file QwDataHandlerArray.h.
Referenced by main().
void QwDataHandlerArray::WritePromptSummary | ( | QwPromptSummary * | ps, |
TString | type ) |
Definition at line 451 of file QwDataHandlerArray.cc.
References VQwDataHandler::WritePromptSummary().
Referenced by main().
|
protected |
Definition at line 215 of file QwDataHandlerArray.h.
Referenced by LoadDataHandlersFromParameterFile(), QwDataHandlerArray(), QwDataHandlerArray(), and ScopeMismatch().
|
protected |
List of disabled types.
Definition at line 217 of file QwDataHandlerArray.h.
Referenced by LoadDataHandlersFromParameterFile(), ProcessOptions(), and QwDataHandlerArray().
|
protected |
List of disabled names.
Definition at line 218 of file QwDataHandlerArray.h.
Referenced by LoadDataHandlersFromParameterFile(), ProcessOptions(), and QwDataHandlerArray().
|
protected |
Filename of the global detector map.
Definition at line 205 of file QwDataHandlerArray.h.
Referenced by ProcessOptions(), QwDataHandlerArray(), QwDataHandlerArray(), and QwDataHandlerArray().
|
protected |
Pointer for the original data source.
Definition at line 201 of file QwDataHandlerArray.h.
Referenced by QwDataHandlerArray(), QwDataHandlerArray(), QwDataHandlerArray(), and SetPointer().
|
protected |
Definition at line 220 of file QwDataHandlerArray.h.
Referenced by ProcessOptions().
|
protected |
Definition at line 202 of file QwDataHandlerArray.h.
Referenced by QwDataHandlerArray(), QwDataHandlerArray(), QwDataHandlerArray(), and SetPointer().