JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwCombinerSubsystem Class Reference

#include <QwCombinerSubsystem.h>

+ Inheritance diagram for QwCombinerSubsystem:
+ Collaboration diagram for QwCombinerSubsystem:

Public Member Functions

 QwCombinerSubsystem (const TString name)
 Constructor with just name.
 
 QwCombinerSubsystem (const QwCombinerSubsystem &source)
 
 ~QwCombinerSubsystem () override
 
std::shared_ptr< VQwSubsystemGetSharedPointerToStaticObject ()
 
void AccumulateRunningSum (VQwSubsystem *input, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
 Update the running sums.
 
void DeaccumulateRunningSum (VQwSubsystem *value, Int_t ErrorMask=0xFFFFFFF) override
 remove one entry from the running sums for devices
 
void CalculateRunningAverage () override
 Calculate the average for all good events.
 
void PrintValue () const override
 Print values for all channels.
 
void ProcessData () override
 
VQwSubsystemoperator= (VQwSubsystem *value) override
 Overloaded Operators.
 
VQwSubsystemoperator+= (VQwSubsystem *value) override
 
VQwSubsystemoperator-= (VQwSubsystem *value) override
 
VQwSubsystemoperator*= (VQwSubsystem *value)
 
VQwSubsystemoperator/= (VQwSubsystem *value)
 
void Ratio (VQwSubsystem *value1, VQwSubsystem *value2) override
 
void Scale (Double_t value) override
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
 Construct the branch and tree vector.
 
void FillTreeVector (QwRootTreeBranchVector &values) const override
 Fill the tree vector.
 
void ConstructHistograms (TDirectory *folder, TString &prefix) override
 Construct the histograms for this subsystem in a folder with a prefix.
 
void FillHistograms () override
 Fill the histograms for this subsystem.
 
void DeleteHistograms ()
 
void ConstructBranch (TTree *tree, TString &prefix) override
 Construct the branch and tree vector.
 
void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file) override
 Construct the branch and tree vector based on the trim file.
 
void UpdateErrorFlag (const VQwSubsystem *ev_error) override
 update the error flag in the subsystem level from the top level routines related to stability checks. This will uniquely update the errorflag at each channel based on the error flag in the corresponding channel in the ev_error subsystem
 
Int_t LoadChannelMap (TString) override
 Derived functions.
 
Int_t LoadInputParameters (TString) override
 Mandatory parameter file definition.
 
Int_t LoadEventCuts (TString) override
 Optional event cut file.
 
void ClearEventData () override
 
