QwAnalysis
|
#include <QwPMT_Channel.h>
Public Member Functions | |
QwPMT_Channel () | |
Default constructor. More... | |
QwPMT_Channel (const QwPMT_Channel &source) | |
Copy constructor. More... | |
QwPMT_Channel (TString name) | |
Constructor with name. More... | |
virtual | ~QwPMT_Channel () |
Virtual destructor. More... | |
void | InitializeChannel (TString name) |
void | ClearEventData () |
Clear the event data in this element. More... | |
void | RandomizeEventData (int helicity, int SlotNum, int ChanNum) |
void | EncodeEventData (std::vector< UInt_t > &TrigBuffer) |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t subelement=0) |
Process the CODA event buffer for this element. More... | |
void | SetValue (Double_t data) |
Double_t | GetValue () const |
void | SetSubbankID (const Int_t bank_index) |
void | SetModule (const Int_t slot_num) |
Int_t | GetSubbankID () const |
Int_t | GetModule () const |
void | ProcessEvent () |
QwPMT_Channel & | operator= (const QwPMT_Channel &value) |
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 | FillTreeVector (std::vector< Double_t > &values) const |
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 | PrintErrorCounters () const |
report number of events failed due to HW and event cut failure More... | |
![]() | |
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 | SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, Double_t stability) |
set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel More... | |
virtual UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device More... | |
virtual UInt_t | UpdateErrorFlag () |
Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag". 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 | |
size_t | fTreeArrayIndex |
size_t | fTreeArrayNumEntries |
Double_t | fValue |
Int_t | fCrate |
ROC number. More... | |
Int_t | fModule |
slot number More... | |
Static Private Attributes | |
static const Bool_t | kDEBUG = kFALSE |
static const Double_t | kPMT_VoltsPerBit = (20./(1<<18)) |
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 24 of file QwPMT_Channel.h.
|
inline |
Default constructor.
Definition at line 31 of file QwPMT_Channel.h.
|
inline |
|
inline |
Constructor with name.
Definition at line 40 of file QwPMT_Channel.h.
References InitializeChannel().
|
inlinevirtual |
|
virtual |
Clear the event data in this element.
Reimplemented from VQwDataElement.
Definition at line 26 of file QwPMT_Channel.cc.
References fValue.
Referenced by InitializeChannel().
void QwPMT_Channel::ConstructBranchAndVector | ( | TTree * | tree, |
TString & | prefix, | ||
std::vector< Double_t > & | values | ||
) |
Definition at line 98 of file QwPMT_Channel.cc.
References fTreeArrayIndex, fTreeArrayNumEntries, and VQwDataElement::GetElementName().
|
virtual |
Construct the histograms for this data element.
Implements VQwDataElement.
Definition at line 67 of file QwPMT_Channel.cc.
References QwHistogramHelper::Construct1DHist(), MQwHistograms::fHistograms, VQwDataElement::GetElementName(), and gQwHists.
void QwPMT_Channel::EncodeEventData | ( | std::vector< UInt_t > & | TrigBuffer | ) |
Definition at line 45 of file QwPMT_Channel.cc.
References fValue, and VQwDataElement::IsNameEmpty().
|
virtual |
Fill the histograms for this data element.
Implements VQwDataElement.
Definition at line 86 of file QwPMT_Channel.cc.
References MQwHistograms::fHistograms, fValue, and VQwDataElement::GetElementName().
void QwPMT_Channel::FillTreeVector | ( | std::vector< Double_t > & | values | ) | const |
Definition at line 114 of file QwPMT_Channel.cc.
References fTreeArrayIndex, fTreeArrayNumEntries, fValue, and VQwDataElement::GetElementName().
|
inline |
|
inline |
|
inline |
Definition at line 57 of file QwPMT_Channel.h.
References fValue.
Referenced by PrintValue().
|
inline |
Definition at line 46 of file QwPMT_Channel.h.
References ClearEventData(), and VQwDataElement::SetElementName().
Referenced by QwPMT_Channel().
QwPMT_Channel & QwPMT_Channel::operator= | ( | const QwPMT_Channel & | value | ) |
Definition at line 135 of file QwPMT_Channel.cc.
References fValue, and VQwDataElement::GetElementName().
|
inlinevirtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwDataElement.
Definition at line 75 of file QwPMT_Channel.h.
|
virtual |
Print multiple lines of information about this data element.
Reimplemented from VQwDataElement.
Definition at line 150 of file QwPMT_Channel.cc.
|
virtual |
Print single line of value and error of this data element.
Reimplemented from VQwDataElement.
Definition at line 142 of file QwPMT_Channel.cc.
References QwLog::endl(), VQwDataElement::GetElementName(), GetValue(), and QwMessage.
|
inlinevirtual |
Process the CODA event buffer for this element.
Implements VQwDataElement.
Definition at line 54 of file QwPMT_Channel.h.
void QwPMT_Channel::ProcessEvent | ( | ) |
Definition at line 61 of file QwPMT_Channel.cc.
void QwPMT_Channel::RandomizeEventData | ( | int | helicity, |
int | SlotNum, | ||
int | ChanNum | ||
) |
|
inline |
|
inline |
|
inline |
|
private |
ROC number.
Definition at line 97 of file QwPMT_Channel.h.
Referenced by GetSubbankID(), and SetSubbankID().
|
private |
slot number
Definition at line 98 of file QwPMT_Channel.h.
Referenced by GetModule(), and SetModule().
|
private |
Definition at line 91 of file QwPMT_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 92 of file QwPMT_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 95 of file QwPMT_Channel.h.
Referenced by ClearEventData(), EncodeEventData(), FillHistograms(), FillTreeVector(), GetValue(), operator=(), RandomizeEventData(), and SetValue().
|
staticprivate |
Definition at line 75 of file QwPMT_Channel.h.
|
staticprivate |
Conversion factor to translate the average bit count in an ADC channel into average voltage. The base factor is roughly 76 uV per count, and zero counts corresponds to zero voltage. Store as the exact value for 20 V range, 18 bit ADC.
Definition at line 85 of file QwPMT_Channel.h.