QwAnalysis
|
#include <QwCombinedPMT.h>
Public Member Functions | |
QwCombinedPMT () | |
QwCombinedPMT (TString name) | |
QwCombinedPMT (TString subsystemname, TString name) | |
QwCombinedPMT (const QwCombinedPMT &source) | |
virtual | ~QwCombinedPMT () |
void | InitializeChannel (TString name, TString datatosave) |
void | InitializeChannel (TString subsystem, TString name, TString datatosave) |
void | LinkChannel (TString name) |
const QwVQWK_Channel * | GetChannel (const TString name) const |
void | Add (QwIntegrationPMT *pmt, Double_t weight) |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t subelement=0) |
Process the CODA event buffer for this element. More... | |
void | ClearEventData () |
Clear the event data in this element. More... | |
void | PrintErrorCounters () |
void | CalculateSumAndAverage () |
void | SetRandomEventParameters (Double_t mean, Double_t sigma) |
void | SetRandomEventAsymmetry (Double_t asymmetry) |
void | RandomizeEventData (int helicity) |
void | SetHardwareSum (Double_t hwsum, UInt_t sequencenumber=0) |
void | SetEventData (Double_t *block, UInt_t sequencenumber) |
void | EncodeEventData (std::vector< UInt_t > &buffer) |
void | ProcessEvent () |
Bool_t | ApplyHWChecks () |
Bool_t | ApplySingleEventCuts () |
void | PrintErrorCounters () const |
report number of events failed due to HW and event cut failure More... | |
void | SetSingleEventCuts (UInt_t errorflag, Double_t LL, Double_t UL, 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 | SetDefaultSampleSize (Int_t sample_size) |
void | SetEventCutMode (Int_t bcuts) |
UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device More... | |
void | IncrementErrorCounters () |
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 QwCombinedPMT *ev_error) |
void | PrintInfo () const |
Print multiple lines of information about this data element. More... | |
void | PrintValue () const |
Print single line of value and error of this data element. More... | |
QwCombinedPMT & | operator= (const QwCombinedPMT &value) |
QwCombinedPMT & | operator+= (const QwCombinedPMT &value) |
QwCombinedPMT & | operator-= (const QwCombinedPMT &value) |
void | Sum (QwCombinedPMT &value1, QwCombinedPMT &value2) |
void | Difference (QwCombinedPMT &value1, QwCombinedPMT &value2) |
void | Ratio (QwCombinedPMT &numer, QwCombinedPMT &denom) |
void | Scale (Double_t factor) |
void | Normalize (VQwDataElement *denom) |
void | AccumulateRunningSum (const QwCombinedPMT &value) |
void | DeaccumulateRunningSum (QwCombinedPMT &value) |
void | CalculateRunningAverage () |
void | SetBlindability (Bool_t isblindable) |
void | SetNormalizability (Bool_t isnormalizable) |
void | Blind (const QwBlinder *blinder) |
Blind the asymmetry. More... | |
void | Blind (const QwBlinder *blinder, const QwCombinedPMT &yield) |
Blind the difference using the yield. More... | |
void | SetPedestal (Double_t ped) |
void | SetCalibrationFactor (Double_t calib) |
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 &modulelist) |
void | FillTreeVector (std::vector< Double_t > &values) const |
std::vector< QwDBInterface > | GetDBEntry () |
std::vector< QwErrDBInterface > | GetErrDBEntry () |
![]() | |
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... | |
virtual void | LoadChannelParameters (QwParameterFile ¶mfile) |
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... | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. More... | |
Private Attributes | |
Int_t | fDataToSave |
Double_t | fCalibration |
Double_t | fULimit |
Double_t | fLLimit |
Double_t | fSequenceNo_Prev |
Bool_t | fGoodEvent |
std::vector< QwIntegrationPMT * > | fElement |
used to validate sequence number in the IsGoodEvent() More... | |
std::vector< Double_t > | fWeights |
QwIntegrationPMT | fSumADC |
Int_t | fDevice_flag |
Int_t | fDeviceErrorCode |
Bool_t | bEVENTCUTMODE |
Static Private Attributes | |
static const Bool_t | bDEBUG =kFALSE |
Additional Inherited Members | |
![]() | |
enum | EDataToSave { kRaw = 0, kDerived } |
![]() | |
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) |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. More... | |
Definition at line 19 of file QwCombinedPMT.h.
|
inline |
Definition at line 22 of file QwCombinedPMT.h.
References InitializeChannel().
|
inline |
Definition at line 26 of file QwCombinedPMT.h.
References InitializeChannel().
|
inline |
Definition at line 30 of file QwCombinedPMT.h.
References InitializeChannel(), and VQwDataElement::SetSubsystemName().
|
inline |
Definition at line 34 of file QwCombinedPMT.h.
|
inlinevirtual |
Definition at line 41 of file QwCombinedPMT.h.
void QwCombinedPMT::AccumulateRunningSum | ( | const QwCombinedPMT & | value | ) |
Definition at line 283 of file QwCombinedPMT.cc.
References QwIntegrationPMT::AccumulateRunningSum(), and fSumADC.
void QwCombinedPMT::Add | ( | QwIntegrationPMT * | pmt, |
Double_t | weight | ||
) |
Definition at line 10 of file QwCombinedPMT.cc.
References fElement, and fWeights.
Bool_t QwCombinedPMT::ApplyHWChecks | ( | ) |
Definition at line 126 of file QwCombinedPMT.cc.
Bool_t QwCombinedPMT::ApplySingleEventCuts | ( | ) |
Definition at line 195 of file QwCombinedPMT.cc.
References QwIntegrationPMT::ApplySingleEventCuts(), and fSumADC.
void QwCombinedPMT::Blind | ( | const QwBlinder * | blinder | ) |
Blind the asymmetry.
Definition at line 331 of file QwCombinedPMT.cc.
References QwIntegrationPMT::Blind(), and fSumADC.
void QwCombinedPMT::Blind | ( | const QwBlinder * | blinder, |
const QwCombinedPMT & | yield | ||
) |
Blind the difference using the yield.
Definition at line 337 of file QwCombinedPMT.cc.
References QwIntegrationPMT::Blind(), and fSumADC.
void QwCombinedPMT::CalculateRunningAverage | ( | ) |
Definition at line 325 of file QwCombinedPMT.cc.
References QwIntegrationPMT::CalculateRunningAverage(), and fSumADC.
void QwCombinedPMT::CalculateSumAndAverage | ( | ) |
Definition at line 77 of file QwCombinedPMT.cc.
References QwIntegrationPMT::ClearEventData(), fElement, fSumADC, fWeights, VQwDataElement::GetElementName(), QwIntegrationPMT::GetValue(), QwIntegrationPMT::PrintInfo(), and QwIntegrationPMT::Scale().
Referenced by ProcessEvent().
|
virtual |
Clear the event data in this element.
Reimplemented from VQwDataElement.
Definition at line 59 of file QwCombinedPMT.cc.
References QwIntegrationPMT::ClearEventData(), and fSumADC.
void QwCombinedPMT::ConstructBranch | ( | TTree * | tree, |
TString & | prefix | ||
) |
Definition at line 404 of file QwCombinedPMT.cc.
References QwIntegrationPMT::ConstructBranch(), fSumADC, and VQwDataElement::GetElementName().
void QwCombinedPMT::ConstructBranch | ( | TTree * | tree, |
TString & | prefix, | ||
QwParameterFile & | modulelist | ||
) |
Definition at line 418 of file QwCombinedPMT.cc.
References QwIntegrationPMT::ConstructBranch(), QwLog::endl(), fSumADC, VQwDataElement::GetElementName(), QwParameterFile::HasValue(), and QwMessage.
void QwCombinedPMT::ConstructBranchAndVector | ( | TTree * | tree, |
TString & | prefix, | ||
std::vector< Double_t > & | values | ||
) |
Definition at line 389 of file QwCombinedPMT.cc.
References QwIntegrationPMT::ConstructBranchAndVector(), fSumADC, and VQwDataElement::GetElementName().
|
virtual |
Construct the histograms for this data element.
Implements VQwDataElement.
Definition at line 356 of file QwCombinedPMT.cc.
References QwIntegrationPMT::ConstructHistograms(), fSumADC, and VQwDataElement::GetElementName().
void QwCombinedPMT::DeaccumulateRunningSum | ( | QwCombinedPMT & | value | ) |
Definition at line 288 of file QwCombinedPMT.cc.
References QwIntegrationPMT::DeaccumulateRunningSum(), and fSumADC.
void QwCombinedPMT::Difference | ( | QwCombinedPMT & | value1, |
QwCombinedPMT & | value2 | ||
) |
void QwCombinedPMT::EncodeEventData | ( | std::vector< UInt_t > & | buffer | ) |
|
virtual |
Fill the histograms for this data element.
Implements VQwDataElement.
Definition at line 373 of file QwCombinedPMT.cc.
References QwIntegrationPMT::FillHistograms(), fSumADC, and VQwDataElement::GetElementName().
void QwCombinedPMT::FillTreeVector | ( | std::vector< Double_t > & | values | ) | const |
Definition at line 439 of file QwCombinedPMT.cc.
References QwIntegrationPMT::FillTreeVector(), fSumADC, and VQwDataElement::GetElementName().
|
inline |
Definition at line 48 of file QwCombinedPMT.h.
References fSumADC, QwIntegrationPMT::GetChannel(), and VQwDataElement::GetElementName().
Referenced by QwMainCerenkovDetector::PublishInternalValues().
std::vector< QwDBInterface > QwCombinedPMT::GetDBEntry | ( | ) |
Definition at line 450 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::GetDBEntry().
std::vector< QwErrDBInterface > QwCombinedPMT::GetErrDBEntry | ( | ) |
Definition at line 455 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::GetErrDBEntry().
|
inlinevirtual |
return the error flag on this channel/device
Reimplemented from VQwDataElement.
Definition at line 81 of file QwCombinedPMT.h.
References fSumADC, and QwIntegrationPMT::GetEventcutErrorFlag().
Referenced by UpdateErrorFlag().
|
inline |
Definition at line 85 of file QwCombinedPMT.h.
References fSumADC, and QwIntegrationPMT::IncrementErrorCounters().
void QwCombinedPMT::InitializeChannel | ( | TString | name, |
TString | datatosave | ||
) |
Definition at line 18 of file QwCombinedPMT.cc.
References fDataToSave, fSumADC, QwIntegrationPMT::InitializeChannel(), VQwDataElement::kDerived, VQwDataElement::kRaw, SetBlindability(), and VQwDataElement::SetElementName().
Referenced by QwCombinedPMT().
void QwCombinedPMT::InitializeChannel | ( | TString | subsystem, |
TString | name, | ||
TString | datatosave | ||
) |
Definition at line 32 of file QwCombinedPMT.cc.
References fDataToSave, fSumADC, QwIntegrationPMT::InitializeChannel(), VQwDataElement::kDerived, VQwDataElement::kRaw, SetBlindability(), and VQwDataElement::SetElementName().
void QwCombinedPMT::LinkChannel | ( | TString | name | ) |
Definition at line 47 of file QwCombinedPMT.cc.
References fSumADC, VQwDataElement::GetElementName(), QwIntegrationPMT::SetElementName(), and VQwDataElement::SetElementName().
void QwCombinedPMT::Normalize | ( | VQwDataElement * | denom | ) |
Definition at line 317 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::Normalize().
QwCombinedPMT & QwCombinedPMT::operator+= | ( | const QwCombinedPMT & | value | ) |
Definition at line 236 of file QwCombinedPMT.cc.
References fElement, fSumADC, fWeights, and VQwDataElement::GetElementName().
QwCombinedPMT & QwCombinedPMT::operator-= | ( | const QwCombinedPMT & | value | ) |
Definition at line 254 of file QwCombinedPMT.cc.
References fElement, fSumADC, fWeights, and VQwDataElement::GetElementName().
QwCombinedPMT & QwCombinedPMT::operator= | ( | const QwCombinedPMT & | value | ) |
Definition at line 207 of file QwCombinedPMT.cc.
References fElement, fSumADC, fWeights, and VQwDataElement::GetElementName().
void QwCombinedPMT::PrintErrorCounters | ( | ) |
|
virtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwDataElement.
Definition at line 160 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::PrintErrorCounters().
|
virtual |
Print multiple lines of information about this data element.
Reimplemented from VQwDataElement.
Definition at line 349 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::PrintInfo().
|
virtual |
Print single line of value and error of this data element.
Reimplemented from VQwDataElement.
Definition at line 343 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::PrintValue().
|
virtual |
Process the CODA event buffer for this element.
Implements VQwDataElement.
Definition at line 201 of file QwCombinedPMT.cc.
void QwCombinedPMT::ProcessEvent | ( | ) |
Definition at line 144 of file QwCombinedPMT.cc.
References CalculateSumAndAverage().
void QwCombinedPMT::RandomizeEventData | ( | int | helicity | ) |
void QwCombinedPMT::Ratio | ( | QwCombinedPMT & | numer, |
QwCombinedPMT & | denom | ||
) |
Definition at line 303 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::Ratio().
void QwCombinedPMT::Scale | ( | Double_t | factor | ) |
Definition at line 311 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::Scale().
|
inline |
Definition at line 107 of file QwCombinedPMT.h.
References fSumADC, and QwIntegrationPMT::SetBlindability().
Referenced by InitializeChannel(), QwMainCerenkovDetector::LoadChannelMap(), and QwLumi::LoadChannelMap().
void QwCombinedPMT::SetCalibrationFactor | ( | Double_t | calib | ) |
void QwCombinedPMT::SetDefaultSampleSize | ( | Int_t | sample_size | ) |
Definition at line 154 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::SetDefaultSampleSize().
|
inline |
Definition at line 77 of file QwCombinedPMT.h.
References bEVENTCUTMODE, fSumADC, and QwIntegrationPMT::SetEventCutMode().
void QwCombinedPMT::SetEventData | ( | Double_t * | block, |
UInt_t | sequencenumber | ||
) |
Definition at line 71 of file QwCombinedPMT.cc.
References fSumADC, and QwIntegrationPMT::SetEventData().
void QwCombinedPMT::SetHardwareSum | ( | Double_t | hwsum, |
UInt_t | sequencenumber = 0 |
||
) |
Definition at line 66 of file QwCombinedPMT.cc.
|
inline |
Definition at line 108 of file QwCombinedPMT.h.
References fSumADC, and QwIntegrationPMT::SetNormalizability().
Referenced by QwMainCerenkovDetector::LoadChannelMap(), and QwLumi::LoadChannelMap().
void QwCombinedPMT::SetPedestal | ( | Double_t | ped | ) |
void QwCombinedPMT::SetRandomEventAsymmetry | ( | Double_t | asymmetry | ) |
void QwCombinedPMT::SetRandomEventParameters | ( | Double_t | mean, |
Double_t | sigma | ||
) |
|
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 135 of file QwCombinedPMT.cc.
References QwLog::endl(), fSumADC, QwMessage, and QwIntegrationPMT::SetSingleEventCuts().
void QwCombinedPMT::Sum | ( | QwCombinedPMT & | value1, |
QwCombinedPMT & | value2 | ||
) |
|
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 166 of file QwCombinedPMT.cc.
References fElement, fSumADC, GetEventcutErrorFlag(), and QwIntegrationPMT::UpdateErrorFlag().
void QwCombinedPMT::UpdateErrorFlag | ( | const QwCombinedPMT * | ev_error | ) |
Definition at line 175 of file QwCombinedPMT.cc.
References Qw::e, fSumADC, VQwDataElement::GetElementName(), and QwIntegrationPMT::UpdateErrorFlag().
|
staticprivate |
If this set to kFALSE then Event cuts do not depend on HW ckecks. This is set externally through the qweak_beamline_eventcuts.map
Definition at line 157 of file QwCombinedPMT.h.
|
private |
keep the device HW status using a unique code from the QwVQWK_Channel::fDeviceErrorCode
Definition at line 153 of file QwCombinedPMT.h.
Referenced by SetEventCutMode().
|
private |
Definition at line 134 of file QwCombinedPMT.h.
|
private |
Definition at line 133 of file QwCombinedPMT.h.
Referenced by InitializeChannel().
|
private |
Definition at line 146 of file QwCombinedPMT.h.
|
private |
sets the event cut level for the device fDevice_flag=1 Event cuts & HW check, fDevice_flag=0 HW check, fDevice_flag=-1 no check
Definition at line 150 of file QwCombinedPMT.h.
|
private |
used to validate sequence number in the IsGoodEvent()
Definition at line 140 of file QwCombinedPMT.h.
Referenced by Add(), CalculateSumAndAverage(), operator+=(), operator-=(), operator=(), and UpdateErrorFlag().
|
private |
Definition at line 138 of file QwCombinedPMT.h.
|
private |
Definition at line 135 of file QwCombinedPMT.h.
|
private |
Definition at line 136 of file QwCombinedPMT.h.
|
private |
Definition at line 143 of file QwCombinedPMT.h.
Referenced by AccumulateRunningSum(), ApplySingleEventCuts(), Blind(), CalculateRunningAverage(), CalculateSumAndAverage(), ClearEventData(), ConstructBranch(), ConstructBranchAndVector(), ConstructHistograms(), DeaccumulateRunningSum(), Difference(), FillHistograms(), FillTreeVector(), GetChannel(), GetDBEntry(), GetErrDBEntry(), GetEventcutErrorFlag(), IncrementErrorCounters(), InitializeChannel(), LinkChannel(), Normalize(), operator+=(), operator-=(), operator=(), PrintErrorCounters(), PrintInfo(), PrintValue(), Ratio(), Scale(), SetBlindability(), SetDefaultSampleSize(), SetEventCutMode(), SetEventData(), SetNormalizability(), SetSingleEventCuts(), Sum(), and UpdateErrorFlag().
|
private |
Definition at line 135 of file QwCombinedPMT.h.
|
private |
Definition at line 141 of file QwCombinedPMT.h.
Referenced by Add(), CalculateSumAndAverage(), operator+=(), operator-=(), and operator=().