Int_t ProcessConfigurationBuffer (const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
 
Int_t ProcessEvBuffer (const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
 TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.
 
void ProcessEvent () override
 
Bool_t ApplySingleEventCuts () override
 Apply the single event cuts.
 
Bool_t CheckForBurpFail (const VQwSubsystem *ev_error) override
 Report the number of events failed due to HW and event cut failures.
 
void IncrementErrorCounters () override
 Increment the error counters.
 
void PrintErrorCounters () const override
 
UInt_t GetEventcutErrorFlag () override
 Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
 
- Public Member Functions inherited from VQwSubsystemParity
 VQwSubsystemParity (const TString &name)
 Constructor with name.
 
 VQwSubsystemParity (const VQwSubsystemParity &source)
 Copy constructor.
 
 ~VQwSubsystemParity () override
 Default destructor.
 
virtual void FillDB_MPS (QwParityDB *, TString)
 Fill the database with MPS-based variables Note that most subsystems don't need to do this.
 
virtual void FillDB (QwParityDB *, TString)
 Fill the database.
 
virtual void FillErrDB (QwParityDB *, TString)
 
virtual void Sum (VQwSubsystem *value1, VQwSubsystem *value2)
 
virtual void Difference (VQwSubsystem *value1, VQwSubsystem *value2)
 
Int_t LoadEventCuts (TString filename) override
 Load the event cuts file.
 
virtual void LoadEventCuts_Init ()
 
virtual void LoadEventCuts_Line (QwParameterFile &, TString &, Int_t &)
 
virtual void LoadEventCuts_Fin (Int_t &)
 
virtual UInt_t UpdateErrorFlag ()
 Uses the error flags of contained data elements to update Returns the error flag to the top level routines related to stability checks and ErrorFlag updates.
 
virtual void Blind (const QwBlinder *)
 Blind the asymmetry of this subsystem.
 
virtual void Blind (const QwBlinder *, const VQwSubsystemParity *)
 Blind the difference of this subsystem.
 
virtual void WritePromptSummary (QwPromptSummary *, TString)
 
virtual Bool_t CheckForEndOfBurst () const
 
virtual void LoadMockDataParameters (TString)
 
- Public Member Functions inherited from VQwSubsystem
 VQwSubsystem (const TString &name)
 Constructor with name.
 
 VQwSubsystem (const VQwSubsystem &orig)
 Copy constructor by object.
 
 ~VQwSubsystem () override
 Default destructor.
 
virtual void ProcessOptions (QwOptions &)
 Process the command line options.
 
TString GetName () const
 
Bool_t HasDataLoaded () const
 
VQwSubsystemGetSibling (const std::string &name) const
 Get the sibling with specified name.
 
virtual std::vector< TString > GetParamFileNameList ()
 
virtual std::map< TString, TString > GetDetectorMaps ()
 
Bool_t PublishByRequest (TString) override
 Try to publish an internal variable matching the submitted name.
 
Bool_t PublishInternalValues () const override
 Publish all variables of the subsystem.
 
virtual Int_t LoadDetectorMaps (QwParameterFile &file)
 Parse parameter file to find the map files.
 
virtual Int_t LoadGeometryDefinition (TString)
 Optional geometry definition.
 
virtual Int_t LoadCrosstalkDefinition (TString)
 Optional crosstalk definition.
 
void SetEventTypeMask (const UInt_t mask)
 Set event type mask.
 
UInt_t GetEventTypeMask () const
 Get event type mask.
 
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 ExchangeProcessedData ()
 Request processed data from other subsystems for internal use in the second event processing stage. Not all derived classes will require data from other subsystems.
 
virtual void ProcessEvent_2 ()
 Process the event data again, including data from other subsystems. Not all derived classes will require a second stage of event data processing.
 
virtual void AtEndOfEventLoop ()
 Perform actions at the end of the event loop.
 
virtual void RandomizeEventData (int=0, double=0.0)
 
virtual void EncodeEventData (std::vector< UInt_t > &)
 
virtual void ConstructObjects ()
 Construct the objects for this subsystem.
 
virtual void ConstructObjects (TDirectory *folder)
 Construct the objects for this subsystem in a folder.
 
virtual void ConstructObjects (TString &prefix)
 Construct the objects for this subsystem with a prefix.
 
virtual void ConstructObjects (TDirectory *, TString &)
 Construct the objects for this subsystem in a folder with a prefix.
 
virtual void ConstructHistograms ()
 Construct the histograms for this subsystem.
 
virtual void ConstructHistograms (TDirectory *folder)
 Construct the histograms for this subsystem in a folder.
 
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.
 
virtual void ConstructTree ()
 Construct the tree for this subsystem.
 
virtual void ConstructTree (TDirectory *folder)
 Construct the tree for this subsystem in a folder.
 
virtual void ConstructTree (TString &prefix)
 Construct the tree for this subsystem with a prefix.
 
virtual void ConstructTree (TDirectory *, TString &)
 Construct the tree for this subsystem in a folder with a prefix.
 
virtual void FillTree ()
 Fill the tree for this subsystem.
 
virtual void DeleteTree ()
 Delete the tree for this subsystem.
 
virtual void PrintInfo () const
 Print some information about the subsystem.
 
virtual void PrintDetectorMaps (Bool_t status) const
 
void GetMarkerWordList (const ROCID_t roc_id, const BankID_t bank_id, std::vector< UInt_t > &marker) const
 
std::vector< ROCID_tGetROCIds () const
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects.
 
- Public Member Functions inherited from MQwPublishable_child< QwSubsystemArray, VQwSubsystem >
 MQwPublishable_child ()
 Default constructor Initializes the child object and sets up self-reference for publishing.
 
 MQwPublishable_child (const MQwPublishable_child &source)
 Copy constructor.
 
virtual ~MQwPublishable_child ()
 Virtual destructor.
 
void SetParent (QwSubsystemArray *parent)
 Set the parent container for this child object.
 
QwSubsystemArrayGetParent () const
 Get the parent container for this child object.
 
- Public Member Functions inherited from MQwCloneable< VQwSubsystem, QwCombinerSubsystem >
 ~MQwCloneable () override
 Virtual destructor.
 
VQwSubsystemClone () const override
 Concrete clone method.
 
const VQwFactory< VQwSubsystem > * Factory () const override
 Factory getter.
 
- Public Member Functions inherited from VQwCloneable< VQwSubsystem >
virtual ~VQwCloneable ()
 Virtual destructor.
 
std::string GetClassName () const
 Get demangled name of this class.
 
- Public Member Functions inherited from QwCombiner
 QwCombiner (const TString &name)
 Constructor with name.
 
 QwCombiner (const QwCombiner &source)
 Copy constructor.
 
 ~QwCombiner () override
 Virtual destructor.
 
Int_t LoadChannelMap (const std::string &mapfile) override
 Load the channels and sensitivities.
 
Int_t ConnectChannels (QwSubsystemArrayParity &event) override
 Connect to Channels (event only)
 
Int_t ConnectChannels (QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff) override
 Connect to Channels (asymmetry/difference only)
 
- Public Member Functions inherited from VQwDataHandler
 VQwDataHandler (const TString &name)
 
 VQwDataHandler (const VQwDataHandler &source)
 
virtual void ParseConfigFile (QwParameterFile &file)
 
void SetPointer (QwHelicityPattern *ptr)
 
void SetPointer (QwSubsystemArrayParity *ptr)
 
virtual Int_t ConnectChannels (QwSubsystemArrayParity &, QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff)
 
Int_t ConnectChannels (QwHelicityPattern &helicitypattern)
 
virtual void UpdateBurstCounter (Short_t burstcounter)
 
virtual void FinishDataHandler ()
 
 ~VQwDataHandler () override
 
TString GetName ()
 
void InitRunningSum ()
 
void AccumulateRunningSum ()
 
virtual void AccumulateRunningSum (VQwDataHandler &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)
 
void CalculateRunningAverage ()
 
void PrintValue () const
 
void WritePromptSummary (QwPromptSummary *ps, TString type)
 
virtual void ConstructTreeBranches (QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="")
 
virtual void FillTreeBranches (QwRootFile *treerootfile)
 
virtual void ConstructNTupleFields (QwRootFile *treerootfile, const std::string &treeprefix="", const std::string &branchprefix="")
 RNTuple methods.
 
virtual void FillNTupleFields (QwRootFile *treerootfile)
 
void FillTreeVector (QwRootTreeBranchVector &values) const
 
void ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values)
 
void SetRunLabel (TString x)
 
Int_t LoadChannelMap ()
 
Bool_t PublishInternalValues () const override
 Publish all variables of the subsystem.
 
Bool_t PublishByRequest (TString device_name) override
 Try to publish an internal variable matching the submitted name.
 
- Public Member Functions inherited from MQwPublishable_child< QwDataHandlerArray, VQwDataHandler >
 MQwPublishable_child ()
 Default constructor Initializes the child object and sets up self-reference for publishing.
 
 MQwPublishable_child (const MQwPublishable_child &source)
 Copy constructor.
 
virtual ~MQwPublishable_child ()
 Virtual destructor.
 
void SetParent (QwDataHandlerArray *parent)
 Set the parent container for this child object.
 
QwDataHandlerArrayGetParent () const
 Get the parent container for this child object.
 
- Public Member Functions inherited from MQwCloneable< VQwDataHandler, QwCombiner >
 ~MQwCloneable () override
 Virtual destructor.
 
VQwDataHandlerClone () const override
 Concrete clone method.
 
const VQwFactory< VQwDataHandler > * Factory () const override
 Factory getter.
 
- Public Member Functions inherited from VQwCloneable< VQwDataHandler >
virtual ~VQwCloneable ()
 Virtual destructor.
 
std::string GetClassName () const
 Get demangled name of this class.
 

Additional Inherited Members

- Public Types inherited from QwCombiner
typedef std::vector< VQwHardwareChannel * >::iterator Iterator_HdwChan
 
typedef std::vector< VQwHardwareChannel * >::const_iterator ConstIterator_HdwChan
 
- Public Types inherited from VQwDataHandler
enum  EQwHandleType {
  kHandleTypeUnknown =0 , kHandleTypeMps , kHandleTypeAsym , kHandleTypeDiff ,
  kHandleTypeYield
}
 
typedef std::vector< VQwHardwareChannel * >::iterator Iterator_HdwChan
 
typedef std::vector< VQwHardwareChannel * >::const_iterator ConstIterator_HdwChan
 
- Static Public Member Functions inherited from VQwSubsystem
static void DefineOptions ()
 Define options function (note: no virtual static functions in C++)
 
- Static Public Member Functions inherited from MQwCloneable< VQwSubsystem, QwCombinerSubsystem >
static VQwSubsystemCreate (const std::string &name)
 Object creation.
 
static QwCombinerSubsystemCast (QwCombinerSubsystem *type)
 Object dynamic cast.
 
- Static Public Member Functions inherited from MQwCloneable< VQwDataHandler, QwCombiner >
static VQwDataHandlerCreate (const std::string &name)
 Object creation.
 
static QwCombinerCast (QwCombiner *type)
 Object dynamic cast.
 
void ClearAllBankRegistrations ()
 Clear all registration of ROC and Bank IDs for this subsystem.
 
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.
 
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 registration.
 
Int_t RegisterMarkerWord (const UInt_t markerword)
 
void RegisterRocBankMarker (QwParameterFile &mapstr)
 
Int_t GetSubbankIndex () const
 
Int_t GetSubbankIndex (const ROCID_t roc_id, const BankID_t bank_id) const
 
void SetDataLoaded (Bool_t flag)
 
template<class T>
Int_t FindIndex (const std::vector< T > &myvec, const T value) const
 
Bool_t Compare (VQwSubsystem *source)
 
- Protected Member Functions inherited from MQwHistograms
 MQwHistograms ()
 Default constructor.
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor.
 
virtual ~MQwHistograms ()
 Virtual destructor.
 
MQwHistogramsoperator= (const MQwHistograms &value)
 
void Fill_Pointer (TH1_ptr hist_ptr, Double_t value)
 
void AddHistogram (TH1 *h)
 Register a histogram.
 
- Protected Member Functions inherited from MQwPublishable_child< QwSubsystemArray, VQwSubsystem >
Bool_t RequestExternalValue (const TString &name, VQwHardwareChannel *value) const
 Retrieve the variable name from other subsystem arrays Get the value corresponding to some variable name from a different data array.
 
const VQwHardwareChannelRequestExternalPointer (const TString &name) const
 Retrieve a pointer to an external variable by name Requests a direct pointer to a variable from sibling subsystems via the parent container.
 
Bool_t PublishInternalValue (const TString name, const TString desc, const VQwHardwareChannel *element) const
 Publish a variable from this child into the parent container.
 
- Protected Member Functions inherited from QwCombiner
 QwCombiner ()
 Default constructor (Protected for child class access)
 
- Protected Member Functions inherited from VQwDataHandler
 VQwDataHandler ()
 
void SetEventcutErrorFlagPointer (const UInt_t *errorflagptr)
 
UInt_t GetEventcutErrorFlag () const
 
std::pair< EQwHandleType, std::string > ParseHandledVariable (const std::string &variable)
 
void CalcOneOutput (const VQwHardwareChannel *dv, VQwHardwareChannel *output, std::vector< const VQwHardwareChannel * > &ivs, std::vector< Double_t > &sens)
 
- Protected Member Functions inherited from MQwPublishable_child< QwDataHandlerArray, VQwDataHandler >
Bool_t RequestExternalValue (const TString &name, VQwHardwareChannel *value) const
 Retrieve the variable name from other subsystem arrays Get the value corresponding to some variable name from a different data array.
 
const VQwHardwareChannelRequestExternalPointer (const TString &name) const
 Retrieve a pointer to an external variable by name Requests a direct pointer to a variable from sibling subsystems via the parent container.
 
Bool_t PublishInternalValue (const TString name, const TString desc, const VQwHardwareChannel *element) const
 Publish a variable from this child into the parent container.
 
- Protected Attributes inherited from VQwSubsystem
std::vector< std::vector< TString > > fPublishList
 
TString fSystemName
 Name of this subsystem.
 
UInt_t fEventTypeMask
 Mask of event types.
 
Bool_t fIsDataLoaded
 Has this subsystem gotten data to be processed?
 
std::vector< TString > fDetectorMapsNames
 Names of loaded detector map files.
 
std::map< TString, TString > fDetectorMaps
 Map of file name to full path or content.
 
ROCID_t fCurrentROC_ID
 ROC ID that is currently being processed.
 
BankID_t fCurrentBank_ID
 Bank ID (and Marker word) that is currently being processed;.
 
std::vector< ROCID_tfROC_IDs
 Vector of ROC IDs associated with this subsystem.
 
std::vector< std::vector< BankID_t > > fBank_IDs
 Vector of Bank IDs per ROC ID associated with this subsystem.
 
std::vector< std::vector< std::vector< UInt_t > > > fMarkerWords
 Vector of marker words per ROC & subbank associated with this subsystem.
 
- Protected Attributes inherited from MQwHistograms
std::vector< TH1_ptrfHistograms
 Histograms associated with this data element.
 
- Protected Attributes inherited from QwCombiner
UInt_t fErrorFlagMask
 Error flag mask.
 
const UInt_t * fErrorFlagPointer
 
std::vector< std::vector< EQwHandleType > > fIndependentType
 List of channels to use in the combiner.
 
std::vector< std::vector< std::string > > fIndependentName
 
std::vector< std::vector< const VQwHardwareChannel * > > fIndependentVar
 
std::vector< std::vector< Double_t > > fSensitivity
 
- Protected Attributes inherited from VQwDataHandler
Int_t fPriority
 
Short_t fBurstCounter
 When a datahandler array is processed, handlers with lower priority will be processed before handlers with higher priority.
 
TString fName
 
std::string fMapFile
 
std::string fTreeName
 
std::string fTreeComment
 
std::string fPrefix
 
TString run_label
 
const UInt_t * fErrorFlagPtr
 Error flag pointer.
 
QwSubsystemArrayParityfSubsystemArray
 Single event pointer.
 
QwHelicityPatternfHelicityPattern
 Helicity pattern pointer.
 
std::vector< std::string > fDependentFull
 
std::vector< EQwHandleTypefDependentType
 
std::vector< std::string > fDependentName
 
std::vector< const VQwHardwareChannel * > fDependentVar
 
std::vector< Double_t > fDependentValues
 
std::vector< VQwHardwareChannel * > fOutputVar
 
std::vector< Double_t > fOutputValues
 
std::vector< std::vector< TString > > fPublishList
 
std::string ParseSeparator
 
Bool_t fKeepRunningSum
 
Bool_t fRunningsumFillsTree
 
VQwDataHandlerfRunningsum
 

Detailed Description

Definition at line 24 of file QwCombinerSubsystem.h.

Constructor & Destructor Documentation

◆ QwCombinerSubsystem() [1/2]

QwCombinerSubsystem::QwCombinerSubsystem ( const TString name)
inline

Constructor with just name.

Definition at line 32 of file QwCombinerSubsystem.h.

33 : VQwSubsystem(name), VQwSubsystemParity(name), QwCombiner(name) { }
QwCombiner()
Default constructor (Protected for child class access)
Definition QwCombiner.h:57
VQwSubsystemParity()
Private default constructor (not implemented, will throw linker error on use)

References QwCombiner::QwCombiner(), VQwSubsystem::VQwSubsystem(), and VQwSubsystemParity::VQwSubsystemParity().

Referenced by AccumulateRunningSum(), DeaccumulateRunningSum(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), and QwCombinerSubsystem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QwCombinerSubsystem() [2/2]

QwCombinerSubsystem::QwCombinerSubsystem ( const QwCombinerSubsystem & source)
inline

Definition at line 36 of file QwCombinerSubsystem.h.

37 : VQwSubsystem(source), VQwSubsystemParity(source), QwCombiner(source) { }

References QwCombiner::QwCombiner(), QwCombinerSubsystem(), VQwSubsystem::VQwSubsystem(), and VQwSubsystemParity::VQwSubsystemParity().

+ Here is the call graph for this function:

◆ ~QwCombinerSubsystem()

QwCombinerSubsystem::~QwCombinerSubsystem ( )
override

Definition at line 17 of file QwCombinerSubsystem.cc.

18{
19}

Member Function Documentation

◆ AccumulateRunningSum()

void QwCombinerSubsystem::AccumulateRunningSum ( VQwSubsystem * input,
Int_t count = 0,
Int_t ErrorMask = 0xFFFFFFF )
overridevirtual

Update the running sums.

Implements VQwSubsystemParity.

Definition at line 102 of file QwCombinerSubsystem.cc.

103{
104 QwCombinerSubsystem* value = dynamic_cast<QwCombinerSubsystem*> (input);
105 if (value!=NULL){
106 QwCombiner::AccumulateRunningSum(*value, count, ErrorMask);
107 }
108}
QwCombinerSubsystem(const TString name)
Constructor with just name.
void AccumulateRunningSum()

References VQwDataHandler::AccumulateRunningSum(), QwCombinerSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ ApplySingleEventCuts()

Bool_t QwCombinerSubsystem::ApplySingleEventCuts ( )
overridevirtual

Apply the single event cuts.

Implements VQwSubsystemParity.

Definition at line 231 of file QwCombinerSubsystem.cc.

232{
233 return true;
234}

◆ CalculateRunningAverage()

void QwCombinerSubsystem::CalculateRunningAverage ( )
overridevirtual

Calculate the average for all good events.

Implements VQwSubsystemParity.

Definition at line 120 of file QwCombinerSubsystem.cc.

References VQwDataHandler::CalculateRunningAverage().

+ Here is the call graph for this function:

◆ CheckForBurpFail()

Bool_t QwCombinerSubsystem::CheckForBurpFail ( const VQwSubsystem * subsys)
inlineoverridevirtual

Report the number of events failed due to HW and event cut failures.

Implements VQwSubsystemParity.

Definition at line 120 of file QwCombinerSubsystem.h.

120 {
121 return kFALSE;
122 };

References VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ ClearEventData()

void QwCombinerSubsystem::ClearEventData ( )
inlineoverridevirtual

Implements VQwSubsystem.

Definition at line 99 of file QwCombinerSubsystem.h.

99 {
100 for (size_t i = 0; i < fOutputVar.size(); ++i) {
101 if (fOutputVar.at(i) != NULL) {
102 fOutputVar.at(i)->ClearEventData();
103 }
104 }
105 /*
106 Iterator_HdwChan element;
107 for (element = fOutputVar.begin(); element != fOutputVar.end(); ++element) {
108 if (*element != NULL) {
109 (*element)->ClearEventData();
110 }
111 }
112 */
113 };
std::vector< VQwHardwareChannel * > fOutputVar

References VQwDataHandler::fOutputVar.

◆ ConstructBranch() [1/2]

void QwCombinerSubsystem::ConstructBranch ( TTree * tree,
TString & prefix )
overridevirtual

Construct the branch and tree vector.

Construct the branches for this subsystem.

Parameters
treeOutput ROOT tree.
prefixName prefix for all branch names.

Implements VQwSubsystem.

Definition at line 151 of file QwCombinerSubsystem.cc.

152{
153 for (size_t i = 0; i < fDependentVar.size(); i++){
154 fOutputVar.at(i)->ConstructBranch(tree, prefix);
155 }
156};
std::vector< const VQwHardwareChannel * > fDependentVar

References VQwDataHandler::fDependentVar, and VQwDataHandler::fOutputVar.

◆ ConstructBranch() [2/2]

void QwCombinerSubsystem::ConstructBranch ( TTree * tree,
TString & prefix,
QwParameterFile & trim_file )
overridevirtual

Construct the branch and tree vector based on the trim file.

Construct the branches for this subsystem using a trim file.

Parameters
treeOutput ROOT tree.
prefixName prefix for all branch names.
trim_fileTrim file describing which branches to construct.

Implements VQwSubsystem.

Definition at line 158 of file QwCombinerSubsystem.cc.

159{
160 TString tmp;
161 std::unique_ptr<QwParameterFile> nextmodule;
162 trim_file.RewindToFileStart();
163 tmp="Combiner";
164 trim_file.RewindToFileStart();
165 if (trim_file.FileHasModuleHeader(tmp)){
166 nextmodule=trim_file.ReadUntilNextModule();//This section contains sub modules and or channels to be included in the tree
167 for (size_t i = 0; i < fDependentVar.size(); i++){
168 fOutputVar.at(i)->ConstructBranch(tree, prefix, *nextmodule);
169 }
170 }
171};
std::unique_ptr< QwParameterFile > ReadUntilNextModule(const bool add_current_line=false)
Bool_t FileHasModuleHeader(const std::string &secname)

References VQwDataHandler::fDependentVar, QwParameterFile::FileHasModuleHeader(), VQwDataHandler::fOutputVar, QwParameterFile::ReadUntilNextModule(), and QwParameterFile::RewindToFileStart().

+ Here is the call graph for this function:

◆ ConstructBranchAndVector()

void QwCombinerSubsystem::ConstructBranchAndVector ( TTree * tree,
TString & prefix,
QwRootTreeBranchVector & values )
inlineoverridevirtual

Construct the branch and tree vector.

Construct the branch and fill the provided values vector.

Parameters
treeOutput ROOT tree to which branches are added.
prefixName prefix for all branch names.
valuesVector that will be filled by FillTreeVector.

Implements VQwSubsystem.

Definition at line 65 of file QwCombinerSubsystem.h.

65 {
66 QwCombiner::ConstructBranchAndVector(tree,prefix,values);
67 }
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)

References VQwDataHandler::ConstructBranchAndVector().

+ Here is the call graph for this function:

◆ ConstructHistograms()

void QwCombinerSubsystem::ConstructHistograms ( TDirectory * folder,
TString & prefix )
overridevirtual

Construct the histograms for this subsystem in a folder with a prefix.

Implements VQwSubsystem.

Definition at line 130 of file QwCombinerSubsystem.cc.

131{
132 for (size_t i = 0; i < fDependentVar.size(); i++){
133 fOutputVar.at(i)->ConstructHistograms(folder,prefix);
134 }
135};

References VQwDataHandler::fDependentVar, and VQwDataHandler::fOutputVar.

◆ DeaccumulateRunningSum()

void QwCombinerSubsystem::DeaccumulateRunningSum ( VQwSubsystem * value,
Int_t ErrorMask = 0xFFFFFFF )
overridevirtual

remove one entry from the running sums for devices

Implements VQwSubsystemParity.

Definition at line 110 of file QwCombinerSubsystem.cc.

111{
112 QwCombinerSubsystem* value = dynamic_cast<QwCombinerSubsystem*> (input);
113 if (value!=NULL) {
114 for (size_t i = 0; i < value-> fDependentVar.size(); i++) {
115 fOutputVar.at(i)->DeaccumulateRunningSum(value->fOutputVar.at(i), ErrorMask);
116 }
117 }
118}

References VQwDataHandler::fDependentVar, VQwDataHandler::fOutputVar, QwCombinerSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ DeleteHistograms()

void QwCombinerSubsystem::DeleteHistograms ( )

Definition at line 144 of file QwCombinerSubsystem.cc.

145{
146 for (size_t i = 0; i < fDependentVar.size(); i++){
147 // fOutputVar.at(i)->DeleteHistograms();
148 }
149};

References VQwDataHandler::fDependentVar.

◆ FillHistograms()

void QwCombinerSubsystem::FillHistograms ( )
overridevirtual

Fill the histograms for this subsystem.

Implements VQwSubsystem.

Definition at line 137 of file QwCombinerSubsystem.cc.

138{
139 for (size_t i = 0; i < fDependentVar.size(); i++){
140 fOutputVar.at(i)->FillHistograms();
141 }
142};

References VQwDataHandler::fDependentVar, and VQwDataHandler::fOutputVar.

◆ FillTreeVector()

void QwCombinerSubsystem::FillTreeVector ( QwRootTreeBranchVector & values) const
inlineoverridevirtual

Fill the tree vector.

Fill the tree export vector with the current event values.

Parameters
valuesOutput vector to be filled.

Implements VQwSubsystem.

Definition at line 68 of file QwCombinerSubsystem.h.

