16#include "TDirectory.h"
20#include "ROOT/RNTupleModel.hxx"
43 public std::vector<std::shared_ptr<VQwSubsystem>>,
47 typedef std::vector<std::shared_ptr<VQwSubsystem> >
SubsysPtrs;
49 using SubsysPtrs::const_iterator;
50 using SubsysPtrs::iterator;
51 using SubsysPtrs::begin;
52 using SubsysPtrs::end;
53 using SubsysPtrs::size;
54 using SubsysPtrs::empty;
106 for (iterator subsys_iter = begin(); subsys_iter != end(); ++subsys_iter) {
144 UInt_t *buffer, UInt_t num_words);
148 const BankID_t bank_id, UInt_t *buffer,
223#ifdef HAS_RNTUPLE_SUPPORT
225 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs) {
227 ConstructNTupleAndVector(model, tmpstr, values, fieldPtrs);
230 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs);
232 void FillNTupleVector(std::vector<Double_t>& values)
const;
264 void push_back(std::shared_ptr<VQwSubsystem> subsys);
Definition of the pure virtual base class of all subsystems.
An options class which parses command line, config file and environment.
#define QwError
Predefined log drain for errors.
static std::ostream & endl(std::ostream &)
End of the line.
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.
Container for managing multiple subsystems with common operations.
void SetCodaRunNumber(UInt_t runnum)
Set the internal record of the CODA run number.
void ConstructObjects(TDirectory *folder)
Construct the objects for this subsystem in a folder.
void SetDataLoaded(const Bool_t flag)
Set data loaded flag.
QwSubsystemArray & operator=(const QwSubsystemArray &value)
Assignment operator.
void SetCleanParameters(Double_t cleanparameter[3])
Set the internal record of the CODA event number.
virtual std::vector< VQwSubsystem * > GetSubsystemByType(const std::string &type)
Get the list of subsystems of the specified type.
void ConstructHistograms()
Construct the histograms for this subsystem.
UInt_t GetEventTypeMask() const
Get event type mask.
void GetMarkerWordList(const ROCID_t roc_id, const BankID_t bank_id, std::vector< UInt_t > &marker) const
void ConstructHistograms(TDirectory *folder)
Construct the histograms for this subsystem in a folder.
void push_back(VQwSubsystem *subsys)
Add the subsystem to this array.
void EncodeEventData(std::vector< UInt_t > &buffer)
Encode the data in this event.
~QwSubsystemArray() override
Virtual destructor.
UInt_t UpdateEventTypeMask()
Update the event type mask from the subsystems.
UInt_t fCodaEventType
CODA event type as provided by QwEventBuffer.
void ConstructObjects()
Construct the objects for this subsystem.
void ProcessEvent()
Process the decoded data in this event.
UInt_t GetCodaEventNumber() const
Get the internal record of the CODA event number.
std::vector< std::string > fSubsystemsDisabledByName
List of disabled types.
void SetCodaSegmentNumber(UInt_t segnum)
Set the internal record of the CODA segment number.
virtual VQwSubsystem * GetSubsystemByName(const TString &name)
Get the subsystem with the specified name.
QwSubsystemArray()
Private default constructor.
UInt_t GetCodaSegmentNumber() const
Get the internal record of the CODA segment number.
void LoadAllEventRanges(QwOptions &options)
void PrintParamFileList() const
Print list of parameter files.
void ConstructBranchAndVector(TTree *tree, QwRootTreeBranchVector &values)
Construct the tree and vector for this subsystem.
TList * GetParamFileNameList(TString name) const
Get list of parameter files.
CanContainFn fnCanContain
Function to determine which subsystems we can accept.
std::vector< std::shared_ptr< VQwSubsystem > > SubsysPtrs
UInt_t GetCodaRunNumber() const
Get the internal record of the CODA run number.
Double_t fCleanParameter[3]
void PrintInfo() const
Print some information about the subsystem.
Bool_t(* CanContainFn)(VQwSubsystem *)
UInt_t GetCodaEventType() const
Get the internal record of the CODA event type.
void SetEventTypeMask(const UInt_t mask)
Set event type mask.
static void DefineOptions(QwOptions &options)
Define configuration options for global array.
void ConstructTree()
Construct the tree for this subsystem.
static Bool_t CanContain(VQwSubsystem *subsys)
Test whether this subsystem array can contain a particular subsystem.
UInt_t fCodaRunNumber
Index of this data element in root tree.
Int_t ProcessEvBuffer(const UInt_t event_type, const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words)
Process the event buffer for events.
void ShareHistograms(const QwSubsystemArray &source)
Share the histograms with another subsystem.
void ConstructTree(TDirectory *folder)
Construct the tree for this subsystem in a folder.
void ProcessOptions(QwOptions &options)
Process configuration options (default behavior)
std::string fSubsystemsMapFile
Filename of the global detector map.
void SetCodaEventNumber(UInt_t evtnum)
Set the internal record of the CODA event number.
void FillTree()
Fill the tree for this subsystem.
void RandomizeEventData(int helicity=0, double time=0.0)
Randomize the data in this event.
UInt_t fCodaSegmentNumber
CODA segment number as provided by QwEventBuffer.
std::vector< std::string > fSubsystemsDisabledByType
List of disabled names.
void ConstructBranch(TTree *tree, TString &prefix)
Construct a branch for this subsystem with a prefix.
std::vector< std::pair< UInt_t, UInt_t > > fBadEventRange
void ProcessOptionsToplevel(QwOptions &options)
Process configuration options for the subsystem array itself.
UInt_t fEventTypeMask
Mask of event types.
Bool_t fHasDataLoaded
Has this array gotten data to be processed?
void LoadSubsystemsFromParameterFile(QwParameterFile &detectors)
void SetCodaEventType(UInt_t evttype)
Set the internal record of the CODA event type.
void AtEndOfEventLoop()
Perform actions at the end of the event loop.
void ProcessOptionsSubsystems(QwOptions &options)
Process configuration options for all subsystems in the array.
void FillTreeVector(QwRootTreeBranchVector &values) const
Fill the vector for this subsystem.
Bool_t HasDataLoaded() const
Get data loaded flag.
UInt_t fCodaEventNumber
CODA event number as provided by QwEventBuffer.
Int_t ProcessConfigurationBuffer(const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words)
Process the event buffer for configuration events.
void GetROCIDList(std::vector< ROCID_t > &list)
Get the ROCID list.
void FillHistograms()
Fill the histograms for this subsystem.
void DeleteTree()
Delete the tree for this subsystem.
Abstract base for concrete hardware channels implementing dual-operator pattern.
Base class for subsystems implementing container-delegation pattern.
UInt_t GetEventTypeMask() const
Get event type mask.