25 fTriumf_ADC.SetPedestal(fPedestal);
33 fTriumf_ADC.SetCalibrationFactor(fCalibration);
41 SetCalibrationFactor(1.);
42 fTriumf_ADC.InitializeChannel(name,datatosave);
53 SetCalibrationFactor(1.);
54 fTriumf_ADC.InitializeChannel(subsystem,
"QwIntegratedRasterChannel", name, datatosave);
65 fTriumf_ADC.ClearEventData();
74 fTriumf_ADC.UseExternalRandomVariable();
81 fTriumf_ADC.SetExternalRandomVariable(random_variable);
88 fTriumf_ADC.SetRandomEventDriftParameters(amplitude, phase, frequency);
95 fTriumf_ADC.AddRandomEventDriftParameters(amplitude, phase, frequency);
102 fTriumf_ADC.SetRandomEventParameters(mean, sigma);
109 fTriumf_ADC.SetRandomEventAsymmetry(asymmetry);
116 fTriumf_ADC.RandomizeEventData(helicity, time);
123 fTriumf_ADC.SetHardwareSum(hwsum, sequencenumber);
130 fTriumf_ADC.SetEventData(block, sequencenumber);
137 fTriumf_ADC.EncodeEventData(buffer);
144 fTriumf_ADC.ProcessEvent();
151 Bool_t fEventIsGood=kTRUE;
153 fDeviceErrorCode=fTriumf_ADC.ApplyHWChecks();
154 fEventIsGood=(fDeviceErrorCode & 0x0);
163 fTriumf_ADC.SetSingleEventCuts(LL,UL);
173 QwMessage<<
"QwIntegratedRasterChannel<T> Error Code passing to QwVQWK_Ch "<<errorflag<<
QwLog::endl;
174 fTriumf_ADC.SetSingleEventCuts(errorflag,LL,UL,stability);
180 fTriumf_ADC.SetDefaultSampleSize((
size_t)sample_size);
191 if (fTriumf_ADC.ApplySingleEventCuts()){
196 if (bDEBUG) std::cout<<
" evnt cut failed:-> set limit "<<
fULimit;
199 fDeviceErrorCode|=fTriumf_ADC.GetEventcutErrorFlag();
210 fTriumf_ADC.PrintErrorCounters();
218 fTriumf_ADC.ProcessEvBuffer(buffer,word_position_in_buffer);
220 return word_position_in_buffer;
227 if (GetElementName()!=
"")
244 if (GetElementName()!=
"")
248 this->fCalibration=0;
256 if (GetElementName()!=
"")
260 this->fCalibration=0;
288 fTriumf_ADC.Scale(factor);
294 fTriumf_ADC.CalculateRunningAverage();
299 fTriumf_ADC.AccumulateRunningSum(value.
fTriumf_ADC);
306 fTriumf_ADC.PrintValue();
312 std::cout <<
"QwVQWK_Channel Info " << std::endl;
313 fTriumf_ADC.PrintInfo();
320 if (GetElementName()==
"")
326 fTriumf_ADC.ConstructHistograms(folder, prefix);
334 if (GetElementName()==
"")
340 fTriumf_ADC.FillHistograms();
350 if (GetElementName()==
""){
354 TString thisprefix=prefix;
356 if (GetElementName()==
"qwk_raster_x"||GetElementName()==
"qwk_raster_y"||GetElementName()==
"qwk_raster_sumxy") thisprefix=
"diff_";
358 fTriumf_ADC.ConstructBranchAndVector(tree, thisprefix,values);
366 if (GetElementName()==
""){
370 fTriumf_ADC.ConstructBranch(tree, prefix);
381 devicename=GetElementName();
382 devicename.ToLower();
383 if (GetElementName()==
""){
389 if (modulelist.
HasValue(devicename)){
390 fTriumf_ADC.ConstructBranch(tree, prefix);
401 if (GetElementName()==
""){
405 fTriumf_ADC.FillTreeVector(values);
414 std::vector <QwDBInterface> row_list;
415 fTriumf_ADC.AddEntriesToList(row_list);
423 std::vector <QwErrDBInterface> row_list;
424 fTriumf_ADC.AddErrEntriesToList(row_list);
#define QwMessage
Predefined log drain for regular messages.
QwIntegratedRasterChannel & operator=(const QwIntegratedRasterChannel &value)
void EncodeEventData(std::vector< UInt_t > &buffer)
void FillHistograms()
Fill the histograms for this data element.
void AddRandomEventDriftParameters(Double_t amplitude, Double_t phase, Double_t frequency)
void SetPedestal(Double_t ped)
QwIntegratedRasterChannel & operator-=(const QwIntegratedRasterChannel &value)
void SetCalibrationFactor(Double_t calib)
QwIntegratedRasterChannel & operator+=(const QwIntegratedRasterChannel &value)
void SetDefaultSampleSize(Int_t sample_size)
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
void AccumulateRunningSum(const QwIntegratedRasterChannel &value)
void SetRandomEventDriftParameters(Double_t amplitude, Double_t phase, Double_t frequency)
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t subelement=0)
Process the CODA event buffer for this element.
std::vector< QwErrDBInterface > GetErrDBEntry()
Bool_t ApplySingleEventCuts()
void FillTreeVector(std::vector< Double_t > &values) const
void SetRandomEventParameters(Double_t mean, Double_t sigma)
void Difference(QwIntegratedRasterChannel &value1, QwIntegratedRasterChannel &value2)
Bool_t HasValue(TString &vname)
void ConstructBranch(TTree *tree, TString &prefix)
void Scale(Double_t factor)
void UseExternalRandomVariable()
void RandomizeEventData(int helicity=0, double time=0)
void ConstructHistograms(TDirectory *folder, TString &prefix)
Construct the histograms for this data element.
void CalculateRunningAverage()
static std::ostream & endl(std::ostream &)
End of the line.
Int_t SetSingleEventCuts(Double_t mean=0, Double_t sigma=0)
void SetExternalRandomVariable(Double_t random_variable)
void Sum(QwIntegratedRasterChannel &value1, QwIntegratedRasterChannel &value2)
void SetHardwareSum(Double_t hwsum, UInt_t sequencenumber=0)
void SetEventData(Double_t *block, UInt_t sequencenumber)
void SetRandomEventAsymmetry(Double_t asymmetry)
std::vector< QwDBInterface > GetDBEntry()
void PrintValue() const
Print single line of value and error of this data element.
void PrintErrorCounters() const
report number of events failed due to HW and event cut failure
void Ratio(QwIntegratedRasterChannel &numer, QwIntegratedRasterChannel &denom)
void InitializeChannel(TString name, TString datatosave)
void ClearEventData()
Clear the event data in this element.
void PrintInfo() const
Print multiple lines of information about this data element.