QwAnalysis
|
#include <QwRegressionSubsystem.h>
Public Member Functions | |
QwRegressionSubsystem (TString name) | |
Constructor with just name. (use gQwOptions to initialize the QwRegression baseclass) More... | |
QwRegressionSubsystem (QwOptions &options, TString name) | |
Constructor with only options. More... | |
QwRegressionSubsystem (QwOptions &options, QwSubsystemArrayParity &event, TString name) | |
Constructor with single event. More... | |
QwRegressionSubsystem (const QwRegressionSubsystem &source) | |
~QwRegressionSubsystem () | |
boost::shared_ptr< VQwSubsystem > | GetSharedPointerToStaticObject () |
void | ProcessOptions (QwOptions &options) |
Process the command line options. More... | |
void | AccumulateRunningSum (VQwSubsystem *input) |
Update the running sums. More... | |
void | DeaccumulateRunningSum (VQwSubsystem *value) |
remove one entry from the running sums for devices More... | |
void | CalculateRunningAverage () |
Calculate the average for all good events. More... | |
void | PrintValue () const |
Print values for all channels. More... | |
void | LinearRegression () |
VQwSubsystem & | operator= (VQwSubsystem *value) |
Overloaded Operators. More... | |
VQwSubsystem & | operator+= (VQwSubsystem *value) |
VQwSubsystem & | operator-= (VQwSubsystem *value) |
VQwSubsystem & | operator*= (VQwSubsystem *value) |
VQwSubsystem & | operator/= (VQwSubsystem *value) |
void | Sum (VQwSubsystem *value1, VQwSubsystem *value2) |
void | Difference (VQwSubsystem *value1, VQwSubsystem *value2) |
void | Ratio (VQwSubsystem *value1, VQwSubsystem *value2) |
void | Scale (Double_t value) |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
Construct the branch and tree vector. More... | |
void | FillTreeVector (std::vector< Double_t > &values) const |
Fill the tree vector. 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 | DeleteHistograms () |
void | ConstructBranch (TTree *tree, TString &prefix) |
Construct the branch and tree vector. More... | |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file) |
Construct the branch and tree vector based on the trim file. More... | |
void | UpdateErrorFlag (const VQwSubsystem *ev_error) |
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 More... | |
Int_t | LoadChannelMap (TString) |
Derived functions. More... | |
Int_t | LoadInputParameters (TString) |
Mandatory parameter file definition. More... | |
Int_t | LoadEventCuts (TString) |
Load the event cuts file. More... | |
void | ClearEventData () |
Int_t | ProcessConfigurationBuffer (UInt_t, UInt_t, UInt_t *, UInt_t) |
Int_t | ProcessEvBuffer (UInt_t, UInt_t, UInt_t *, UInt_t) |
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version. More... | |
void | ProcessEvent () |
Bool_t | ApplySingleEventCuts () |
Apply the single event cuts. More... | |
void | IncrementErrorCounters () |
Increment the error counters. More... | |
void | PrintErrorCounters () const |
Report the number of events failed due to HW and event cut failures. More... | |
UInt_t | GetEventcutErrorFlag () |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates. More... | |
![]() | |
VQwSubsystemParity (const TString &name) | |
Constructor with name. More... | |
VQwSubsystemParity (const VQwSubsystemParity &source) | |
Copy constructor. More... | |
virtual | ~VQwSubsystemParity () |
Default destructor. More... | |
virtual 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... | |
virtual void | FillDB (QwParityDB *db, TString type) |
Fill the database. More... | |
virtual void | FillErrDB (QwParityDB *db, TString type) |
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. More... | |
virtual void | Blind (const QwBlinder *blinder) |
Blind the asymmetry of this subsystem. More... | |
virtual void | Blind (const QwBlinder *blinder, const VQwSubsystemParity *subsys) |
Blind the difference of this subsystem. More... | |
virtual void | WritePromptSummary (QwPromptSummary *ps, TString type) |
virtual Bool_t | CheckForEndOfBurst () const |
![]() | |
VQwSubsystem (const TString &name) | |
Constructor with name. More... | |
VQwSubsystem (const VQwSubsystem &orig) | |
Copy constructor by object. More... | |
virtual | ~VQwSubsystem () |
Default destructor. More... | |
TString | GetSubsystemName () const |
Bool_t | HasDataLoaded () const |
void | SetParent (QwSubsystemArray *parent) |
Set the parent of this subsystem to the specified array. More... | |
QwSubsystemArray * | GetParent (const unsigned int parent=0) const |
Get the parent of this subsystem. More... | |
VQwSubsystem * | GetSibling (const std::string &name) const |
Get the sibling with specified name. More... | |
Bool_t | PublishInternalValue (const TString &name, const TString &desc, const VQwHardwareChannel *value) const |
Publish a variable name to the parent subsystem array. More... | |
virtual Bool_t | PublishInternalValues () const |
Publish all variables of the subsystem. More... | |
virtual Bool_t | PublishByRequest (TString device_name) |
Try to publish an internal variable matching the submitted name. More... | |
Bool_t | RequestExternalValue (const TString &name, VQwHardwareChannel *value) const |
Request a named value which is owned by an external subsystem; the request will be handled by the parent subsystem array. More... | |
virtual const VQwHardwareChannel * | ReturnInternalValue (const TString &name) const |
Return a pointer to a varialbe to the parent subsystem array to be delivered to a different subsystem. More... | |
virtual Bool_t | ReturnInternalValue (const TString &name, VQwHardwareChannel *value) const |
Return a named value to the parent subsystem array to be delivered to a different subsystem. More... | |
virtual std::vector< TString > | GetParamFileNameList () |
virtual std::map< TString, TString > | GetDetectorMaps () |
virtual Int_t | LoadDetectorMaps (QwParameterFile &file) |
Parse parameter file to find the map files. More... | |
virtual Int_t | LoadGeometryDefinition (TString mapfile) |
Optional geometry definition. More... | |
virtual Int_t | LoadCrosstalkDefinition (TString mapfile) |
Optional crosstalk definition. More... | |
void | SetEventTypeMask (const UInt_t mask) |
Set event type mask. More... | |
UInt_t | GetEventTypeMask () const |
Get event type mask. More... | |
virtual 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) |
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. More... | |
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. More... | |
virtual void | AtEndOfEventLoop () |
Perform actions at the end of the event loop. More... | |
virtual void | RandomizeEventData (int helicity=0, double time=0.0) |
virtual void | EncodeEventData (std::vector< UInt_t > &buffer) |
virtual void | PrintInfo () const |
Print some information about the subsystem. More... | |
virtual void | PrintDetectorMaps (Bool_t status) const |
virtual void | ConstructHistograms () |
Construct the histograms for this subsystem. More... | |
virtual void | ConstructHistograms (TDirectory *folder) |
Construct the histograms for this subsystem in a folder. More... | |
virtual void | ConstructHistograms (TString &prefix) |
Construct the histograms for this subsystem with a prefix. More... | |
virtual void | ConstructBranchAndVector (TTree *tree, std::vector< Double_t > &values) |
Construct the branch and tree vector. More... | |
virtual void | ConstructTree () |
Construct the tree for this subsystem. More... | |
virtual void | ConstructTree (TDirectory *folder) |
Construct the tree for this subsystem in a folder. More... | |
virtual void | ConstructTree (TString &prefix) |
Construct the tree for this subsystem with a prefix. More... | |
virtual void | ConstructTree (TDirectory *folder, TString &prefix) |
Construct the tree for this subsystem in a folder with a prefix. More... | |
virtual void | FillTree () |
Fill the tree for this subsystem. More... | |
virtual void | DeleteTree () |
Delete the tree for this subsystem. More... | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. More... | |
![]() | |
virtual | ~MQwCloneable () |
Virtual destructor. More... | |
virtual VQwSubsystem * | Clone () const |
Concrete clone method. More... | |
const VQwFactory< VQwSubsystem > * | Factory () const |
Factory getter. More... | |
![]() | |
virtual | ~VQwCloneable () |
Virtual destructor. More... | |
std::string | GetClassName () const |
Get demangled name of this class. More... | |
![]() | |
QwRegression (QwOptions &options, QwSubsystemArrayParity &event, QwHelicityPattern &helicitypattern) | |
Constructor with single event and helicity pattern. More... | |
QwRegression (QwOptions &options, QwSubsystemArrayParity &event) | |
Constructor with single event. More... | |
QwRegression (QwOptions &options, QwHelicityPattern &helicitypattern) | |
Constructor with helicity pattern. More... | |
QwRegression (QwOptions &options) | |
Constructor with only options. More... | |
QwRegression (const QwRegression &source) | |
Copy constructor. More... | |
virtual | ~QwRegression () |
Virtual destructor. More... | |
void | ProcessOptions (QwOptions &options) |
Process the configuration options. More... | |
Int_t | LoadChannelMap (const std::string &mapfile) |
Load the channels and sensitivities. More... | |
Int_t | ConnectChannels (QwSubsystemArrayParity &event, QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff) |
Connect to channels. More... | |
Int_t | ConnectChannels (QwSubsystemArrayParity &event) |
Connect to Channels (event only) More... | |
Int_t | ConnectChannels (QwSubsystemArrayParity &asym, QwSubsystemArrayParity &diff) |
Connect to Channels (asymmetry/difference only) More... | |
void | LinearRegression (EQwRegType type) |
Linear regression. More... | |
void | AccumulateRunningSum (QwRegression value) |
void | CalculateRunningAverage () |
void | PrintValue () const |
void | FillDB (QwParityDB *db, TString datatype) |
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 | FillTreeVector (std::vector< Double_t > &values) const |
Fill the vector for this subsystem. More... | |
Additional Inherited Members | |
![]() | |
enum | EQwRegType { kRegTypeUnknown =0, kRegTypeMps, kRegTypeAsym, kRegTypeDiff } |
Type of regression variable. More... | |
typedef std::vector< std::pair < VQwHardwareChannel *, VQwHardwareChannel * > >::iterator | PairIterator |
typedef std::vector< std::pair < VQwHardwareChannel *, VQwHardwareChannel * > >::const_iterator | PairConstIterator |
![]() | |
static void | DefineOptions () |
Define options function (note: no virtual static functions in C++) More... | |
![]() | |
static VQwSubsystem * | Create (const std::string &name) |
Object creation. More... | |
static QwRegressionSubsystem * | Cast (QwRegressionSubsystem *type) |
Object dynamic cast. More... | |
![]() | |
static void | DefineOptions (QwOptions &options) |
Define the configuration options. More... | |
![]() | |
void | UpdatePublishedValue (const TString &name, VQwHardwareChannel *data_channel) |
void | ClearAllBankRegistrations () |
Clear all registration of ROC and Bank IDs for this subsystem. More... | |
virtual Int_t | RegisterROCNumber (const UInt_t roc_id, const UInt_t bank_id=0) |
Tell the object that it will decode data from this ROC and sub-bank. More... | |
Int_t | RegisterSubbank (const UInt_t bank_id) |
Tell the object that it will decode data from this sub-bank in the ROC currently open for registration. More... | |
Int_t | GetSubbankIndex () const |
Int_t | GetSubbankIndex (const UInt_t roc_id, const UInt_t bank_id) const |
void | SetDataLoaded (Bool_t flag) |
Int_t | FindIndex (const std::vector< UInt_t > &myvec, const UInt_t value) const |
Bool_t | Compare (VQwSubsystem *source) |
![]() | |
MQwHistograms () | |
Default constructor. More... | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. More... | |
virtual | ~MQwHistograms () |
Virtual destructor. More... | |
virtual MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. More... | |
![]() | |
std::pair< EQwRegType, std::string > | ParseRegressionVariable (const std::string &variable) |
Parse regression variable in type and name. More... | |
![]() | |
std::map< TString, VQwHardwareChannel * > | fPublishedInternalValues |
Map of published internal values. More... | |
std::vector< std::vector < TString > > | fPublishList |
List of parameters to be published (loaded at the channel map) More... | |
TString | fSystemName |
Name of this subsystem. More... | |
UInt_t | fEventTypeMask |
Mask of event types. More... | |
Bool_t | fIsDataLoaded |
Has this subsystem gotten data to be processed? More... | |
std::vector< TString > | fDetectorMapsNames |
std::map< TString, TString > | fDetectorMaps |
Int_t | fCurrentROC_ID |
ROC ID that is currently being processed. More... | |
Int_t | fCurrentBank_ID |
Bank ID that is currently being processed. More... | |
std::vector< UInt_t > | fROC_IDs |
Vector of ROC IDs associated with this subsystem. More... | |
std::vector< std::vector < UInt_t > > | fBank_IDs |
Vector of Bank IDs per ROC ID associated with this subsystem. More... | |
std::vector< QwSubsystemArray * > | fArrays |
Vector of pointers to subsystem arrays that contain this subsystem. More... | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. More... | |
![]() | |
bool | fEnableRegression |
Flag to enable regression. More... | |
std::string | fRegressionMapFile |
Regression dependent and independent variable map. More... | |
QwSubsystemArrayParity * | fSubsystemArray |
Single event pointer. More... | |
QwHelicityPattern * | fHelicityPattern |
Helicity pattern pointer. More... | |
UInt_t | fErrorFlag |
std::vector< EQwRegType > | fDependentType |
List of channels to use in the regression. More... | |
std::vector< std::string > | fDependentName |
std::vector< std::vector < EQwRegType > > | fIndependentType |
std::vector< std::vector < std::string > > | fIndependentName |
std::vector< std::vector < Double_t > > | fSensitivity |
std::vector< EQwRegType > | fDependentVarType |
std::vector< std::pair < VQwHardwareChannel *, VQwHardwareChannel * > > | fDependentVar |
std::vector< std::vector < std::pair< Double_t, const VQwHardwareChannel * > > > | fIndependentVar |
Definition at line 30 of file QwRegressionSubsystem.h.
|
inline |
Constructor with just name. (use gQwOptions to initialize the QwRegression baseclass)
Definition at line 39 of file QwRegressionSubsystem.h.
|
inline |
Constructor with only options.
Definition at line 42 of file QwRegressionSubsystem.h.
|
inline |
Constructor with single event.
Definition at line 45 of file QwRegressionSubsystem.h.
References QwLog::endl(), and QwMessage.
|
inline |
Definition at line 50 of file QwRegressionSubsystem.h.
QwRegressionSubsystem::~QwRegressionSubsystem | ( | ) |
Definition at line 17 of file QwRegressionSubsystem.cc.
|
virtual |
Update the running sums.
Implements VQwSubsystemParity.
Definition at line 116 of file QwRegressionSubsystem.cc.
References QwRegression::AccumulateRunningSum().
|
virtual |
Apply the single event cuts.
Implements VQwSubsystemParity.
Definition at line 245 of file QwRegressionSubsystem.cc.
|
virtual |
Calculate the average for all good events.
Implements VQwSubsystemParity.
Definition at line 134 of file QwRegressionSubsystem.cc.
References QwRegression::CalculateRunningAverage().
|
inlinevirtual |
Implements VQwSubsystem.
Definition at line 109 of file QwRegressionSubsystem.h.
References QwRegression::fDependentVar.
|
virtual |
Construct the branch and tree vector.
Implements VQwSubsystem.
Definition at line 165 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
Construct the branch and tree vector based on the trim file.
Implements VQwSubsystem.
Definition at line 172 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar, QwParameterFile::FileHasModuleHeader(), QwParameterFile::ReadUntilNextModule(), and QwParameterFile::RewindToFileStart().
|
inlinevirtual |
Construct the branch and tree vector.
Implements VQwSubsystem.
Definition at line 84 of file QwRegressionSubsystem.h.
References QwRegression::ConstructBranchAndVector().
|
virtual |
Construct the histograms for this subsystem in a folder with a prefix.
Implements VQwSubsystem.
Definition at line 144 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
remove one entry from the running sums for devices
Implements VQwSubsystemParity.
Definition at line 124 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
void QwRegressionSubsystem::DeleteHistograms | ( | ) |
Definition at line 158 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 93 of file QwRegressionSubsystem.cc.
|
virtual |
Fill the histograms for this subsystem.
Implements VQwSubsystem.
Definition at line 151 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
inlinevirtual |
Fill the tree vector.
Implements VQwSubsystem.
Definition at line 87 of file QwRegressionSubsystem.h.
References QwRegression::FillTreeVector().
|
virtual |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
Implements VQwSubsystemParity.
Definition at line 254 of file QwRegressionSubsystem.cc.
boost::shared_ptr< VQwSubsystem > QwRegressionSubsystem::GetSharedPointerToStaticObject | ( | ) |
Definition at line 25 of file QwRegressionSubsystem.cc.
|
virtual |
Increment the error counters.
TODO: Write QwRegressionSubsystem::IncrementErrorCounters
Implements VQwSubsystemParity.
Definition at line 188 of file QwRegressionSubsystem.cc.
|
inline |
Definition at line 68 of file QwRegressionSubsystem.h.
References QwRegression::kRegTypeMps, and QwRegression::LinearRegression().
|
virtual |
Derived functions.
DERIVED FUNCTIONS ///.
Implements VQwSubsystem.
Definition at line 210 of file QwRegressionSubsystem.cc.
|
virtual |
Load the event cuts file.
Implements VQwSubsystemParity.
Definition at line 224 of file QwRegressionSubsystem.cc.
|
virtual |
Mandatory parameter file definition.
Implements VQwSubsystem.
Definition at line 217 of file QwRegressionSubsystem.cc.
VQwSubsystem & QwRegressionSubsystem::operator*= | ( | VQwSubsystem * | value | ) |
Definition at line 63 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 41 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 52 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
VQwSubsystem & QwRegressionSubsystem::operator/= | ( | VQwSubsystem * | value | ) |
Definition at line 74 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
Overloaded Operators.
Implements VQwSubsystemParity.
Definition at line 30 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
Report the number of events failed due to HW and event cut failures.
Implements VQwSubsystemParity.
Definition at line 250 of file QwRegressionSubsystem.cc.
|
virtual |
Print values for all channels.
Reimplemented from VQwSubsystemParity.
Definition at line 139 of file QwRegressionSubsystem.cc.
References QwRegression::PrintValue().
|
virtual |
Implements VQwSubsystem.
Definition at line 231 of file QwRegressionSubsystem.cc.
|
virtual |
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.
Implements VQwSubsystem.
Definition at line 238 of file QwRegressionSubsystem.cc.
|
inlinevirtual |
|
inlinevirtual |
Process the command line options.
Reimplemented from VQwSubsystem.
Definition at line 58 of file QwRegressionSubsystem.h.
References QwRegression::ProcessOptions().
|
virtual |
Implements VQwSubsystemParity.
Definition at line 100 of file QwRegressionSubsystem.cc.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 107 of file QwRegressionSubsystem.cc.
References QwRegression::fDependentVar.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 86 of file QwRegressionSubsystem.cc.
|
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
TODO: Write QwRegressionSubsystem::UpdateErrorFlag
Implements VQwSubsystemParity.
Definition at line 193 of file QwRegressionSubsystem.cc.