JAPAn
Just Another Parity Analyzer
|
PMT channel data element for photomultiplier tube readout. More...
#include <QwPMT_Channel.h>
Public Member Functions | |
QwPMT_Channel () | |
Default constructor. | |
QwPMT_Channel (const QwPMT_Channel &source) | |
Copy constructor. | |
QwPMT_Channel (TString name) | |
Constructor with name. | |
~QwPMT_Channel () override | |
Virtual destructor. | |
void | InitializeChannel (TString name) |
void | ClearEventData () override |
Clear the event-scoped ADC word value. | |
void | RandomizeEventData (int helicity, int SlotNum, int ChanNum) |
Generate a mock ADC word for testing. | |
void | EncodeEventData (std::vector< UInt_t > &TrigBuffer) |
Encode this channel's word into the trigger buffer. | |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t subelement=0) override |
Process the CODA event buffer for this element. | |
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 () |
Process the event (no-op for simple PMT channel). | |
QwPMT_Channel & | operator= (const QwPMT_Channel &value) |
Copy-assign from another PMT channel (event-scoped data). | |
QwPMT_Channel & | operator+= (const QwPMT_Channel &value) |
QwPMT_Channel & | operator-= (const QwPMT_Channel &value) |
void | Sum (const QwPMT_Channel &value1, const QwPMT_Channel &value2) |
void | Difference (const QwPMT_Channel &value1, const QwPMT_Channel &value2) |
void | ConstructHistograms (TDirectory *folder, TString &prefix) override |
Create histograms for this channel within an optional folder. | |
void | FillHistograms () override |
Fill histograms for this channel if present. | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) |
Construct a ROOT branch and append a value slot to the vector. | |
void | FillTreeVector (QwRootTreeBranchVector &values) const |
Write this channel's value into the tree vector slot. | |
void | PrintValue () const override |
Print a compact value summary for this PMT channel. | |
void | PrintInfo () const override |
Print a placeholder info line for this PMT channel. | |
void | PrintErrorCounters () const override |
report number of events failed due to HW and event cut failure | |
![]() | |
VQwDataElement () | |
Default constructor. | |
VQwDataElement (const VQwDataElement &value) | |
Copy constructor. | |
~VQwDataElement () override | |
Virtual destructor. | |
void | CopyFrom (const VQwDataElement &value) |
Bool_t | IsNameEmpty () const |
Is the name of this element empty? | |
void | SetElementName (const TString &name) |
Set the name of this element. | |
virtual const TString & | GetElementName () const |
Get the name of this element. | |
virtual void | LoadChannelParameters (QwParameterFile &) |
virtual void | LoadMockDataParameters (QwParameterFile &) |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. | |
UInt_t | GetGoodEventCount () const |
virtual void | AssignValueFrom (const VQwDataElement *) |
VQwDataElement & | operator+= (const VQwDataElement &) |
Addition-assignment operator. | |
VQwDataElement & | operator-= (const VQwDataElement &) |
Subtraction-assignment operator. | |
void | Sum (const VQwDataElement &, const VQwDataElement &) |
Sum operator (base class fallback throws runtime error) | |
void | Difference (const VQwDataElement &, const VQwDataElement &) |
Difference operator (base class fallback throws runtime error) | |
void | Ratio (const VQwDataElement &, const VQwDataElement &) |
Ratio operator (base class fallback throws runtime error) | |
void | SetSingleEventCuts (UInt_t, Double_t, Double_t, Double_t) |
set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel | |
Bool_t | CheckForBurpFail (const VQwDataElement *) |
virtual UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device | |
virtual UInt_t | UpdateErrorFlag () |
Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag". | |
virtual void | SetNeedsExternalClock (Bool_t) |
virtual Bool_t | NeedsExternalClock () |
virtual std::string | GetExternalClockName () |
virtual void | SetExternalClockPtr (const VQwHardwareChannel *) |
virtual void | SetExternalClockName (const std::string) |
virtual Double_t | GetNormClockValue () |
TString | GetSubsystemName () const |
Return the name of the inheriting subsystem name. | |
void | SetSubsystemName (TString sysname) |
Set the name of the inheriting subsystem name. | |
TString | GetModuleType () const |
Return the type of the beam instrument. | |
void | SetModuleType (TString ModuleType) |
set the type of the beam instrument | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. | |
Private Attributes | |
size_t | fTreeArrayIndex |
size_t | fTreeArrayNumEntries |
Double_t | fValue |
Int_t | fCrate |
ROC number. | |
Int_t | fModule |
slot number | |
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 , kMoments } |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. | |
VQwDataElement & | operator= (const VQwDataElement &value) |
Arithmetic assignment operator: Should only copy event-based data. | |
void | UpdateErrorFlag (const UInt_t &error) |
![]() | |
MQwHistograms () | |
Default constructor. | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. | |
virtual | ~MQwHistograms () |
Virtual destructor. | |
MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. | |
![]() | |
TString | fElementName |
Name of this data element. | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. | |
UInt_t | fGoodEventCount |
Number of good events accumulated in this element. | |
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) | |
UInt_t | fErrorConfigFlag |
contains the global/local/stability flags | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. | |
PMT channel data element for photomultiplier tube readout.
Handles data from photomultiplier tube channels including raw values, calibration, and basic data element operations for PMT-based detectors in the tracking system.
Definition at line 29 of file QwPMT_Channel.h.
|
inline |
Default constructor.
Definition at line 36 of file QwPMT_Channel.h.
Referenced by Difference(), operator+=(), operator-=(), operator=(), QwPMT_Channel(), and Sum().
|
inline |
Copy constructor.
Definition at line 41 of file QwPMT_Channel.h.
References QwPMT_Channel(), and VQwDataElement::VQwDataElement().
|
inline |
Constructor with name.
Definition at line 45 of file QwPMT_Channel.h.
References InitializeChannel().
|
inlineoverride |
|
overridevirtual |
Clear the event-scoped ADC word value.
Reimplemented from VQwDataElement.
Definition at line 28 of file QwPMT_Channel.cc.
References fValue.
Referenced by InitializeChannel().
void QwPMT_Channel::ConstructBranchAndVector | ( | TTree * | tree, |
TString & | prefix, | ||
QwRootTreeBranchVector & | values ) |
Construct a ROOT branch and append a value slot to the vector.
tree | Output tree. |
prefix | Branch name prefix. |
values | Output value vector to be appended. |
Definition at line 120 of file QwPMT_Channel.cc.
References fTreeArrayIndex, fTreeArrayNumEntries, VQwDataElement::GetElementName(), QwRootTreeBranchVector::LeafList(), QwRootTreeBranchVector::push_back(), and QwRootTreeBranchVector::size().
|
overridevirtual |
Create histograms for this channel within an optional folder.
folder | Optional ROOT folder to cd() into. |
prefix | Histogram name prefix. |
Implements VQwDataElement.
Definition at line 82 of file QwPMT_Channel.cc.
References MQwHistograms::fHistograms, VQwDataElement::GetElementName(), and gQwHists.
void QwPMT_Channel::Difference | ( | const QwPMT_Channel & | value1, |
const QwPMT_Channel & | value2 ) |
Definition at line 187 of file QwPMT_Channel.cc.
References QwPMT_Channel().
void QwPMT_Channel::EncodeEventData | ( | std::vector< UInt_t > & | TrigBuffer | ) |
Encode this channel's word into the trigger buffer.
Definition at line 54 of file QwPMT_Channel.cc.
References fValue, and VQwDataElement::IsNameEmpty().
|
overridevirtual |
Fill histograms for this channel if present.
Implements VQwDataElement.
Definition at line 102 of file QwPMT_Channel.cc.
References MQwHistograms::fHistograms, fValue, and VQwDataElement::GetElementName().
void QwPMT_Channel::FillTreeVector | ( | QwRootTreeBranchVector & | values | ) | const |
Write this channel's value into the tree vector slot.
Definition at line 136 of file QwPMT_Channel.cc.
References fTreeArrayIndex, fTreeArrayNumEntries, fValue, VQwDataElement::GetElementName(), QwRootTreeBranchVector::SetValue(), and QwRootTreeBranchVector::size().
|
inline |
|
inline |
|
inline |
Definition at line 62 of file QwPMT_Channel.h.
References fValue.
Referenced by PrintValue().
|
inline |
Definition at line 51 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 168 of file QwPMT_Channel.cc.
References fValue, VQwDataElement::GetElementName(), and QwPMT_Channel().
QwPMT_Channel & QwPMT_Channel::operator-= | ( | const QwPMT_Channel & | value | ) |
Definition at line 175 of file QwPMT_Channel.cc.
References fValue, VQwDataElement::GetElementName(), and QwPMT_Channel().
QwPMT_Channel & QwPMT_Channel::operator= | ( | const QwPMT_Channel & | value | ) |
Copy-assign from another PMT channel (event-scoped data).
Definition at line 158 of file QwPMT_Channel.cc.
References fValue, VQwDataElement::GetElementName(), VQwDataElement::operator=(), and QwPMT_Channel().
|
inlineoverridevirtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwDataElement.
Definition at line 84 of file QwPMT_Channel.h.
|
overridevirtual |
Print a placeholder info line for this PMT channel.
Reimplemented from VQwDataElement.
Definition at line 202 of file QwPMT_Channel.cc.
|
overridevirtual |
Print a compact value summary for this PMT channel.
Reimplemented from VQwDataElement.
Definition at line 193 of file QwPMT_Channel.cc.
References QwLog::endl(), VQwDataElement::GetElementName(), GetValue(), and QwMessage.
|
inlineoverridevirtual |
Process the CODA event buffer for this element.
Implements VQwDataElement.
Definition at line 59 of file QwPMT_Channel.h.
References QwBPMStripline< T >::subelement.
void QwPMT_Channel::ProcessEvent | ( | ) |
Process the event (no-op for simple PMT channel).
Definition at line 71 of file QwPMT_Channel.cc.
void QwPMT_Channel::RandomizeEventData | ( | int | helicity, |
int | SlotNum, | ||
int | ChanNum ) |
Generate a mock ADC word for testing.
helicity | Helicity state indicator (unused). |
SlotNum | V775 slot number to encode in the word. |
ChanNum | V775 channel number to encode in the word. |
Definition at line 38 of file QwPMT_Channel.cc.
References fValue.
|
inline |
|
inline |
|
inline |
void QwPMT_Channel::Sum | ( | const QwPMT_Channel & | value1, |
const QwPMT_Channel & | value2 ) |
Definition at line 182 of file QwPMT_Channel.cc.
References QwPMT_Channel().
|
private |
ROC number.
Definition at line 106 of file QwPMT_Channel.h.
Referenced by GetSubbankID(), and SetSubbankID().
|
private |
slot number
Definition at line 107 of file QwPMT_Channel.h.
Referenced by GetModule(), and SetModule().
|
private |
Definition at line 100 of file QwPMT_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 101 of file QwPMT_Channel.h.
Referenced by ConstructBranchAndVector(), and FillTreeVector().
|
private |
Definition at line 104 of file QwPMT_Channel.h.
Referenced by ClearEventData(), EncodeEventData(), FillHistograms(), FillTreeVector(), GetValue(), operator+=(), operator-=(), operator=(), RandomizeEventData(), and SetValue().
|
staticprivate |
Definition at line 91 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 94 of file QwPMT_Channel.h.