JAPAn
Just Another Parity Analyzer
|
Abstract base class for subsystems participating in parity analysis. More...
#include <VQwSubsystemParity.h>
Public Member Functions | |
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) |
VQwSubsystem & | operator= (VQwSubsystem *value) override=0 |
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value) | |
virtual VQwSubsystem & | operator+= (VQwSubsystem *value)=0 |
virtual VQwSubsystem & | operator-= (VQwSubsystem *value)=0 |
virtual void | Sum (VQwSubsystem *value1, VQwSubsystem *value2) |
virtual void | Difference (VQwSubsystem *value1, VQwSubsystem *value2) |
virtual void | Ratio (VQwSubsystem *numer, VQwSubsystem *denom)=0 |
virtual void | Scale (Double_t factor)=0 |
virtual void | AccumulateRunningSum (VQwSubsystem *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF)=0 |
Update the running sums for devices. | |
virtual void | DeaccumulateRunningSum (VQwSubsystem *value, Int_t ErrorMask=0xFFFFFFF)=0 |
remove one entry from the running sums for devices | |
virtual void | CalculateRunningAverage ()=0 |
Calculate the average for all good events. | |
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 Bool_t | ApplySingleEventCuts ()=0 |
Apply the single event cuts. | |
virtual Bool_t | CheckForBurpFail (const VQwSubsystem *subsys)=0 |
Report the number of events failed due to HW and event cut failures. | |
virtual void | PrintErrorCounters () const =0 |
virtual void | IncrementErrorCounters ()=0 |
Increment the error counters. | |
virtual UInt_t | GetEventcutErrorFlag ()=0 |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates. | |
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 | UpdateErrorFlag (const VQwSubsystem *ev_error)=0 |
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 | |
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 | PrintValue () const |
Print values of all channels. | |
virtual void | WritePromptSummary (QwPromptSummary *, TString) |
virtual Bool_t | CheckForEndOfBurst () const |
virtual void | LoadMockDataParameters (TString) |
![]() | |
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 |
VQwSubsystem * | GetSibling (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 | LoadChannelMap (TString mapfile)=0 |
Mandatory map file definition. | |
virtual Int_t | LoadInputParameters (TString mapfile)=0 |
Mandatory parameter file definition. | |
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 void | ClearEventData ()=0 |
virtual Int_t | ProcessConfigurationBuffer (const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words)=0 |
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 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 version. | |
virtual void | ProcessEvent ()=0 |
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 | ConstructHistograms (TDirectory *folder, TString &prefix)=0 |
Construct the histograms for this subsystem in a folder with a prefix. | |
virtual void | FillHistograms ()=0 |
Fill the histograms for this subsystem. | |
virtual void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values)=0 |
Construct the branch and tree vector. | |
virtual void | ConstructBranchAndVector (TTree *tree, QwRootTreeBranchVector &values) |
Construct the branch and tree vector. | |
virtual void | ConstructBranch (TTree *tree, TString &prefix)=0 |
Construct the branch and tree vector. | |
virtual void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file)=0 |
Construct the branch and tree vector based on the trim file. | |
virtual void | FillTreeVector (QwRootTreeBranchVector &values) const =0 |
Fill the 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_t > | GetROCIds () const |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. | |
![]() | |
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. | |
QwSubsystemArray * | GetParent () const |
Get the parent container for this child object. | |
Private Member Functions | |
VQwSubsystemParity () | |
Private default constructor (not implemented, will throw linker error on use) | |
Additional Inherited Members | |
![]() | |
static void | DefineOptions () |
Define options function (note: no virtual static functions in C++) | |
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) |
![]() | |
MQwHistograms () | |
Default constructor. | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. | |
virtual | ~MQwHistograms () |
Virtual destructor. | |
MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. | |
![]() | |
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 VQwHardwareChannel * | RequestExternalPointer (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. | |
![]() | |
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_t > | fROC_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. | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. | |
Abstract base class for subsystems participating in parity analysis.
Extends VQwSubsystem with parity-specific capabilities including asymmetry formation, blinding support, database output, running sum accumulation, and event cuts. Provides the contract for subsystems that contribute to parity violation measurements and helicity-based analyses.
Definition at line 33 of file VQwSubsystemParity.h.
|
private |
Private default constructor (not implemented, will throw linker error on use)
Referenced by QwBlindDetectorArray::Blind(), Blind(), QwBeamLine::QwBeamLine(), QwBeamLine::QwBeamLine(), QwBeamMod::QwBeamMod(), QwBeamMod::QwBeamMod(), QwBlindDetectorArray::QwBlindDetectorArray(), QwBlindDetectorArray::QwBlindDetectorArray(), QwCombinerSubsystem::QwCombinerSubsystem(), QwCombinerSubsystem::QwCombinerSubsystem(), QwDetectorArray::QwDetectorArray(), QwDetectorArray::QwDetectorArray(), QwHelicity::QwHelicity(), QwHelicity::QwHelicity(), QwIntegratedRaster::QwIntegratedRaster(), QwIntegratedRaster::QwIntegratedRaster(), QwMollerDetector::QwMollerDetector(), QwMollerDetector::QwMollerDetector(), QwScaler::QwScaler(), QwScaler::QwScaler(), VQwDetectorArray::VQwDetectorArray(), VQwDetectorArray::VQwDetectorArray(), and VQwSubsystemParity().
|
inline |
Constructor with name.
Definition at line 41 of file VQwSubsystemParity.h.
References VQwSubsystem::SetEventTypeMask(), and VQwSubsystem::VQwSubsystem().
|
inline |
Copy constructor.
Definition at line 45 of file VQwSubsystemParity.h.
References VQwSubsystem::VQwSubsystem(), and VQwSubsystemParity().
|
inlineoverride |
|
pure virtual |
Update the running sums for devices.
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
Referenced by QwSubsystemArrayParity::AccumulateAllRunningSum(), and QwSubsystemArrayParity::AccumulateRunningSum().
|
pure virtual |
Apply the single event cuts.
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
Referenced by QwSubsystemArrayParity::ApplySingleEventCuts().
|
inlinevirtual |
Blind the asymmetry of this subsystem.
Reimplemented in QwBlindDetectorArray.
Definition at line 140 of file VQwSubsystemParity.h.
Referenced by QwSubsystemArrayParity::Blind(), and QwSubsystemArrayParity::Blind().
|
inlinevirtual |
Blind the difference of this subsystem.
Reimplemented in QwBlindDetectorArray.
Definition at line 142 of file VQwSubsystemParity.h.
References VQwSubsystemParity().
|
pure virtual |
Calculate the average for all good events.
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
Referenced by QwSubsystemArrayParity::CalculateRunningAverage().
|
pure virtual |
Report the number of events failed due to HW and event cut failures.
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwFakeHelicity, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
Referenced by QwSubsystemArrayParity::CheckForBurpFail().
|
inlinevirtual |
Definition at line 150 of file VQwSubsystemParity.h.
Referenced by QwSubsystemArrayParity::CheckForEndOfBurst().
|
pure virtual |
remove one entry from the running sums for devices
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
Referenced by QwSubsystemArrayParity::DeaccumulateRunningSum().
|
inlinevirtual |
Reimplemented in QwIntegratedRaster.
Definition at line 69 of file VQwSubsystemParity.h.
References VQwSubsystem::Compare(), and VQwSubsystem::VQwSubsystem().
|
inlinevirtual |
Fill the database.
Definition at line 55 of file VQwSubsystemParity.h.
Referenced by QwSubsystemArrayParity::FillDB().
|
inlinevirtual |
Fill the database with MPS-based variables Note that most subsystems don't need to do this.
Definition at line 53 of file VQwSubsystemParity.h.
Referenced by QwSubsystemArrayParity::FillDB_MPS().
|
inlinevirtual |
Definition at line 56 of file VQwSubsystemParity.h.
Referenced by QwSubsystemArrayParity::FillErrDB().
|
pure virtual |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
Referenced by QwSubsystemArrayParity::ApplySingleEventCuts(), and UpdateErrorFlag().
|
pure virtual |
Increment the error counters.
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
Referenced by QwSubsystemArrayParity::IncrementErrorCounters().
|
inlineoverridevirtual |
Load the event cuts file.
Reimplemented from VQwSubsystem.
Definition at line 88 of file VQwSubsystemParity.h.
References QwParameterFile::Close(), VQwSubsystem::fDetectorMaps, QwParameterFile::GetParamFileNameContents(), QwParameterFile::GetUInt(), QwParameterFile::HasVariablePair(), QwParameterFile::LineIsEmpty(), LoadEventCuts_Fin(), LoadEventCuts_Init(), LoadEventCuts_Line(), QwParameterFile::ReadNextLine(), QwParameterFile::TrimComment(), and QwParameterFile::TrimWhitespace().
|
inlinevirtual |
Reimplemented in QwBeamLine, QwBeamMod, and VQwDetectorArray.
Definition at line 117 of file VQwSubsystemParity.h.
Referenced by LoadEventCuts().
|
inlinevirtual |
Reimplemented in QwBeamLine, QwBeamMod, and VQwDetectorArray.
Definition at line 115 of file VQwSubsystemParity.h.
Referenced by LoadEventCuts().
|
inlinevirtual |
Reimplemented in QwBeamLine, QwBeamMod, and VQwDetectorArray.
Definition at line 116 of file VQwSubsystemParity.h.
Referenced by LoadEventCuts().
|
inlinevirtual |
Reimplemented in QwBeamLine, and VQwDetectorArray.
Definition at line 152 of file VQwSubsystemParity.h.
Referenced by QwSubsystemArrayParity::LoadMockDataParameters().
|
pure virtual |
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
|
pure virtual |
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
|
overridepure virtual |
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value)
Reimplemented from VQwSubsystem.
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
|
pure virtual |
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
Referenced by QwSubsystemArrayParity::PrintErrorCounters().
|
inlinevirtual |
Print values of all channels.
Reimplemented in QwBeamLine, QwCombinerSubsystem, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
Definition at line 145 of file VQwSubsystemParity.h.
Referenced by QwBeamMod::Print(), and QwSubsystemArrayParity::PrintValue().
|
pure virtual |
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
Referenced by QwSubsystemArrayParity::Ratio().
|
pure virtual |
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
Referenced by QwSubsystemArrayParity::Scale().
|
inlinevirtual |
Reimplemented in QwIntegratedRaster.
Definition at line 62 of file VQwSubsystemParity.h.
References VQwSubsystem::Compare(), and VQwSubsystem::VQwSubsystem().
|
inlinevirtual |
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.
Reimplemented in QwBeamLine.
Definition at line 133 of file VQwSubsystemParity.h.
References GetEventcutErrorFlag().
Referenced by QwSubsystemArrayParity::UpdateErrorFlag(), QwSubsystemArrayParity::UpdateErrorFlag(), and VQwDetectorArray::UpdateErrorFlag().
|
pure virtual |
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
Implemented in QwBeamLine, QwBeamMod, QwCombinerSubsystem, QwHelicity, QwIntegratedRaster, QwMollerDetector, QwScaler, and VQwDetectorArray.
References VQwSubsystem::VQwSubsystem().
|
inlinevirtual |
Reimplemented in QwBeamLine, QwBeamMod, QwIntegratedRaster, and VQwDetectorArray.
Definition at line 147 of file VQwSubsystemParity.h.
Referenced by QwSubsystemArrayParity::WritePromptSummary().