68 {
70 }
void FillTreeVector(QwRootTreeBranchVector &values) const

References VQwDataHandler::FillTreeVector().

+ Here is the call graph for this function:

◆ GetEventcutErrorFlag()

UInt_t QwCombinerSubsystem::GetEventcutErrorFlag ( )
overridevirtual

Return the error flag to the top level routines related to stability checks and ErrorFlag updates.

Implements VQwSubsystemParity.

Definition at line 240 of file QwCombinerSubsystem.cc.

241{
242 return 0;
243
244}

◆ GetSharedPointerToStaticObject()

std::shared_ptr< VQwSubsystem > QwCombinerSubsystem::GetSharedPointerToStaticObject ( )

Definition at line 25 of file QwCombinerSubsystem.cc.

25 {
26 std::shared_ptr<VQwSubsystem> px(this, null_deleter());
27 return px;
28}

◆ IncrementErrorCounters()

void QwCombinerSubsystem::IncrementErrorCounters ( )
overridevirtual

Increment the error counters.

TODO: Write QwCombinerSubsystem::IncrementErrorCounters

Implements VQwSubsystemParity.

Definition at line 174 of file QwCombinerSubsystem.cc.

175{
176 /// TODO: Write QwCombinerSubsystem::IncrementErrorCounters
177}

