14#include "TDirectory.h"
18#ifdef HAS_RNTUPLE_SUPPORT
19#include "ROOT/RNTupleModel.hxx"
46 public std::vector<std::shared_ptr<VQwDataHandler> >,
50 typedef std::vector<std::shared_ptr<VQwDataHandler> >
HandlerPtrs;
52 using HandlerPtrs::const_iterator;
53 using HandlerPtrs::iterator;
54 using HandlerPtrs::begin;
55 using HandlerPtrs::end;
56 using HandlerPtrs::size;
57 using HandlerPtrs::empty;
94 void push_back(std::shared_ptr<VQwDataHandler> handler);
103 const std::string& treeprefix =
"",
104 const std::string& branchprefix =
"");
116 const std::string& treeprefix =
"",
117 const std::string& branchprefix =
"");
136 void FillDB(QwParityDB *db, TString type);
145 for(iterator handler = begin(); handler != end(); ++handler){
146 (*handler)->UpdateBurstCounter(burstcounter);
155 QwDataHandlerArray& operator+= (const QwDataHandlerArray &value);
157 QwDataHandlerArray& operator-= (const QwDataHandlerArray &value);
159 void Sum(const QwDataHandlerArray &value1, const QwDataHandlerArray &value2);
161 void Difference(const QwDataHandlerArray &value1, const QwDataHandlerArray &value2);
163 void Scale(Double_t factor);
An options class which parses command line, config file and environment.
Virtual base class for data handlers accessing multiple subsystems.
Array container for managing multiple data handlers.
Helicity pattern analysis and management.
Command-line and configuration file options processor.
Configuration file parser with flexible tokenization and search capabilities.
A helper class to manage a vector of branch entries for ROOT trees.
A wrapper class for a ROOT file or memory mapped file.
Virtual base class for the parity handlers.
void push_back(VQwDataHandler *handler)
Add the datahandler to this array.
void PrintErrorCounters() const
Report the number of events failed due to HW and event cut failures.
std::vector< std::shared_ptr< VQwDataHandler > > HandlerPtrs
void UpdateBurstCounter(Short_t burstcounter)
static void DefineOptions(QwOptions &options)
Define configuration options for global array.
void FillNTupleFields(QwRootFile *treerootfile)
void CalculateRunningAverage()
Calculate the average for all good events.
void ConstructHistograms()
Construct the histograms for this subsystem.
void SetPointer(QwSubsystemArrayParity &detectors)
void ProcessDataHandlerEntry()
void FillTreeBranches(QwRootFile *treerootfile)
VQwDataHandler * GetDataHandlerByName(const TString &name)
Get the handler with the specified name.
void FillDB(QwParityDB *db, TString type)
Fill the database.
void SetPointer(QwHelicityPattern &helicitypattern)
Bool_t ScopeMismatch(TString name)
std::vector< std::string > fDataHandlersDisabledByType
List of disabled names.
void ConstructTreeBranches(QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="")
void PrintValue() const
Print value of all channels.
QwSubsystemArrayParity * fSubsystemArray
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....
QwHelicityPattern * fHelicityPattern
Pointer for the original data source.
void ConstructHistograms(TDirectory *folder)
Construct the histograms for this subsystem in a folder.
~QwDataHandlerArray() override
Default destructor.
QwDataHandlerArray()
Private default constructor.
void FillTreeVector(QwRootTreeBranchVector &values) const
Fill the vector for this handler.
void WritePromptSummary(QwPromptSummary *ps, TString type)
void ConstructNTupleFields(QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="")
RNTuple methods.
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)
Construct a branch and vector for this handler with a prefix.
static Bool_t CanContain(VQwDataHandler *handler)
Test whether this handler array can contain a particular handler.
std::string fDataHandlersMapFile
Filename of the global detector map.
std::vector< VQwDataHandler * > GetDataHandlerByType(const std::string &type)
void ProcessOptions(QwOptions &options)
Process configuration options for the datahandler array itself.
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 FillHistograms()
Fill the histograms.
EDataHandlerArrayScope fArrayScope
std::vector< std::string > fDataHandlersDisabledByName
List of disabled types.
void LoadDataHandlersFromParameterFile(QwParameterFile &mapfile, T &detectors, const TString &run)
Load data handlers from a parameter file.
Manages yields/differences/asymmetries for helicity patterns.
Subsystem array container specialized for parity analysis with asymmetry calculations.
Abstract base for handlers that consume multiple subsystems and produce derived outputs.