QwAnalysis
|
Virtual base class for the parity subsystems. More...
#include <QwSubsystemArrayParity.h>
Public Member Functions | |
QwSubsystemArrayParity (QwOptions &options) | |
Constructor with options. More... | |
QwSubsystemArrayParity (const QwSubsystemArrayParity &source) | |
Copy constructor by reference. More... | |
virtual | ~QwSubsystemArrayParity () |
Default destructor. More... | |
VQwSubsystemParity * | GetSubsystemByName (const TString &name) |
Get the subsystem with the specified name. More... | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
Construct a branch and vector for this subsystem with a prefix. More... | |
void | FillTreeVector (std::vector< Double_t > &values) const |
Fill the vector for this subsystem. More... | |
void | FillHistograms () |
Fill the histograms for this subsystem. More... | |
void | FillDB_MPS (QwParityDB *db, TString type) |
Fill the database with MPS-based variables Note that most subsystems don't need to do this. More... | |
void | FillDB (QwParityDB *db, TString type) |
Fill the database. More... | |
void | FillErrDB (QwParityDB *db, TString type) |
QwSubsystemArrayParity & | operator= (const QwSubsystemArrayParity &value) |
Assignment operator. More... | |
QwSubsystemArrayParity & | operator+= (const QwSubsystemArrayParity &value) |
Addition-assignment operator. More... | |
QwSubsystemArrayParity & | operator-= (const QwSubsystemArrayParity &value) |
Subtraction-assignment operator. More... | |
void | Sum (const QwSubsystemArrayParity &value1, const QwSubsystemArrayParity &value2) |
Sum of two subsystem arrays. More... | |
void | Difference (const QwSubsystemArrayParity &value1, const QwSubsystemArrayParity &value2) |
Difference of two subsystem arrays. More... | |
void | Ratio (const QwSubsystemArrayParity &numer, const QwSubsystemArrayParity &denom) |
Ratio of two subsystem arrays. More... | |
void | Scale (Double_t factor) |
Scale this subsystem array. More... | |
void | AccumulateRunningSum (const QwSubsystemArrayParity &value) |
Update the running sums for devices accumulated for the global error non-zero events/patterns. More... | |
void | AccumulateAllRunningSum (const QwSubsystemArrayParity &value) |
Update the running sums for devices check only the error flags at the channel level. Only used for stability checks. More... | |
void | DeaccumulateRunningSum (const QwSubsystemArrayParity &value) |
Remove the entry value from the running sums for devices. More... | |
void | CalculateRunningAverage () |
Calculate the average for all good events. More... | |
void | Blind (const QwBlinder *blinder) |
Blind the asymmetry of this subsystem. More... | |
void | UnBlind (const QwBlinder *blinder) |
Unblind the asymmetry of this subsystem. More... | |
void | Blind (const QwBlinder *blinder, const QwSubsystemArrayParity &yield) |
Blind the difference of this subsystem. More... | |
void | UnBlind (const QwBlinder *blinder, const QwSubsystemArrayParity &yield) |
Unblind the difference of this subsystem. More... | |
Bool_t | ApplySingleEventCuts () |
Apply the single event cuts. More... | |
void | IncrementErrorCounters () |
Update the data elements' error counters based on their internal error flags. More... | |
void | PrintErrorCounters () const |
Report the number of events failed due to HW and event cut failures. More... | |
UInt_t | GetEventcutErrorFlag () const |
Return the error flag to the main routine. More... | |
void | UpdateErrorFlag () |
Update the error flag internally from all the subsystems. More... | |
void | UpdateErrorFlag (const QwSubsystemArrayParity &ev_error) |
update the error flag for each channel in the subsystem array with the corresponding value in the ev_error subsystem array More... | |
void | PrintValue () const |
Print value of all channels. More... | |
void | WritePromptSummary (QwPromptSummary *ps, TString type) |
virtual Bool_t | CheckForEndOfBurst () const |
Public Member Functions inherited from QwSubsystemArray | |
QwSubsystemArray (QwOptions &options, CanContainFn myCanContain) | |
Constructor with options. More... | |
QwSubsystemArray (const QwSubsystemArray &source) | |
Copy constructor by reference. More... | |
virtual | ~QwSubsystemArray () |
Virtual destructor. More... | |
void | SetCodaRunNumber (UInt_t runnum) |
Set the internal record of the CODA run number. More... | |
void | SetCodaSegmentNumber (UInt_t segnum) |
Set the internal record of the CODA segment number. More... | |
void | SetCodaEventNumber (UInt_t evtnum) |
Set the internal record of the CODA event number. More... | |
void | SetCodaEventType (UInt_t evttype) |
Set the internal record of the CODA event type. More... | |
UInt_t | GetCodaRunNumber () const |
Get the internal record of the CODA run number. More... | |
UInt_t | GetCodaSegmentNumber () const |
Get the internal record of the CODA segment number. More... | |
UInt_t | GetCodaEventNumber () const |
Get the internal record of the CODA event number. More... | |
UInt_t | GetCodaEventType () const |
Get the internal record of the CODA event type. More... | |
void | SetCleanParameters (Double_t cleanparameter[3]) |
Set the internal record of the CODA event number. More... | |
void | SetEventTypeMask (const UInt_t mask) |
Set event type mask. More... | |
UInt_t | GetEventTypeMask () const |
Get event type mask. More... | |
UInt_t | UpdateEventTypeMask () |
Update the event type mask from the subsystems. More... | |
void | SetDataLoaded (const Bool_t flag) |
Set data loaded flag. More... | |
Bool_t | HasDataLoaded () const |
Get data loaded flag. More... | |
void | ProcessOptionsToplevel (QwOptions &options) |
Process configuration options for the subsystem array itself. More... | |
void | ProcessOptionsSubsystems (QwOptions &options) |
Process configuration options for all subsystems in the array. More... | |
void | ProcessOptions (QwOptions &options) |
Process configuration options (default behavior) More... | |
void | push_back (VQwSubsystem *subsys) |
Add the subsystem to this array. More... | |
virtual std::vector < VQwSubsystem * > | GetSubsystemByType (const std::string &type) |
Get the list of subsystems of the specified type. More... | |
void | ClearEventData () |
Int_t | ProcessConfigurationBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
Process the event buffer for configuration events. More... | |
Int_t | ProcessEvBuffer (const UInt_t event_type, const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
Process the event buffer for events. More... | |
void | RandomizeEventData (int helicity=0, double time=0.0) |
Randomize the data in this event. More... | |
void | EncodeEventData (std::vector< UInt_t > &buffer) |
Encode the data in this event. More... | |
void | ProcessEvent () |
Process the decoded data in this event. More... | |
void | AtEndOfEventLoop () |
Perform actions at the end of the event loop. More... | |
Bool_t | RequestExternalValue (const TString &name, VQwHardwareChannel *value) const |
Retrieve the variable name from other subsystem arrays. More... | |
const VQwHardwareChannel * | ReturnInternalValue (const TString &name) const |
Retrieve the variable name from subsystems in this subsystem array. More... | |
Bool_t | ReturnInternalValue (const TString &name, VQwHardwareChannel *value) const |
Retrieve the variable name from subsystems in this subsystem array. More... | |
Bool_t | PublishInternalValue (const TString name, const TString desc, const VQwSubsystem *subsys, const VQwHardwareChannel *element) |
Publish the value name with description from a subsystem in this array. More... | |
void | ListPublishedValues () const |
List the published values and description in this subsystem array. More... | |
void | PrintParamFileList () const |
Print list of parameter files. More... | |
TList * | GetParamFileNameList (TString name) const |
Get list of parameter files. More... | |
void | PrintInfo () const |
Print some information about the subsystem. More... | |
void | push_back (boost::shared_ptr< VQwSubsystem > subsys) |
void | ConstructHistograms () |
Construct the histograms for this subsystem. More... | |
void | ConstructHistograms (TDirectory *folder) |
Construct the histograms for this subsystem in a folder. More... | |
void | ConstructHistograms (TDirectory *folder, TString &prefix) |
Construct the histograms for this subsystem in a folder with a prefix. More... | |
void | FillHistograms () |
Fill the histograms for this subsystem. More... | |
void | ShareHistograms (const QwSubsystemArray &source) |
Share the histograms with another subsystem. More... | |
void | ConstructBranchAndVector (TTree *tree, std::vector< Double_t > &values) |
Construct the tree and vector for this subsystem. More... | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
Construct a branch and vector for this subsystem with a prefix. More... | |
void | ConstructBranch (TTree *tree, TString &prefix) |
Construct a branch for this subsystem with a prefix. More... | |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file) |
Construct a branch for this subsystem with a prefix after tree leave trimming. More... | |
void | FillTreeVector (std::vector< Double_t > &values) const |
Fill the vector for this subsystem. More... | |
void | ConstructTree () |
Construct the tree for this subsystem. More... | |
void | ConstructTree (TDirectory *folder) |
Construct the tree for this subsystem in a folder. More... | |
void | ConstructTree (TDirectory *folder, TString &prefix) |
Construct the tree for this subsystem in a folder with a prefix. More... | |
void | FillTree () |
Fill the tree for this subsystem. More... | |
void | DeleteTree () |
Delete the tree for this subsystem. More... | |
Data Fields | |
const QwSubsystemArrayParity * | dummy_source |
Data Fields inherited from std::vector< T > | |
T | elements |
STL member. More... | |
Static Protected Member Functions | |
static Bool_t | CanContain (VQwSubsystem *subsys) |
Test whether this subsystem array can contain a particular subsystem. More... | |
Static Protected Member Functions inherited from QwSubsystemArray | |
static Bool_t | CanContain (VQwSubsystem *subsys) |
Test whether this subsystem array can contain a particular subsystem. More... | |
Protected Attributes | |
UInt_t | fErrorFlag |
Int_t | fErrorFlagTreeIndex |
Protected Attributes inherited from QwSubsystemArray | |
size_t | fTreeArrayIndex |
UInt_t | fCodaRunNumber |
Index of this data element in root tree. More... | |
UInt_t | fCodaSegmentNumber |
CODA segment number as provided by QwEventBuffer. More... | |
UInt_t | fCodaEventNumber |
CODA event number as provided by QwEventBuffer. More... | |
UInt_t | fCodaEventType |
CODA event type as provided by QwEventBuffer. More... | |
Double_t | fCleanParameter [3] |
UInt_t | fEventTypeMask |
Mask of event types. More... | |
Bool_t | fHasDataLoaded |
Has this array gotten data to be processed? More... | |
CanContainFn | fnCanContain |
Function to determine which subsystems we can accept. More... | |
Private Member Functions | |
QwSubsystemArrayParity () | |
Private default constructor. More... | |
Additional Inherited Members | |
Public Types inherited from QwSubsystemArray | |
typedef Bool_t(* | CanContainFn )(VQwSubsystem *) |
Static Public Member Functions inherited from QwSubsystemArray | |
static void | DefineOptions (QwOptions &options) |
Define configuration options for global array. More... | |
Protected Member Functions inherited from QwSubsystemArray | |
void | LoadSubsystemsFromParameterFile (QwParameterFile &detectors) |
Virtual base class for the parity subsystems.
Virtual base class for the classes containing the event-based information from each parity subsystem. This will define the interfaces used in communicating with the CODA routines.
Definition at line 34 of file QwSubsystemArrayParity.h.
|
private |
Private default constructor.
|
inline |
Constructor with options.
Definition at line 44 of file QwSubsystemArrayParity.h.
QwSubsystemArrayParity::QwSubsystemArrayParity | ( | const QwSubsystemArrayParity & | source | ) |
Copy constructor by reference.
Copy constructor.
Definition at line 19 of file QwSubsystemArrayParity.cc.
References dummy_source, fErrorFlag, and fErrorFlagTreeIndex.
|
virtual |
void QwSubsystemArrayParity::AccumulateAllRunningSum | ( | const QwSubsystemArrayParity & | value | ) |
Update the running sums for devices check only the error flags at the channel level. Only used for stability checks.
Definition at line 316 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::AccumulateRunningSum(), QwLog::endl(), and QwError.
Referenced by QwEventRing::push().
void QwSubsystemArrayParity::AccumulateRunningSum | ( | const QwSubsystemArrayParity & | value | ) |
Update the running sums for devices accumulated for the global error non-zero events/patterns.
Definition at line 282 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::AccumulateRunningSum(), QwLog::endl(), GetEventcutErrorFlag(), and QwError.
Referenced by QwHelicityPattern::AccumulateBurstSum(), QwHelicityPattern::AccumulateRunningBurstSum(), QwHelicityPattern::AccumulateRunningSum(), and main().
Bool_t QwSubsystemArrayParity::ApplySingleEventCuts | ( | ) |
Apply the single event cuts.
Definition at line 478 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::ApplySingleEventCuts(), fErrorFlag, VQwSubsystemParity::GetEventcutErrorFlag(), kEventCutMode3, kGlobalCut, and UpdateErrorFlag().
Referenced by main().
void QwSubsystemArrayParity::Blind | ( | const QwBlinder * | blinder | ) |
Blind the asymmetry of this subsystem.
Definition at line 392 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::Blind(), QwLog::endl(), and QwError.
Referenced by QwBlinder::Blind().
void QwSubsystemArrayParity::Blind | ( | const QwBlinder * | blinder, |
const QwSubsystemArrayParity & | yield | ||
) |
Blind the difference of this subsystem.
Definition at line 411 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::Blind(), QwLog::endl(), and QwError.
void QwSubsystemArrayParity::CalculateRunningAverage | ( | ) |
Calculate the average for all good events.
Definition at line 272 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::CalculateRunningAverage().
Referenced by QwHelicityPattern::CalculateBurstAverage(), QwHelicityPattern::CalculateRunningAverage(), QwHelicityPattern::CalculateRunningBurstAverage(), main(), and QwEventRing::push().
|
inlinestaticprotected |
Test whether this subsystem array can contain a particular subsystem.
Definition at line 135 of file QwSubsystemArrayParity.h.
|
virtual |
Definition at line 260 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::CheckForEndOfBurst().
Referenced by main().
void QwSubsystemArrayParity::ConstructBranchAndVector | ( | TTree * | tree, |
TString & | prefix, | ||
std::vector< Double_t > & | values | ||
) |
Construct a branch and vector for this subsystem with a prefix.
Definition at line 590 of file QwSubsystemArrayParity.cc.
References QwSubsystemArray::ConstructBranchAndVector(), and fErrorFlagTreeIndex.
Referenced by QwHelicityPattern::ConstructBranchAndVector(), and main().
void QwSubsystemArrayParity::DeaccumulateRunningSum | ( | const QwSubsystemArrayParity & | value | ) |
Remove the entry value from the running sums for devices.
Definition at line 352 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::DeaccumulateRunningSum(), QwLog::endl(), and QwError.
Referenced by QwEventRing::pop().
void QwSubsystemArrayParity::Difference | ( | const QwSubsystemArrayParity & | value1, |
const QwSubsystemArrayParity & | value2 | ||
) |
Difference of two subsystem arrays.
Difference of two subsystem arrays
value1 | First subsystem array |
value2 | Second subsystem array |
Definition at line 221 of file QwSubsystemArrayParity.cc.
Referenced by QwHelicityPattern::CalculateAsymmetry().
void QwSubsystemArrayParity::FillDB | ( | QwParityDB * | db, |
TString | type | ||
) |
Fill the database.
Definition at line 55 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::FillDB().
Referenced by QwHelicityPattern::FillDB().
void QwSubsystemArrayParity::FillDB_MPS | ( | QwParityDB * | db, |
TString | type | ||
) |
Fill the database with MPS-based variables Note that most subsystems don't need to do this.
Definition at line 47 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::FillDB_MPS().
Referenced by main().
void QwSubsystemArrayParity::FillErrDB | ( | QwParityDB * | db, |
TString | type | ||
) |
Definition at line 63 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::FillErrDB().
Referenced by QwHelicityPattern::FillErrDB().
void QwSubsystemArrayParity::FillHistograms | ( | ) |
Fill the histograms for this subsystem.
Definition at line 611 of file QwSubsystemArrayParity.cc.
References QwSubsystemArray::FillHistograms(), and GetEventcutErrorFlag().
Referenced by QwHelicityPattern::FillHistograms(), and main().
void QwSubsystemArrayParity::FillTreeVector | ( | std::vector< Double_t > & | values | ) | const |
Fill the vector for this subsystem.
Definition at line 601 of file QwSubsystemArrayParity.cc.
References fErrorFlag, fErrorFlagTreeIndex, and QwSubsystemArray::FillTreeVector().
Referenced by QwHelicityPattern::FillTreeVector(), and main().
|
inline |
Return the error flag to the main routine.
Definition at line 114 of file QwSubsystemArrayParity.h.
References fErrorFlag.
Referenced by AccumulateRunningSum(), FillHistograms(), QwHelicityPattern::GetEventcutErrorFlag(), and QwRegression::LinearRegression().
|
virtual |
Get the subsystem with the specified name.
Reimplemented from QwSubsystemArray.
Definition at line 40 of file QwSubsystemArrayParity.cc.
References QwSubsystemArray::GetSubsystemByName().
Referenced by main().
void QwSubsystemArrayParity::IncrementErrorCounters | ( | ) |
Update the data elements' error counters based on their internal error flags.
Definition at line 516 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::IncrementErrorCounters().
Referenced by QwHelicityPattern::CalculateAsymmetry(), and main().
QwSubsystemArrayParity & QwSubsystemArrayParity::operator+= | ( | const QwSubsystemArrayParity & | value | ) |
Addition-assignment operator.
Addition-assignment operator
value | Subsystem array to add to this array |
Definition at line 130 of file QwSubsystemArrayParity.cc.
References QwLog::endl(), fErrorFlag, and QwError.
QwSubsystemArrayParity & QwSubsystemArrayParity::operator-= | ( | const QwSubsystemArrayParity & | value | ) |
Subtraction-assignment operator.
Subtraction-assignment operator
value | Subsystem array to subtract from this array |
Definition at line 169 of file QwSubsystemArrayParity.cc.
References fErrorFlag.
QwSubsystemArrayParity & QwSubsystemArrayParity::operator= | ( | const QwSubsystemArrayParity & | source | ) |
Assignment operator.
Assignment operator
source | Subsystem array to assign to this array |
Definition at line 88 of file QwSubsystemArrayParity.cc.
References QwLog::endl(), QwSubsystemArray::fCodaEventNumber, fErrorFlag, and QwError.
void QwSubsystemArrayParity::PrintErrorCounters | ( | ) | const |
Report the number of events failed due to HW and event cut failures.
Definition at line 528 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::PrintErrorCounters().
Referenced by main().
void QwSubsystemArrayParity::PrintValue | ( | ) | const |
Print value of all channels.
Definition at line 248 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::PrintValue().
Referenced by main(), QwHelicityPattern::PrintBurstAverage(), QwHelicityPattern::PrintRunningAverage(), and QwHelicityPattern::PrintRunningBurstAverage().
void QwSubsystemArrayParity::Ratio | ( | const QwSubsystemArrayParity & | numer, |
const QwSubsystemArrayParity & | denom | ||
) |
Ratio of two subsystem arrays.
Definition at line 438 of file QwSubsystemArrayParity.cc.
References QwLog::endl(), fErrorFlag, QwError, and VQwSubsystemParity::Ratio().
Referenced by QwHelicityPattern::AccumulateRunningBurstSum(), and QwHelicityPattern::CalculateAsymmetry().
void QwSubsystemArrayParity::Scale | ( | Double_t | factor | ) |
Scale this subsystem array.
Scale this subsystem array
factor | Scale factor |
Definition at line 238 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::Scale().
Referenced by QwHelicityPattern::CalculateAsymmetry().
void QwSubsystemArrayParity::Sum | ( | const QwSubsystemArrayParity & | value1, |
const QwSubsystemArrayParity & | value2 | ||
) |
Sum of two subsystem arrays.
Sum of two subsystem arrays
value1 | First subsystem array |
value2 | Second subsystem array |
Definition at line 203 of file QwSubsystemArrayParity.cc.
Referenced by QwHelicityPattern::CalculateAsymmetry().
|
inline |
Unblind the asymmetry of this subsystem.
Definition at line 96 of file QwSubsystemArrayParity.h.
Referenced by QwBlinder::UnBlind().
|
inline |
Unblind the difference of this subsystem.
Definition at line 101 of file QwSubsystemArrayParity.h.
void QwSubsystemArrayParity::UpdateErrorFlag | ( | ) |
Update the error flag internally from all the subsystems.
Definition at line 574 of file QwSubsystemArrayParity.cc.
References fErrorFlag, and VQwSubsystemParity::UpdateErrorFlag().
Referenced by ApplySingleEventCuts(), QwHelicityPattern::CalculateAsymmetry(), and QwEventRing::push().
void QwSubsystemArrayParity::UpdateErrorFlag | ( | const QwSubsystemArrayParity & | ev_error | ) |
update the error flag for each channel in the subsystem array with the corresponding value in the ev_error subsystem array
Definition at line 538 of file QwSubsystemArrayParity.cc.
References QwLog::endl(), fErrorFlag, QwError, and VQwSubsystemParity::UpdateErrorFlag().
void QwSubsystemArrayParity::WritePromptSummary | ( | QwPromptSummary * | ps, |
TString | type | ||
) |
Definition at line 73 of file QwSubsystemArrayParity.cc.
References VQwSubsystemParity::WritePromptSummary().
Referenced by QwHelicityPattern::WritePromptSummary().
const QwSubsystemArrayParity* QwSubsystemArrayParity::dummy_source |
Definition at line 65 of file QwSubsystemArrayParity.h.
Referenced by QwSubsystemArrayParity().
|
protected |
Definition at line 137 of file QwSubsystemArrayParity.h.
Referenced by ApplySingleEventCuts(), FillTreeVector(), GetEventcutErrorFlag(), operator+=(), operator-=(), operator=(), QwSubsystemArrayParity(), Ratio(), and UpdateErrorFlag().
|
protected |
Definition at line 140 of file QwSubsystemArrayParity.h.
Referenced by ConstructBranchAndVector(), FillTreeVector(), and QwSubsystemArrayParity().