QwAnalysis
|
#include <QwScaler_Channel.h>
Public Member Functions | |
QwScaler_Channel () | |
QwScaler_Channel (const QwScaler_Channel &source) | |
QwScaler_Channel (TString name, TString datatosave="raw") | |
void | EncodeEventData (std::vector< UInt_t > &buffer) |
Encode the event data into a CODA buffer. More... | |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t index=0) |
Process the CODA event buffer for this element. More... | |
Public Member Functions inherited from VQwScaler_Channel | |
VQwScaler_Channel () | |
VQwScaler_Channel (TString name, TString datatosave="raw") | |
VQwScaler_Channel (const VQwScaler_Channel &source) | |
virtual | ~VQwScaler_Channel () |
void | InitializeChannel (TString name, TString datatosave="raw") |
Initialize the fields in this object. More... | |
void | InitializeChannel (TString subsystem, TString instrumenttype, TString name, TString datatosave) |
Initialize the fields in this object. More... | |
void | SetDefaultSampleSize (size_t NumberOfSamples_map) |
void | LoadChannelParameters (QwParameterFile ¶mfile) |
void | ClearEventData () |
Clear the event data in this element. More... | |
void | RandomizeEventData (int helicity=0, double time=0.0) |
Internally generate random event data. More... | |
void | SetEventData (Double_t value) |
void | ProcessEvent () |
Int_t | GetRawValue (size_t element) const |
Double_t | GetValue (size_t element) const |
Double_t | GetValueM2 (size_t element) const |
Double_t | GetValueError (size_t element) const |
VQwScaler_Channel & | operator= (const VQwScaler_Channel &value) |
void | AssignScaledValue (const VQwScaler_Channel &value, Double_t scale) |
void | AssignValueFrom (const VQwDataElement *valueptr) |
void | AddValueFrom (const VQwHardwareChannel *valueptr) |
void | SubtractValueFrom (const VQwHardwareChannel *valueptr) |
void | MultiplyBy (const VQwHardwareChannel *valueptr) |
void | DivideBy (const VQwHardwareChannel *valueptr) |
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) |
VQwHardwareChannel & | operator-= (const VQwHardwareChannel *input) |
VQwHardwareChannel & | operator*= (const VQwHardwareChannel *input) |
VQwHardwareChannel & | operator/= (const VQwHardwareChannel *input) |
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) |
void | DivideBy (const VQwScaler_Channel &denom) |
Int_t | ApplyHWChecks () |
Bool_t | ApplySingleEventCuts () |
void | IncrementErrorCounters () |
void | PrintErrorCounters () const |
report number of events failed due to HW and event cut failure More... | |
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 | FillTreeVector (std::vector< Double_t > &values) const |
void | AccumulateRunningSum (const VQwScaler_Channel &value) |
void | AccumulateRunningSum (const VQwScaler_Channel &value, Int_t count) |
void | AccumulateRunningSum (const VQwHardwareChannel *value, Int_t count) |
void | DeaccumulateRunningSum (const VQwScaler_Channel &value) |
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 | CalculateRunningAverage () |
virtual Bool_t | NeedsExternalClock () |
virtual void | SetNeedsExternalClock (Bool_t needed) |
virtual std::string | GetExternalClockName () |
virtual void | SetExternalClockPtr (const VQwHardwareChannel *clock) |
virtual void | SetExternalClockName (const std::string name) |
virtual Bool_t | IsDifferentialScaler () |
virtual void | SetDifferentialScaler (Bool_t diff) |
void | ScaledAdd (Double_t scale, const VQwHardwareChannel *value) |
Public Member Functions inherited from VQwHardwareChannel | |
VQwHardwareChannel () | |
VQwHardwareChannel (const VQwHardwareChannel &value) | |
VQwHardwareChannel (const VQwHardwareChannel &value, VQwDataElement::EDataToSave datatosave) | |
virtual | ~VQwHardwareChannel () |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. More... | |
size_t | GetNumberOfSubelements () |
Get the number of subelements in this data element. More... | |
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. More... | |
void | SetEventCutMode (Int_t bcuts) |
void | SetSingleEventCuts (Double_t min, Double_t max) |
Set the upper and lower limits (fULimit and fLLimit) for this channel. More... | |
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... | |
Double_t | GetEventCutUpperLimit () const |
Double_t | GetEventCutLowerLimit () const |
Double_t | GetStabilityLimit () const |
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 VQwHardwareChannel &elem) |
virtual UInt_t | GetErrorCode () const |
virtual VQwHardwareChannel & | operator= (const VQwHardwareChannel &value) |
Arithmetic assignment operator: Should only copy event-based data. More... | |
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 > &row_list) |
virtual void | AccumulateRunningSum (const VQwHardwareChannel *value) |
virtual void | DeaccumulateRunningSum (const VQwHardwareChannel *value) |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist) |
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 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 UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device More... | |
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... | |
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. More... | |
void | AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency) |
Add drift parameters to the internal set. More... | |
void | SetRandomEventParameters (Double_t mean, Double_t sigma) |
Set the normal random event parameters. More... | |
void | SetRandomEventAsymmetry (Double_t asymmetry) |
Set the helicity asymmetry. More... | |
Double_t | GetRandomValue () |
void | UseExternalRandomVariable () |
Set the flag to use an externally provided random variable. More... | |
void | SetExternalRandomVariable (Double_t random_variable) |
Set the externally provided random variable. More... | |
Additional Inherited Members | |
Public Types inherited from VQwDataElement | |
enum | EDataToSave { kRaw = 0, kDerived } |
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 () |
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. More... | |
void | SetNumberOfSubElements (const size_t elements) |
Set the number of data words in this data element. More... | |
void | SetDataToSave (TString datatosave) |
Set the flag indicating if raw or derived values are in this data element. More... | |
void | SetDataToSave (VQwDataElement::EDataToSave datatosave) |
Set the flag indicating if raw or derived values are in this data element. More... | |
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(). More... | |
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... | |
Protected Attributes inherited from VQwScaler_Channel | |
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. More... | |
UInt_t | fNumberOfSubElements |
Number of subelements in this data element. More... | |
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 |
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... | |
Protected Attributes inherited from MQwMockable | |
bool | fUseExternalRandomVariable |
Flag to use an externally provided normal random variable. More... | |
double | fExternalRandomVariable |
Externally provided normal random variable. More... | |
Double_t | fMockAsymmetry |
Helicity asymmetry. More... | |
Double_t | fMockGaussianMean |
Mean of normal distribution. More... | |
Double_t | fMockGaussianSigma |
Sigma of normal distribution. More... | |
std::vector< Double_t > | fMockDriftAmplitude |
Harmonic drift amplitude. More... | |
std::vector< Double_t > | fMockDriftFrequency |
Harmonic drift frequency. More... | |
std::vector< Double_t > | fMockDriftPhase |
Harmonic drift phase. More... | |
Static Protected Attributes inherited from VQwScaler_Channel | |
static const Bool_t | kDEBUG = kFALSE |
Static Protected Attributes inherited from MQwMockable | |
static boost::mt19937 | fRandomnessGenerator |
Internal randomness generator. More... | |
static boost::normal_distribution < double > | fNormalDistribution |
Internal normal probability distribution. More... | |
static boost::variate_generator < boost::mt19937, boost::normal_distribution < double > > | fNormalRandomVariable |
Internal normal random variable. More... | |
Definition at line 200 of file QwScaler_Channel.h.
|
inline |
Definition at line 205 of file QwScaler_Channel.h.
|
inline |
Definition at line 206 of file QwScaler_Channel.h.
|
inline |
Definition at line 208 of file QwScaler_Channel.h.
|
virtual |
Encode the event data into a CODA buffer.
Implements VQwScaler_Channel.
Definition at line 143 of file QwScaler_Channel.cc.
|
virtual |
Process the CODA event buffer for this element.
Implements VQwScaler_Channel.
Definition at line 157 of file QwScaler_Channel.cc.