◆ LoadChannelMap()

Int_t QwCombinerSubsystem::LoadChannelMap ( TString )
overridevirtual

Derived functions.

DERIVED FUNCTIONS ///.

Implements VQwSubsystem.

Definition at line 196 of file QwCombinerSubsystem.cc.

197{
198 Int_t sample = 0;
199 return sample;
200}

◆ LoadEventCuts()

Int_t QwCombinerSubsystem::LoadEventCuts ( TString )
overridevirtual

Optional event cut file.

Reimplemented from VQwSubsystem.

Definition at line 210 of file QwCombinerSubsystem.cc.

211{
212 Int_t sample = 0;
213 return sample;
214
215}

◆ LoadInputParameters()

Int_t QwCombinerSubsystem::LoadInputParameters ( TString mapfile)
overridevirtual

Mandatory parameter file definition.

Implements VQwSubsystem.

Definition at line 203 of file QwCombinerSubsystem.cc.

204{
205 Int_t sample = 0;
206 return sample;
207}

◆ operator*=()

VQwSubsystem & QwCombinerSubsystem::operator*= ( VQwSubsystem * value)

Definition at line 63 of file QwCombinerSubsystem.cc.

64{
65 QwCombinerSubsystem* input = dynamic_cast<QwCombinerSubsystem*>(value);
66 if (input!=NULL) {
67 for(size_t i = 0; i<input->fDependentVar.size(); i++) {
68 this->fOutputVar.at(i)->MultiplyBy(input->fOutputVar.at(i));
69 }
70 }
71 return *this;
72}

References VQwDataHandler::fDependentVar, VQwDataHandler::fOutputVar, QwCombinerSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ operator+=()

VQwSubsystem & QwCombinerSubsystem::operator+= ( VQwSubsystem * value)
overridevirtual

Implements VQwSubsystemParity.

Definition at line 41 of file QwCombinerSubsystem.cc.

42{
43 QwCombinerSubsystem* input = dynamic_cast<QwCombinerSubsystem*>(value);
44 if (input!=NULL) {
45 for(size_t i = 0; i < input->fDependentVar.size(); i++) {
46 this->fOutputVar.at(i)->AddValueFrom(input->fOutputVar.at(i));
47 }
48 }
49 return *this;
50}

References VQwDataHandler::fDependentVar, VQwDataHandler::fOutputVar, QwCombinerSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ operator-=()

VQwSubsystem & QwCombinerSubsystem::operator-= ( VQwSubsystem * value)
overridevirtual

Implements VQwSubsystemParity.

Definition at line 52 of file QwCombinerSubsystem.cc.

53{
54 QwCombinerSubsystem* input = dynamic_cast<QwCombinerSubsystem*>(value);
55 if (input!=NULL) {
56 for(size_t i = 0; i<input->fDependentVar.size(); i++) {
57 this->fOutputVar.at(i)->SubtractValueFrom(input->fOutputVar.at(i));
58 }
59 }
60 return *this;
61}

References VQwDataHandler::fDependentVar, VQwDataHandler::fOutputVar, QwCombinerSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ operator/=()

VQwSubsystem & QwCombinerSubsystem::operator/= ( VQwSubsystem * value)

Definition at line 74 of file QwCombinerSubsystem.cc.

