8 #ifndef __QWSCALER_CHANNEL__
9 #define __QWSCALER_CHANNEL__
31 static Int_t
GetBufferOffset(Int_t scalerindex, Int_t wordindex, UInt_t header = 1);
72 void InitializeChannel(TString subsystem, TString instrumenttype, TString name, TString datatosave);
87 virtual Int_t
ProcessEvBuffer(UInt_t* buffer, UInt_t num_words_left, UInt_t index = 0) = 0;
119 void Scale(Double_t Offset);
199 template <UInt_t data_mask=0xffffffff, UInt_t data_shift=0 >
215 Int_t
ProcessEvBuffer(UInt_t* buffer, UInt_t num_words_left, UInt_t index = 0);
virtual void SetNeedsExternalClock(Bool_t needed)
virtual std::string GetExternalClockName()
const VQwHardwareChannel * fNormChannelPtr
Double_t GetValueError(size_t element) const
std::string fNormChannelName
virtual void DeaccumulateRunningSum(const VQwHardwareChannel *value)
void CalculateRunningAverage()
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
QwScaler_Channel(TString name, TString datatosave="raw")
void Scale(Double_t Offset)
virtual void SetExternalClockName(const std::string name)
void RandomizeEventData(int helicity=0, double time=0.0)
Internally generate random event data.
void InitializeChannel(TString name, TString datatosave="raw")
Initialize the fields in this object.
static Int_t GetBufferOffset(Int_t scalerindex, Int_t wordindex, UInt_t header=1)
void AddChannelOffset(Double_t Offset)
Int_t GetRawValue() const
virtual Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0)=0
Process the CODA event buffer for this element.
Double_t GetValueM2() const
static const Bool_t kDEBUG
class QwScaler_Channel< 0xffffffff, 0 > QwSTR7200_Channel
VQwScaler_Channel & operator=(const VQwScaler_Channel &value)
VQwScaler_Channel(TString name, TString datatosave="raw")
VQwHardwareChannel & operator/=(const VQwHardwareChannel *input)
static void PrintErrorCounterHead()
Double_t GetValue(size_t element) const
VQwScaler_Channel(const VQwScaler_Channel &source)
void FillTreeVector(std::vector< Double_t > &values) const
void MultiplyBy(const VQwHardwareChannel *valueptr)
virtual void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count)=0
void PrintErrorCounters() const
report number of events failed due to HW and event cut failure
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0)
Process the CODA event buffer for this element.
virtual void EncodeEventData(std::vector< UInt_t > &buffer)=0
Encode the event data into a CODA buffer.
The pure virtual base class of all data elements.
void DivideBy(const VQwHardwareChannel *valueptr)
VQwScaler_Channel & operator-=(const VQwScaler_Channel &value)
virtual Bool_t IsDifferentialScaler()
void PrintValue() const
Print single line of value and error of this data element.
virtual void SetDifferentialScaler(Bool_t diff)
class QwScaler_Channel< 0xffffffff, 0 > QwSIS3801_Channel
virtual ~VQwScaler_Channel()
Bool_t ApplySingleEventCuts()
void SetEventData(Double_t value)
Int_t fNumEvtsWithEventCutsRejected
void Product(VQwScaler_Channel &numer, VQwScaler_Channel &denom)
void EncodeEventData(std::vector< UInt_t > &buffer)
Encode the event data into a CODA buffer.
void AssignScaledValue(const VQwScaler_Channel &value, Double_t scale)
VQwScaler_Channel & operator*=(const VQwScaler_Channel &value)
Bool_t fIsDifferentialScaler
void Sum(VQwScaler_Channel &value1, VQwScaler_Channel &value2)
void AccumulateRunningSum(const VQwScaler_Channel &value)
void Ratio(const VQwScaler_Channel &numer, const VQwScaler_Channel &denom)
VQwScaler_Channel & operator+=(const VQwScaler_Channel &value)
class QwScaler_Channel< 0xffffffff, 0 > QwSIS3801D32_Channel
void ConstructBranch(TTree *tree, TString &prefix)
void Difference(VQwScaler_Channel &value1, VQwScaler_Channel &value2)
void DeaccumulateRunningSum(const VQwScaler_Channel &value)
class QwScaler_Channel< 0x00ffffff, 0 > QwSIS3801D24_Channel
virtual void SetExternalClockPtr(const VQwHardwareChannel *clock)
void ConstructHistograms(TDirectory *folder, TString &prefix)
Construct the histograms for this data element.
void AssignValueFrom(const VQwDataElement *valueptr)
static void PrintErrorCounterTail()
QwScaler_Channel(const QwScaler_Channel &source)
Int_t GetRawValue(size_t element) const
void FillHistograms()
Fill the histograms for this data element.
Int_t fGoodEventCount
Number of good events accumulated in this element.
void ScaledAdd(Double_t scale, const VQwHardwareChannel *value)
Double_t GetValueError() const
void LoadChannelParameters(QwParameterFile ¶mfile)
void AddValueFrom(const VQwHardwareChannel *valueptr)
void IncrementErrorCounters()
void SetDefaultSampleSize(size_t NumberOfSamples_map)
Double_t GetValue() const
void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count)
Double_t GetValueM2(size_t element) const
void ClearEventData()
Clear the event data in this element.
Double_t GetValueWidth() const
void PrintInfo() const
Print multiple lines of information about this data element.
Int_t fNumEvtsWithHWErrors
virtual Bool_t NeedsExternalClock()
void SubtractValueFrom(const VQwHardwareChannel *valueptr)
Bool_t fNeedsExternalClock
Double_t fClockNormalization