QwAnalysis
|
#include <QwEnergyCalculator.h>
Public Member Functions | |
QwEnergyCalculator () | |
QwEnergyCalculator (TString name) | |
QwEnergyCalculator (TString subsystem, TString name) | |
QwEnergyCalculator (const QwEnergyCalculator &source) | |
virtual | ~QwEnergyCalculator () |
void | InitializeChannel (TString name, TString datatosave) |
void | InitializeChannel (TString subsystem, TString name, TString datatosave) |
void | LoadChannelParameters (QwParameterFile ¶mfile) |
void | ClearEventData () |
Clear the event data in this element. More... | |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t indexnumber) |
Process the CODA event buffer for this element. More... | |
void | ProcessEvent () |
void | PrintValue () const |
Print single line of value and error of this data element. More... | |
void | PrintInfo () const |
Print multiple lines of information about this data element. More... | |
void | SetRootSaveStatus (TString &prefix) |
Bool_t | ApplyHWChecks () |
Bool_t | ApplySingleEventCuts () |
Int_t | SetSingleEventCuts (Double_t mean, Double_t sigma) |
void | SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, Double_t stability) |
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel. More... | |
void | SetEventCutMode (Int_t bcuts) |
void | IncrementErrorCounters () |
void | PrintErrorCounters () const |
report number of events failed due to HW and event cut failure More... | |
UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device More... | |
UInt_t | UpdateErrorFlag () |
Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag". More... | |
void | UpdateErrorFlag (const QwEnergyCalculator *ev_error) |
void | Set (const VQwBPM *device, TString type, TString property, Double_t tmatrix_ratio) |
void | Ratio (QwEnergyCalculator &numer, QwEnergyCalculator &denom) |
void | Scale (Double_t factor) |
virtual QwEnergyCalculator & | operator= (const QwEnergyCalculator &value) |
virtual QwEnergyCalculator & | operator+= (const QwEnergyCalculator &value) |
virtual QwEnergyCalculator & | operator-= (const QwEnergyCalculator &value) |
void | AccumulateRunningSum (const QwEnergyCalculator &value) |
void | DeaccumulateRunningSum (QwEnergyCalculator &value) |
void | CalculateRunningAverage () |
void | ConstructHistograms (TDirectory *folder, TString &prefix) |
Construct the histograms for this data element. More... | |
void | FillHistograms () |
Fill the histograms for this data element. More... | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
void | ConstructBranch (TTree *tree, TString &prefix) |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file) |
void | FillTreeVector (std::vector< Double_t > &values) const |
VQwHardwareChannel * | GetEnergy () |
const VQwHardwareChannel * | GetEnergy () const |
std::vector< QwDBInterface > | GetDBEntry () |
std::vector< QwErrDBInterface > | GetErrDBEntry () |
Public Member Functions inherited from VQwDataElement | |
VQwDataElement () | |
Default constructor. More... | |
VQwDataElement (const VQwDataElement &value) | |
Copy constructor. More... | |
virtual | ~VQwDataElement () |
Virtual destructor. More... | |
Bool_t | IsNameEmpty () const |
Is the name of this element empty? More... | |
void | SetElementName (const TString &name) |
Set the name of this element. More... | |
virtual const TString & | GetElementName () const |
Get the name of this element. More... | |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. More... | |
UInt_t | GetGoodEventCount () const |
virtual void | AssignValueFrom (const VQwDataElement *valueptr) |
virtual VQwDataElement & | operator+= (const VQwDataElement &value) |
Addition-assignment operator. More... | |
virtual VQwDataElement & | operator-= (const VQwDataElement &value) |
Subtraction-assignment operator. More... | |
virtual void | Sum (const VQwDataElement &value1, const VQwDataElement &value2) |
Sum operator. More... | |
virtual void | Difference (const VQwDataElement &value1, const VQwDataElement &value2) |
Difference operator. More... | |
virtual void | Ratio (const VQwDataElement &numer, const VQwDataElement &denom) |
Ratio operator. More... | |
virtual void | SetNeedsExternalClock (Bool_t needed) |
virtual Bool_t | NeedsExternalClock () |
virtual std::string | GetExternalClockName () |
virtual void | SetExternalClockPtr (const VQwHardwareChannel *clock) |
virtual void | SetExternalClockName (const std::string name) |
virtual Double_t | GetNormClockValue () |
TString | GetSubsystemName () const |
Return the name of the inheriting subsystem name. More... | |
void | SetSubsystemName (TString sysname) |
Set the name of the inheriting subsystem name. More... | |
TString | GetModuleType () const |
Return the type of the beam instrument. More... | |
void | SetModuleType (TString ModuleType) |
set the type of the beam instrument More... | |
Public Member Functions inherited from MQwHistograms | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. More... | |
Protected Attributes | |
QwVQWK_Channel | fEnergyChange |
Protected Attributes inherited from VQwDataElement | |
TString | fElementName |
Name of this data element. More... | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. More... | |
Int_t | fGoodEventCount |
Number of good events accumulated in this element. More... | |
TString | fSubsystemName |
TString | fModuleType |
UInt_t | fErrorFlag |
This the standard error code generated for the channel that contains the global/local/stability flags and the Device error code (Unique error code for HW failures) More... | |
UInt_t | fErrorConfigFlag |
contains the global/local/stability flags More... | |
Protected Attributes inherited from MQwHistograms | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. More... | |
Private Attributes | |
std::vector< const VQwBPM * > | fDevice |
std::vector< Double_t > | fTMatrixRatio |
std::vector< TString > | fProperty |
std::vector< TString > | fType |
Int_t | fDeviceErrorCode |
Bool_t | bEVENTCUTMODE |
Bool_t | bFullSave |
Additional Inherited Members | |
Public Types inherited from VQwDataElement | |
enum | EDataToSave { kRaw = 0, kDerived } |
Protected Member Functions inherited from VQwDataElement | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. More... | |
virtual VQwDataElement & | operator= (const VQwDataElement &value) |
Arithmetic assignment operator: Should only copy event-based data. More... | |
virtual void | UpdateErrorFlag (const UInt_t &error) |
Protected Member Functions inherited from MQwHistograms | |
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... | |
Definition at line 27 of file QwEnergyCalculator.h.
|
inline |
Definition at line 39 of file QwEnergyCalculator.h.
|
inline |
Definition at line 40 of file QwEnergyCalculator.h.
References InitializeChannel().
|
inline |
Definition at line 43 of file QwEnergyCalculator.h.
References InitializeChannel().
|
inline |
Definition at line 46 of file QwEnergyCalculator.h.
|
inlinevirtual |
Definition at line 49 of file QwEnergyCalculator.h.
void QwEnergyCalculator::AccumulateRunningSum | ( | const QwEnergyCalculator & | value | ) |
Definition at line 156 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::AccumulateRunningSum(), and fEnergyChange.
Referenced by QwBPMStripline< T >::AccumulateRunningSum().
Bool_t QwEnergyCalculator::ApplyHWChecks | ( | ) |
Definition at line 220 of file QwEnergyCalculator.cc.
Referenced by QwBPMStripline< T >::ProcessEvent().
Bool_t QwEnergyCalculator::ApplySingleEventCuts | ( | ) |
Definition at line 97 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::ApplySingleEventCuts(), fDevice, fEnergyChange, fProperty, and VQwBPM::kXAxis.
Referenced by QwBPMStripline< T >::ApplySingleEventCuts().
void QwEnergyCalculator::CalculateRunningAverage | ( | ) |
Definition at line 150 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::CalculateRunningAverage(), and fEnergyChange.
|
virtual |
Clear the event data in this element.
Reimplemented from VQwDataElement.
Definition at line 60 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::ClearEventData(), and fEnergyChange.
Referenced by QwBPMStripline< T >::ClearEventData().
void QwEnergyCalculator::ConstructBranch | ( | TTree * | tree, |
TString & | prefix | ||
) |
Definition at line 286 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::ConstructBranch(), fEnergyChange, VQwDataElement::GetElementName(), and SetRootSaveStatus().
Referenced by QwBPMStripline< T >::ConstructBranch().
void QwEnergyCalculator::ConstructBranch | ( | TTree * | tree, |
TString & | prefix, | ||
QwParameterFile & | trim_file | ||
) |
Definition at line 301 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::ConstructBranch(), QwLog::endl(), fEnergyChange, VQwDataElement::GetElementName(), QwParameterFile::HasValue(), QwMessage, and SetRootSaveStatus().
void QwEnergyCalculator::ConstructBranchAndVector | ( | TTree * | tree, |
TString & | prefix, | ||
std::vector< Double_t > & | values | ||
) |
Definition at line 267 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::ConstructBranchAndVector(), fEnergyChange, VQwDataElement::GetElementName(), and SetRootSaveStatus().
Referenced by QwBPMStripline< T >::ConstructBranchAndVector().
|
virtual |
Construct the histograms for this data element.
Implements VQwDataElement.
Definition at line 243 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::ConstructHistograms(), fEnergyChange, VQwDataElement::GetElementName(), and SetRootSaveStatus().
Referenced by QwBPMStripline< T >::ConstructHistograms().
void QwEnergyCalculator::DeaccumulateRunningSum | ( | QwEnergyCalculator & | value | ) |
Definition at line 160 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::DeaccumulateRunningSum(), and fEnergyChange.
Referenced by QwBPMStripline< T >::DeaccumulateRunningSum().
|
virtual |
Fill the histograms for this data element.
Implements VQwDataElement.
Definition at line 257 of file QwEnergyCalculator.cc.
References fEnergyChange, QwVQWK_Channel::FillHistograms(), and VQwDataElement::GetElementName().
Referenced by QwBPMStripline< T >::FillHistograms().
void QwEnergyCalculator::FillTreeVector | ( | std::vector< Double_t > & | values | ) | const |
Definition at line 321 of file QwEnergyCalculator.cc.
References fEnergyChange, QwVQWK_Channel::FillTreeVector(), and VQwDataElement::GetElementName().
Referenced by QwBPMStripline< T >::FillTreeVector().
std::vector< QwDBInterface > QwEnergyCalculator::GetDBEntry | ( | ) |
Definition at line 332 of file QwEnergyCalculator.cc.
References VQwHardwareChannel::AddEntriesToList(), and fEnergyChange.
|
inline |
Definition at line 104 of file QwEnergyCalculator.h.
References fEnergyChange.
Referenced by GetEnergy().
|
inline |
Definition at line 108 of file QwEnergyCalculator.h.
References GetEnergy().
std::vector< QwErrDBInterface > QwEnergyCalculator::GetErrDBEntry | ( | ) |
Definition at line 341 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::AddErrEntriesToList(), and fEnergyChange.
|
inlinevirtual |
return the error flag on this channel/device
Reimplemented from VQwDataElement.
Definition at line 76 of file QwEnergyCalculator.h.
References fEnergyChange, and VQwDataElement::GetEventcutErrorFlag().
Referenced by QwBPMStripline< T >::GetEventcutErrorFlag().
void QwEnergyCalculator::IncrementErrorCounters | ( | ) |
Definition at line 119 of file QwEnergyCalculator.cc.
References fEnergyChange, and QwVQWK_Channel::IncrementErrorCounters().
Referenced by QwBPMStripline< T >::IncrementErrorCounters().
void QwEnergyCalculator::InitializeChannel | ( | TString | name, |
TString | datatosave | ||
) |
Definition at line 21 of file QwEnergyCalculator.cc.
References fEnergyChange, QwVQWK_Channel::InitializeChannel(), and VQwDataElement::SetElementName().
Referenced by QwBPMStripline< T >::InitializeChannel(), and QwEnergyCalculator().
void QwEnergyCalculator::InitializeChannel | ( | TString | subsystem, |
TString | name, | ||
TString | datatosave | ||
) |
Definition at line 29 of file QwEnergyCalculator.cc.
References fEnergyChange, QwVQWK_Channel::InitializeChannel(), and VQwDataElement::SetElementName().
|
inlinevirtual |
|
virtual |
Definition at line 178 of file QwEnergyCalculator.cc.
References fEnergyChange, and VQwDataElement::GetElementName().
|
virtual |
Definition at line 186 of file QwEnergyCalculator.cc.
References fEnergyChange, and VQwDataElement::GetElementName().
|
virtual |
Definition at line 171 of file QwEnergyCalculator.cc.
References fEnergyChange, and VQwDataElement::GetElementName().
|
virtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwDataElement.
Definition at line 125 of file QwEnergyCalculator.cc.
References fEnergyChange, and QwVQWK_Channel::PrintErrorCounters().
Referenced by QwBPMStripline< T >::PrintErrorCounters().
|
virtual |
Print multiple lines of information about this data element.
Reimplemented from VQwDataElement.
Definition at line 209 of file QwEnergyCalculator.cc.
References fEnergyChange, and QwVQWK_Channel::PrintInfo().
|
virtual |
Print single line of value and error of this data element.
Reimplemented from VQwDataElement.
Definition at line 215 of file QwEnergyCalculator.cc.
References fEnergyChange, and QwVQWK_Channel::PrintValue().
|
virtual |
Process the CODA event buffer for this element.
Implements VQwDataElement.
Definition at line 166 of file QwEnergyCalculator.cc.
void QwEnergyCalculator::ProcessEvent | ( | ) |
Definition at line 67 of file QwEnergyCalculator.cc.
References QwVQWK_Channel::AddChannelOffset(), QwVQWK_Channel::AssignValueFrom(), QwVQWK_Channel::ClearEventData(), fDevice, fEnergyChange, fProperty, fTMatrixRatio, QwVQWK_Channel::GetValue(), QwVQWK_Channel::InitializeChannel(), VQwBPM::kXAxis, and QwVQWK_Channel::Scale().
void QwEnergyCalculator::Ratio | ( | QwEnergyCalculator & | numer, |
QwEnergyCalculator & | denom | ||
) |
Definition at line 194 of file QwEnergyCalculator.cc.
Referenced by QwBPMStripline< T >::Ratio().
void QwEnergyCalculator::Scale | ( | Double_t | factor | ) |
Definition at line 203 of file QwEnergyCalculator.cc.
References fEnergyChange, and QwVQWK_Channel::Scale().
Referenced by QwBPMStripline< T >::Scale().
void QwEnergyCalculator::Set | ( | const VQwBPM * | device, |
TString | type, | ||
TString | property, | ||
Double_t | tmatrix_ratio | ||
) |
Definition at line 37 of file QwEnergyCalculator.cc.
References fDevice, fProperty, fTMatrixRatio, fType, and VQwDataElement::GetElementName().
|
inline |
Definition at line 70 of file QwEnergyCalculator.h.
References bEVENTCUTMODE, fEnergyChange, and VQwHardwareChannel::SetEventCutMode().
Referenced by QwBPMStripline< T >::SetEventCutMode().
void QwEnergyCalculator::SetRootSaveStatus | ( | TString & | prefix | ) |
Definition at line 52 of file QwEnergyCalculator.cc.
References bFullSave.
Referenced by ConstructBranch(), QwBPMStripline< T >::ConstructBranch(), ConstructBranchAndVector(), QwBPMStripline< T >::ConstructBranchAndVector(), ConstructHistograms(), and QwBPMStripline< T >::ConstructHistograms().
Int_t QwEnergyCalculator::SetSingleEventCuts | ( | Double_t | mean, |
Double_t | sigma | ||
) |
Definition at line 230 of file QwEnergyCalculator.cc.
References fEnergyChange, and VQwHardwareChannel::SetSingleEventCuts().
|
virtual |
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.
Reimplemented from VQwDataElement.
Definition at line 235 of file QwEnergyCalculator.cc.
References QwLog::endl(), fEnergyChange, kBCMErrorFlag, QwMessage, and VQwHardwareChannel::SetSingleEventCuts().
|
virtual |
Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag".
Reimplemented from VQwDataElement.
Definition at line 130 of file QwEnergyCalculator.cc.
References fDevice, fEnergyChange, fProperty, VQwDataElement::GetEventcutErrorFlag(), VQwBPM::kXAxis, and VQwHardwareChannel::UpdateErrorFlag().
void QwEnergyCalculator::UpdateErrorFlag | ( | const QwEnergyCalculator * | ev_error | ) |
Definition at line 145 of file QwEnergyCalculator.cc.
References fEnergyChange, and VQwHardwareChannel::UpdateErrorFlag().
|
private |
Definition at line 125 of file QwEnergyCalculator.h.
Referenced by SetEventCutMode().
|
private |
Definition at line 126 of file QwEnergyCalculator.h.
Referenced by QwBPMStripline< T >::ConstructBranch(), QwBPMStripline< T >::ConstructBranchAndVector(), QwBPMStripline< T >::ConstructHistograms(), QwBPMStripline< T >::FillHistograms(), QwBPMStripline< T >::FillTreeVector(), QwBPMStripline< T >::InitializeChannel(), and SetRootSaveStatus().
|
private |
Definition at line 120 of file QwEnergyCalculator.h.
Referenced by ApplySingleEventCuts(), ProcessEvent(), Set(), and UpdateErrorFlag().
|
private |
Definition at line 124 of file QwEnergyCalculator.h.
|
protected |
Definition at line 116 of file QwEnergyCalculator.h.
Referenced by AccumulateRunningSum(), ApplySingleEventCuts(), CalculateRunningAverage(), ClearEventData(), ConstructBranch(), ConstructBranchAndVector(), ConstructHistograms(), DeaccumulateRunningSum(), FillHistograms(), FillTreeVector(), GetDBEntry(), GetEnergy(), GetErrDBEntry(), GetEventcutErrorFlag(), IncrementErrorCounters(), InitializeChannel(), operator+=(), operator-=(), operator=(), PrintErrorCounters(), PrintInfo(), PrintValue(), ProcessEvent(), Scale(), SetEventCutMode(), SetSingleEventCuts(), and UpdateErrorFlag().
|
private |
Definition at line 122 of file QwEnergyCalculator.h.
Referenced by ApplySingleEventCuts(), ProcessEvent(), Set(), and UpdateErrorFlag().
|
private |
Definition at line 121 of file QwEnergyCalculator.h.
Referenced by ProcessEvent(), and Set().
|
private |
Definition at line 123 of file QwEnergyCalculator.h.
Referenced by Set().