75{
76 QwCombinerSubsystem* input = dynamic_cast<QwCombinerSubsystem*>(value);
77 if (input!=NULL) {
78 for(size_t i = 0; i<input->fDependentVar.size(); i++) {
79 this->fOutputVar.at(i)->DivideBy(input->fOutputVar.at(i));
80 }
81 }
82 return *this;
83}

References VQwDataHandler::fDependentVar, VQwDataHandler::fOutputVar, QwCombinerSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ operator=()

VQwSubsystem & QwCombinerSubsystem::operator= ( VQwSubsystem * value)
overridevirtual

Overloaded Operators.

Implements VQwSubsystemParity.

Definition at line 30 of file QwCombinerSubsystem.cc.

31{
32 QwCombinerSubsystem* input= dynamic_cast<QwCombinerSubsystem*>(value);
33 if (input!=NULL) {
34 for(size_t i = 0; i < input->fDependentVar.size(); i++) {
35 this->fOutputVar.at(i)->AssignValueFrom(input->fOutputVar.at(i));
36 }
37 }
38 return *this;
39}

References VQwDataHandler::fDependentVar, VQwDataHandler::fOutputVar, QwCombinerSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ PrintErrorCounters()

void QwCombinerSubsystem::PrintErrorCounters ( ) const
overridevirtual

Implements VQwSubsystemParity.

Definition at line 236 of file QwCombinerSubsystem.cc.

237{
238}

◆ PrintValue()

void QwCombinerSubsystem::PrintValue ( ) const
overridevirtual

Print values for all channels.

Reimplemented from VQwSubsystemParity.

Definition at line 125 of file QwCombinerSubsystem.cc.

125 {
127}
void PrintValue() const

References VQwDataHandler::PrintValue().

+ Here is the call graph for this function:

◆ ProcessConfigurationBuffer()

Int_t QwCombinerSubsystem::ProcessConfigurationBuffer ( const ROCID_t roc_id,
const BankID_t bank_id,
UInt_t * buffer,
UInt_t num_words )
overridevirtual

Implements VQwSubsystem.

Definition at line 217 of file QwCombinerSubsystem.cc.

218{
219 Int_t sample = 0;
220 return sample;
221}

◆ ProcessData()

void QwCombinerSubsystem::ProcessData ( )
inlineoverridevirtual

Copy dependent variables to output variables (default processing).

Reimplemented from QwCombiner.

Definition at line 52 of file QwCombinerSubsystem.h.

52 {
54 }
void ProcessData() override

References QwCombiner::ProcessData().

+ Here is the call graph for this function:

◆ ProcessEvBuffer()

Int_t QwCombinerSubsystem::ProcessEvBuffer ( const ROCID_t roc_id,
const BankID_t bank_id,
UInt_t * buffer,
UInt_t num_words )
overridevirtual

TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.

Implements VQwSubsystem.

Definition at line 224 of file QwCombinerSubsystem.cc.

225{
226 Int_t sample = 0;
227 return sample;
228}

◆ ProcessEvent()

void QwCombinerSubsystem::ProcessEvent ( )
inlineoverridevirtual

Implements VQwSubsystem.

Definition at line 116 of file QwCombinerSubsystem.h.

116{};

◆ Ratio()

void QwCombinerSubsystem::Ratio ( VQwSubsystem * value1,
VQwSubsystem * value2 )
overridevirtual

Implements VQwSubsystemParity.

Definition at line 86 of file QwCombinerSubsystem.cc.

87{
88 *this = value1;
89 *this /= value2;
90}

References VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

◆ Scale()

void QwCombinerSubsystem::Scale ( Double_t value)
overridevirtual

Implements VQwSubsystemParity.

Definition at line 93 of file QwCombinerSubsystem.cc.

94{
95 for(size_t i = 0; i < this->fDependentVar.size(); i++)
96 {
97 this->fOutputVar.at(i)->Scale(value);
98 }
99
100};

References VQwDataHandler::fDependentVar, and VQwDataHandler::fOutputVar.

◆ UpdateErrorFlag()

void QwCombinerSubsystem::UpdateErrorFlag ( const VQwSubsystem * ev_error)
overridevirtual

update the error flag in the subsystem level from the top level routines related to stability checks. This will uniquely update the errorflag at each channel based on the error flag in the corresponding channel in the ev_error subsystem

TODO: Write QwCombinerSubsystem::UpdateErrorFlag

Implements VQwSubsystemParity.

Definition at line 179 of file QwCombinerSubsystem.cc.

179 {
180 /// TODO: Write QwCombinerSubsystem::UpdateErrorFlag
181 //if (Compare(ev_error)){
182 //QwCombinerSubsystem* input = dynamic_cast<QwCombinerSubsystem*> (ev_error);
183 //}
184};

References VQwSubsystem::VQwSubsystem().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: