|
JAPAn
Just Another Parity Analyzer
|
Templated concrete scaler channel with configurable data masking. More...
#include <QwScaler_Channel.h>
Inheritance diagram for QwScaler_Channel< data_mask, data_shift >:
Collaboration diagram for QwScaler_Channel< data_mask, data_shift >:Public Member Functions | |
| QwScaler_Channel () | |
| QwScaler_Channel (const QwScaler_Channel &source) | |
| QwScaler_Channel (TString name, TString datatosave="raw") | |
| QwScaler_Channel (const QwScaler_Channel &source, VQwDataElement::EDataToSave datatosave) | |
| VQwHardwareChannel * | Clone (VQwDataElement::EDataToSave datatosave) const override |
| void | EncodeEventData (std::vector< UInt_t > &buffer) override |
| Encode the event data into a CODA buffer. | |
| Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) override |
| Process the CODA event buffer for this element. | |
| void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override |
| void | FillTreeVector (QwRootTreeBranchVector &values) const override |
| VQwHardwareChannel * | Clone (VQwDataElement::EDataToSave datatosave) const |
| VQwHardwareChannel * | Clone (VQwDataElement::EDataToSave datatosave) const |
| void | CopyFrom (const VQwScaler_Channel &value) |
| virtual VQwHardwareChannel * | Clone () const |
Public Member Functions inherited from VQwScaler_Channel | |
| VQwScaler_Channel () | |
| VQwScaler_Channel (TString name, TString datatosave="raw") | |
| VQwScaler_Channel (const VQwScaler_Channel &source) | |
| VQwScaler_Channel (const VQwScaler_Channel &source, VQwDataElement::EDataToSave datatosave) | |
| ~VQwScaler_Channel () override | |
| void | CopyFrom (const VQwScaler_Channel &value) |
| void | InitializeChannel (TString name, TString datatosave="raw") override |
| Initialize the fields in this object. | |
| void | InitializeChannel (TString subsystem, TString instrumenttype, TString name, TString datatosave) override |
| Initialize the fields in this object. | |
| void | SetDefaultSampleSize (size_t) |
| void | LoadChannelParameters (QwParameterFile ¶mfile) override |
| void | ClearEventData () override |
| Clear the event data in this element. | |
| void | RandomizeEventData (int helicity=0, double time=0.0) override |
| Internally generate random event data. | |
| void | SetEventData (Double_t value) |
| void | SetRawEventData () override |
| void | SmearByResolution (double resolution) override |
| void | ProcessEvent () override |
| Int_t | GetRawValue (size_t) const override |
| Double_t | GetValue (size_t) const override |
| Double_t | GetValueM2 (size_t) const override |
| Double_t | GetValueError (size_t) const override |
| VQwScaler_Channel & | operator= (const VQwScaler_Channel &value) |
| void | AssignScaledValue (const VQwScaler_Channel &value, Double_t scale) |
| void | AssignValueFrom (const VQwDataElement *valueptr) override |
| void | AddValueFrom (const VQwHardwareChannel *valueptr) override |
| void | SubtractValueFrom (const VQwHardwareChannel *valueptr) override |
| void | MultiplyBy (const VQwHardwareChannel *valueptr) override |
| void | DivideBy (const VQwHardwareChannel *valueptr) override |
| VQwScaler_Channel & | operator+= (const VQwScaler_Channel &value) |
| VQwScaler_Channel & | operator-= (const VQwScaler_Channel &value) |
| VQwScaler_Channel & | operator*= (const VQwScaler_Channel &value) |
| VQwHardwareChannel & | operator+= (const VQwHardwareChannel &input) override |
| VQwHardwareChannel & | operator-= (const VQwHardwareChannel &input) override |
| VQwHardwareChannel & | operator*= (const VQwHardwareChannel &input) override |
| VQwHardwareChannel & | operator/= (const VQwHardwareChannel &input) override |
| void | Sum (VQwScaler_Channel &value1, VQwScaler_Channel &value2) |
| void | Difference (VQwScaler_Channel &value1, VQwScaler_Channel &value2) |
| void | Ratio (const VQwScaler_Channel &numer, const VQwScaler_Channel &denom) |
| void | Product (VQwScaler_Channel &numer, VQwScaler_Channel &denom) |
| void | AddChannelOffset (Double_t Offset) |
| void | Scale (Double_t Offset) override |
| void | DivideBy (const VQwScaler_Channel &denom) |
| Int_t | ApplyHWChecks () override |
| Bool_t | ApplySingleEventCuts () override |
| Bool_t | CheckForBurpFail (const VQwDataElement *) |
| void | IncrementErrorCounters () override |
| void | PrintErrorCounters () const override |
| report number of events failed due to HW and event cut failure | |
| void | ConstructHistograms (TDirectory *folder, TString &prefix) override |
| Construct the histograms for this data element. | |
| void | FillHistograms () override |
| Fill the histograms for this data element. | |
| void | ConstructBranch (TTree *tree, TString &prefix) override |
| void | AccumulateRunningSum (const VQwScaler_Channel &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) |
| void | AccumulateRunningSum (const VQwHardwareChannel *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override |
| void | DeaccumulateRunningSum (const VQwScaler_Channel &value, Int_t ErrorMask) |
| void | PrintValue () const override |
| Print single line of value and error of this data element. | |
| void | PrintInfo () const override |
| Print multiple lines of information about this data element. | |
| void | CalculateRunningAverage () override |
| Bool_t | NeedsExternalClock () override |
| void | SetNeedsExternalClock (Bool_t needed) override |
| std::string | GetExternalClockName () override |
| void | SetExternalClockPtr (const VQwHardwareChannel *clock) override |
| void | SetExternalClockName (const std::string name) override |
| virtual Bool_t | IsDifferentialScaler () |
| virtual void | SetDifferentialScaler (Bool_t diff) |
| void | ScaledAdd (Double_t scale, const VQwHardwareChannel *value) override |
| virtual void | LoadMockDataParameters (QwParameterFile ¶mfile) |
| Load the mock data parameters from the current line in the param file. | |
| Int_t | GetRawValue () const |
| Double_t | GetValue () const |
| Double_t | GetValueM2 () const |
| Double_t | GetValueError () const |
| Double_t | GetValueWidth () const |
| Double_t | GetValueWidth (size_t element) const |
| virtual void | DeaccumulateRunningSum (const VQwHardwareChannel *value, Int_t ErrorMask=0xFFFFFFF) |
Public Member Functions inherited from VQwHardwareChannel | |
| VQwHardwareChannel () | |
| VQwHardwareChannel (const VQwHardwareChannel &value) | |
| VQwHardwareChannel (const VQwHardwareChannel &value, VQwDataElement::EDataToSave datatosave) | |
| ~VQwHardwareChannel () override | |
| void | CopyFrom (const VQwHardwareChannel &value) |
| void | ProcessOptions () |
| size_t | GetNumberOfDataWords () |
| Get the number of data words in this data element. | |
| size_t | GetNumberOfSubelements () |
| Get the number of subelements in this data element. | |
| Int_t | GetRawValue () const |
| Double_t | GetValue () const |
| Double_t | GetValueM2 () const |
| Double_t | GetValueError () const |
| Double_t | GetValueWidth () const |
| Double_t | GetValueWidth (size_t element) const |
| void | InitializeChannel (TString name) |
| Initialize the fields in this object. | |
| void | SetEventCutMode (Int_t bcuts) |
| Bool_t | CheckForBurpFail (const VQwHardwareChannel *event) |
| void | SetSingleEventCuts (Double_t min, Double_t max) |
| Set the upper and lower limits (fULimit and fLLimit) for this channel. | |
| void | SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, Double_t stability=-1.0, Double_t BurpLevel=-1.0) |
| Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel. | |
| Double_t | GetEventCutUpperLimit () const |
| Double_t | GetEventCutLowerLimit () const |
| Double_t | GetStabilityLimit () const |
| UInt_t | UpdateErrorFlag () override |
| Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag". | |
| void | UpdateErrorFlag (const VQwHardwareChannel &elem) |
| virtual UInt_t | GetErrorCode () const |
| VQwHardwareChannel & | operator= (const VQwHardwareChannel &value) |
| Arithmetic assignment operator: Should only copy event-based data. | |
| void | AssignScaledValue (const VQwHardwareChannel &value, Double_t scale) |
| void | Ratio (const VQwHardwareChannel *numer, const VQwHardwareChannel *denom) |
| void | SetPedestal (Double_t ped) |
| Double_t | GetPedestal () const |
| void | SetCalibrationFactor (Double_t factor) |
| Double_t | GetCalibrationFactor () const |
| void | AddEntriesToList (std::vector< QwDBInterface > &row_list) |
| virtual void | AddErrEntriesToList (std::vector< QwErrDBInterface > &) |
| void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist) |
| virtual void | CopyParameters (const VQwHardwareChannel *) |
| void | UpdateErrorFlag (const UInt_t &error) |
Public Member Functions inherited from VQwDataElement | |
| 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. | |
| size_t | GetNumberOfDataWords () |
| Get the number of data words in this data element. | |
| UInt_t | GetGoodEventCount () const |
| 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 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 | |
Public Member Functions inherited from MQwHistograms | |
| void | ShareHistograms (const MQwHistograms *source) |
| Share histogram pointers between objects. | |
Public Member Functions inherited from MQwMockable | |
| MQwMockable () | |
| virtual | ~MQwMockable () |
| void | SetRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
| Set a single set of harmonic drift parameters. | |
| void | AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
| Add drift parameters to the internal set. | |
| void | SetRandomEventParameters (Double_t mean, Double_t sigma) |
| Set the normal random event parameters. | |
| void | SetRandomEventAsymmetry (Double_t asymmetry) |
| Set the helicity asymmetry. | |
| Double_t | GetRandomValue () |
| void | UseExternalRandomVariable () |
| Set the flag to use an externally provided random variable. | |
| void | SetExternalRandomVariable (Double_t random_variable) |
| Set the externally provided random variable. | |
| void | SetMockDataAsDiff () |
Additional Inherited Members | |
Public Types inherited from VQwDataElement | |
| enum | EDataToSave { kRaw = 0 , kDerived , kMoments } |
Static Public Member Functions inherited from VQwScaler_Channel | |
| static Int_t | GetBufferOffset (Int_t scalerindex, Int_t wordindex, UInt_t header=1) |
| static void | PrintErrorCounterHead () |
| static void | PrintErrorCounterTail () |
| static void | SetBurpHoldoff (Int_t holdoff) |
Protected Member Functions inherited from VQwScaler_Channel | |
| VQwScaler_Channel & | operator/= (const VQwScaler_Channel &) |
Protected Member Functions inherited from VQwHardwareChannel | |
| void | SetNumberOfDataWords (const UInt_t &numwords) |
| Set the number of data words in this data element. | |
| void | SetNumberOfSubElements (const size_t elements) |
| Set the number of data words in this data element. | |
| void | SetDataToSave (TString datatosave) |
| Set the flag indicating if raw or derived values are in this data element. | |
| void | SetDataToSave (VQwDataElement::EDataToSave datatosave) |
| Set the flag indicating if raw or derived values are in this data element. | |
| void | SetDataToSaveByPrefix (const TString &prefix) |
| Set the flag indicating if raw or derived values are in this data element based on prefix. | |
| void | RangeCheck (size_t element) const |
| Checks that the requested element is in range, to be used in accesses to subelements similar to std::vector::at(). | |
Protected Member Functions inherited from VQwDataElement | |
| 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) |
Protected Member Functions inherited from MQwHistograms | |
| 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. | |
Protected Attributes inherited from VQwScaler_Channel | |
| UInt_t | fHeader |
| UInt_t | fValue_Raw_Old |
| UInt_t | fValue_Raw |
| Double_t | fValue |
| Double_t | fValueM2 |
| Double_t | fValueError |
| const VQwHardwareChannel * | fNormChannelPtr |
| Double_t | fClockNormalization |
| std::string | fNormChannelName |
| Bool_t | fNeedsExternalClock |
| Bool_t | fIsDifferentialScaler |
| Int_t | fNumEvtsWithHWErrors |
| Int_t | fNumEvtsWithEventCutsRejected |
Protected Attributes inherited from VQwHardwareChannel | |
| UInt_t | fNumberOfDataWords |
| Number of raw data words in this data element. | |
| UInt_t | fNumberOfSubElements |
| Number of subelements in this data element. | |
| EDataToSave | fDataToSave |
| size_t | fTreeArrayIndex |
| size_t | fTreeArrayNumEntries |
| Double_t | fPedestal |
| Double_t | fCalibrationFactor |
| Bool_t | kFoundPedestal |
| Bool_t | kFoundGain |
| Int_t | bEVENTCUTMODE |
| Double_t | fULimit |
| Double_t | fLLimit |
| Double_t | fStability |
| Double_t | fBurpThreshold |
| Int_t | fBurpCountdown |
Protected Attributes inherited from VQwDataElement | |
| 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 | |
Protected Attributes inherited from MQwHistograms | |
| std::vector< TH1_ptr > | fHistograms |
| Histograms associated with this data element. | |
| bool | fUseExternalRandomVariable |
| Flag to use an externally provided normal random variable. | |
| double | fExternalRandomVariable |
| Externally provided normal random variable. | |
| bool | fCalcMockDataAsDiff |
| Double_t | fMockAsymmetry |
| Helicity asymmetry. | |
| Double_t | fMockGaussianMean |
| Mean of normal distribution. | |
| Double_t | fMockGaussianSigma |
| Sigma of normal distribution. | |
| std::vector< Double_t > | fMockDriftAmplitude |
| Harmonic drift amplitude. | |
| std::vector< Double_t > | fMockDriftFrequency |
| Harmonic drift frequency. | |
| std::vector< Double_t > | fMockDriftPhase |
| Harmonic drift phase. | |
Static Protected Attributes inherited from VQwScaler_Channel | |
| static const Bool_t | kDEBUG = kFALSE |
| static Int_t | fBurpHoldoff = 10 |
| static std::mt19937 | fRandomnessGenerator |
| Internal randomness generator. | |
| static std::normal_distribution< double > | fNormalDistribution |
| Internal normal probability distribution. | |
| static std::function< double()> | fNormalRandomVariable = []() -> double { return MQwMockable::fNormalDistribution(MQwMockable::fRandomnessGenerator); } |
| Internal normal random variable. | |
Templated concrete scaler channel with configurable data masking.
Template specialization of VQwScaler_Channel that applies data_mask and data_shift to the raw scaler values during processing. Commonly used to handle different scaler module types with varying data formats.
Definition at line 267 of file QwScaler_Channel.h.
|
inline |
Definition at line 272 of file QwScaler_Channel.h.
References VQwScaler_Channel::VQwScaler_Channel().
Referenced by QwScaler_Channel(), and QwScaler_Channel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 273 of file QwScaler_Channel.h.
References QwScaler_Channel(), and VQwScaler_Channel::VQwScaler_Channel().
Here is the call graph for this function:
|
inline |
Definition at line 275 of file QwScaler_Channel.h.
References VQwScaler_Channel::VQwScaler_Channel().
Here is the call graph for this function:
|
inline |
Definition at line 277 of file QwScaler_Channel.h.
References QwScaler_Channel(), and VQwScaler_Channel::VQwScaler_Channel().
Here is the call graph for this function:
|
inlinevirtual |
Reimplemented from VQwHardwareChannel.
Definition at line 112 of file VQwHardwareChannel.h.
|
virtual |
Clone the channel, saving the specified data.
| datatosave | Data to save flag |
Implements VQwHardwareChannel.
Definition at line 924 of file QwScaler_Channel.cc.
|
virtual |
Clone the channel, saving the specified data.
| datatosave | Data to save flag |
Implements VQwHardwareChannel.
Definition at line 934 of file QwScaler_Channel.cc.
|
overridevirtual |
Implements VQwHardwareChannel.
References VQwHardwareChannel::VQwHardwareChannel().
Here is the call graph for this function:
|
overridevirtual |
Implements VQwScaler_Channel.
Definition at line 262 of file QwScaler_Channel.cc.
References VQwHardwareChannel::fDataToSave, VQwHardwareChannel::fTreeArrayIndex, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), VQwDataElement::kMoments, VQwDataElement::kRaw, QwRootTreeBranchVector::push_back(), VQwHardwareChannel::SetDataToSaveByPrefix(), and QwRootTreeBranchVector::size().
Here is the call graph for this function:
|
inline |
Definition at line 90 of file QwScaler_Channel.h.
|
overridevirtual |
Encode the event data into a CODA buffer.
Implements VQwScaler_Channel.
Definition at line 151 of file QwScaler_Channel.cc.
References VQwScaler_Channel::fValue_Raw, and VQwDataElement::IsNameEmpty().
Here is the call graph for this function:
|
overridevirtual |
Implements VQwScaler_Channel.
Definition at line 305 of file QwScaler_Channel.cc.
References QwLog::endl(), VQwHardwareChannel::fDataToSave, VQwDataElement::fElementName, VQwDataElement::fErrorFlag, VQwDataElement::fGoodEventCount, VQwScaler_Channel::fHeader, VQwHardwareChannel::fTreeArrayIndex, VQwHardwareChannel::fTreeArrayNumEntries, VQwScaler_Channel::fValue, VQwScaler_Channel::fValue_Raw, VQwScaler_Channel::fValueError, VQwScaler_Channel::fValueM2, VQwDataElement::GetElementName(), VQwDataElement::IsNameEmpty(), VQwDataElement::kMoments, VQwDataElement::kRaw, QwError, QwRootTreeBranchVector::SetValue(), and QwRootTreeBranchVector::size().
Here is the call graph for this function:
|
overridevirtual |
Process the CODA event buffer for this element.
Implements VQwScaler_Channel.
Definition at line 165 of file QwScaler_Channel.cc.
References VQwHardwareChannel::fCalibrationFactor, VQwScaler_Channel::fHeader, VQwHardwareChannel::fNumberOfDataWords, VQwHardwareChannel::fPedestal, VQwScaler_Channel::fValue, VQwScaler_Channel::fValue_Raw, VQwScaler_Channel::fValue_Raw_Old, VQwScaler_Channel::IsDifferentialScaler(), and VQwDataElement::IsNameEmpty().
Here is the call graph for this function: