18#include "TDirectory.h"
22#ifdef HAS_RNTUPLE_SUPPORT
23#include "ROOT/RNTupleModel.hxx"
329#ifdef HAS_RNTUPLE_SUPPORT
338 virtual void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs) = 0;
340 virtual void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs) {
342 ConstructNTupleAndVector(model, tmpstr, values, fieldPtrs);
349 virtual void FillNTupleVector(std::vector<Double_t>& values)
const = 0;
458 if (bankindex>=0 &&
fMarkerWords.at(rocindex).at(bankindex).size()>0){
459 std::vector<UInt_t> m =
fMarkerWords.at(rocindex).at(bankindex);
460 marker.insert(marker.end(), m.begin(), m.end());
467 Int_t
FindIndex(
const std::vector<T> &myvec,
const T value)
const
470 for (
size_t i=0 ; i < myvec.size(); i++ ){
471 if (myvec[i]==value){
507 return (
typeid(*
this) ==
typeid(*source));
#define QwDebug
Predefined log drain for debugging output.
Mix-in class for histogram management functionality.
Factory pattern implementation for creating analysis objects.
class VQwCloneable< VQwSubsystem > VQwSubsystemCloneable
Mix-in factory functionality for subsystems.
MQwHistograms()
Default constructor.
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.
Abstract base for concrete hardware channels implementing dual-operator pattern.
Base class for subsystems implementing container-delegation pattern.
std::vector< std::vector< TString > > fPublishList
virtual Int_t RegisterROCNumber(const ROCID_t roc_id, const BankID_t bank_id=0)
Tell the object that it will decode data from this ROC and sub-bank.
virtual void RandomizeEventData(int=0, double=0.0)
virtual void ConstructObjects(TString &prefix)
Construct the objects for this subsystem with a prefix.
~VQwSubsystem() override
Default destructor.
std::vector< ROCID_t > fROC_IDs
Vector of ROC IDs associated with this subsystem.
virtual void ConstructTree(TDirectory *, TString &)
Construct the tree for this subsystem in a folder with a prefix.
virtual void EncodeEventData(std::vector< UInt_t > &)
virtual void AtEndOfEventLoop()
Perform actions at the end of the event loop.
virtual void DeleteTree()
Delete the tree for this subsystem.
virtual Int_t LoadChannelMap(TString mapfile)=0
Mandatory map file definition.
BankID_t fCurrentBank_ID
Bank ID (and Marker word) that is currently being processed;.
virtual void ConstructHistograms(TString &prefix)
Construct the histograms for this subsystem with a prefix.
virtual void ConstructBranchAndVector(TTree *tree, QwRootTreeBranchVector &values)
Construct the branch and tree vector.
Bool_t PublishInternalValues() const override
Publish all variables of the subsystem.
virtual std::map< TString, TString > GetDetectorMaps()
void GetMarkerWordList(const ROCID_t roc_id, const BankID_t bank_id, std::vector< UInt_t > &marker) const
TString fSystemName
Name of this subsystem.
Int_t GetSubbankIndex() const
std::vector< TString > fDetectorMapsNames
Names of loaded detector map files.
UInt_t GetEventTypeMask() const
Get event type mask.
virtual void ConstructTree(TString &prefix)
Construct the tree for this subsystem with a prefix.
virtual void ProcessOptions(QwOptions &)
Process the command line options.
virtual void FillTree()
Fill the tree for this subsystem.
Bool_t PublishByRequest(TString) override
Try to publish an internal variable matching the submitted name.
virtual void ConstructBranch(TTree *tree, TString &prefix, QwParameterFile &trim_file)=0
Construct the branch and tree vector based on the trim file.
std::vector< std::vector< BankID_t > > fBank_IDs
Vector of Bank IDs per ROC ID associated with this subsystem.
void SetEventTypeMask(const UInt_t mask)
Set event type mask.
virtual void ConstructHistograms()
Construct the histograms for this subsystem.
Bool_t Compare(VQwSubsystem *source)
virtual void FillHistograms()=0
Fill the histograms for this subsystem.
VQwSubsystem(const VQwSubsystem &orig)
Copy constructor by object.
virtual VQwSubsystem & operator=(VQwSubsystem *value)
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsy...
virtual void PrintInfo() const
Print some information about the subsystem.
virtual void ConstructHistograms(TDirectory *folder)
Construct the histograms for this subsystem in a folder.
virtual void ConstructHistograms(TDirectory *folder, TString &prefix)=0
Construct the histograms for this subsystem in a folder with a prefix.
virtual void ConstructObjects()
Construct the objects for this subsystem.
void RegisterRocBankMarker(QwParameterFile &mapstr)
virtual Int_t LoadEventCuts(TString)
Optional event cut file.
static void DefineOptions()
Define options function (note: no virtual static functions in C++)
virtual Int_t LoadGeometryDefinition(TString)
Optional geometry definition.
virtual Int_t ProcessEvBuffer(const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words)=0
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware v...
Bool_t fIsDataLoaded
Has this subsystem gotten data to be processed?
virtual void ExchangeProcessedData()
Request processed data from other subsystems for internal use in the second event processing stage....
virtual void FillTreeVector(QwRootTreeBranchVector &values) const =0
Fill the tree vector.
virtual Int_t ProcessConfigurationBuffer(const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words)=0
virtual void ConstructTree(TDirectory *folder)
Construct the tree for this subsystem in a folder.
virtual void ClearEventData()=0
virtual Int_t LoadDetectorMaps(QwParameterFile &file)
Parse parameter file to find the map files.
Int_t FindIndex(const std::vector< T > &myvec, const T value) const
virtual void ConstructObjects(TDirectory *, TString &)
Construct the objects for this subsystem in a folder with a prefix.
virtual void ProcessEvent_2()
Process the event data again, including data from other subsystems. Not all derived classes will requ...
Int_t RegisterMarkerWord(const UInt_t markerword)
virtual std::vector< TString > GetParamFileNameList()
std::map< TString, TString > fDetectorMaps
Map of file name to full path or content.
virtual void ConstructTree()
Construct the tree for this subsystem.
void ClearAllBankRegistrations()
Clear all registration of ROC and Bank IDs for this subsystem.
virtual Int_t LoadInputParameters(TString mapfile)=0
Mandatory parameter file definition.
virtual void PrintDetectorMaps(Bool_t status) const
VQwSubsystem(const TString &name)
Constructor with name.
virtual void ConstructObjects(TDirectory *folder)
Construct the objects for this subsystem in a folder.
std::vector< ROCID_t > GetROCIds() const
virtual void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)=0
Construct the branch and tree vector.
Int_t RegisterSubbank(const BankID_t bank_id)
Tell the object that it will decode data from this sub-bank in the ROC currently open for registratio...
void SetDataLoaded(Bool_t flag)
virtual 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)
virtual void ConstructBranch(TTree *tree, TString &prefix)=0
Construct the branch and tree vector.
virtual Int_t LoadCrosstalkDefinition(TString)
Optional crosstalk definition.
ROCID_t fCurrentROC_ID
ROC ID that is currently being processed.
Bool_t HasDataLoaded() const
virtual void ProcessEvent()=0
std::vector< std::vector< std::vector< UInt_t > > > fMarkerWords
Vector of marker words per ROC & subbank associated with this subsystem.
VQwSubsystem * GetSibling(const std::string &name) const
Get the sibling with specified name.
UInt_t fEventTypeMask
Mask of event types.