23 #ifndef __QwSIS3320_Channel__
24 #define __QwSIS3320_Channel__
35 #include <boost/random.hpp>
83 const std::vector<TString> accums,
84 const std::vector<Double_t> weights);
92 Int_t
ProcessEvBuffer(UInt_t* buffer, UInt_t num_words_left, UInt_t index = 0);
197 #endif // __QwSIS3320_Channel__
QwSIS3320_Samples & GetSamplesRaw(size_t i)
static const Bool_t kDEBUG
Double_t GetCalibrationFactor() const
SIS3320 sampling ADC samples.
const QwSIS3320_Channel operator+(const Double_t &value) const
Class for the decoding of the SIS3320 sampling ADC data.
std::vector< Double_t > fSampleWindowAverages
static const unsigned int MODE_MULTI_EVENT
static const unsigned int FORMAT_ACCUMULATOR
Int_t fAccumulatorTimingAfter5
Bool_t fHasAccumulatorData
const QwSIS3320_Channel operator-(const Double_t &value) const
size_t GetNumberOfAccumulators() const
QwSIS3320_Channel(UInt_t channel=0, TString name="auto")
QwSIS3320_Samples & GetSamples(size_t i)
Double_t GetPedestal() const
std::vector< QwSIS3320_Samples > fSamples
QwSIS3320_Channel & operator=(const QwSIS3320_Channel &value)
Int_t fAccumulatorThreshold1
std::vector< QwSIS3320_Samples > fSamplesRaw
static const unsigned int MODE_SINGLE_EVENT
Int_t fNumberOfAccumulators
UInt_t fSampleFormat
Number of triggered events.
void FillHistograms()
Fill the histograms for this data element.
static const unsigned int FORMAT_SHORT_WORD_SAMPLING
void ConstructHistograms(TDirectory *folder, TString &prefix)
Construct the histograms for this data element.
void InitializeChannel(UInt_t channel, TString name)
size_t GetNumberOfEvents() const
static const unsigned int FORMAT_LONG_WORD_SAMPLING
Definition of the pure virtual base class of all data elements.
std::vector< QwSIS3320_Accumulator > fAccumulatorsRaw
std::vector< std::pair< UInt_t, UInt_t > > fTimeWindows
The pure virtual base class of all data elements.
void RandomizeEventData(int helicity=0, double time=0.0)
Internally generate random event data.
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
QwSIS3320_Channel & operator-=(const Double_t &value)
void Offset(Double_t Offset)
static const Double_t kVoltsPerBit
std::vector< QwSIS3320_LogicalAccumulator > fLogicalAccumulators
void Scale(Double_t Offset)
void EncodeEventData(std::vector< UInt_t > &buffer)
Encode the event data into a CODA buffer.
Int_t fAccumulatorTimingBefore5
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0)
void Difference(QwSIS3320_Channel &value1, QwSIS3320_Channel &value2)
void Sum(QwSIS3320_Channel &value1, QwSIS3320_Channel &value2)
void Ratio(QwSIS3320_Channel &numer, QwSIS3320_Channel &denom)
void AddLogicalAccumulator(const TString name, const std::vector< TString > accums, const std::vector< Double_t > weights)
void SetNumberOfEvents(UInt_t nevents)
Int_t fAccumulatorTimingAfter6
void FillTreeVector(std::vector< Double_t > &values) const
std::vector< QwSIS3320_Accumulator > fAccumulators
Int_t fAccumulatorThreshold2
static const unsigned int MODE_ACCUM_EVENT
std::vector< Double_t > fTimeWindowAverages
virtual ~QwSIS3320_Channel()
void SetNumberOfAccumulators(UInt_t naccumulators)
QwSIS3320_Samples fAverageSamples
QwSIS3320_Samples fAverageSamplesRaw
static const Double_t kNanoSecondsPerSample
void SetCalibrationFactor(const Double_t factor)
std::vector< std::pair< Double_t, Double_t > > fSampleWindows
QwSIS3320_Channel & operator+=(const Double_t &value)
static const unsigned int MODE_NOTREADY
Double_t fCalibrationFactor
Int_t fAccumulatorTimingBefore6
QwSIS3320_Channel(const QwSIS3320_Channel &source)
UInt_t fNumberOfEvents
Current triggered event (allow for negative sentinel)
void SetPedestal(const Double_t ped)