QwAnalysis
QwIntegratedRasterChannel< T > Class Template Reference

#include <QwIntegratedRasterChannel.h>

+ Inheritance diagram for QwIntegratedRasterChannel< T >:
+ Collaboration diagram for QwIntegratedRasterChannel< T >:

Public Member Functions

 QwIntegratedRasterChannel ()
 
 QwIntegratedRasterChannel (TString name)
 
 QwIntegratedRasterChannel (TString subsystemname, TString name)
 
virtual ~QwIntegratedRasterChannel ()
 
Int_t ProcessEvBuffer (UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t subelement=0)
 Process the CODA event buffer for this element. More...
 
void InitializeChannel (TString name, TString datatosave)
 
void InitializeChannel (TString subsystem, TString name, TString datatosave)
 
void ClearEventData ()
 Clear the event data in this element. More...
 
void SetRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency)
 
void AddRandomEventDriftParameters (Double_t amplitude, Double_t phase, Double_t frequency)
 
void SetRandomEventParameters (Double_t mean, Double_t sigma)
 
void SetRandomEventAsymmetry (Double_t asymmetry)
 
void RandomizeEventData (int helicity=0, double time=0)
 
void SetHardwareSum (Double_t hwsum, UInt_t sequencenumber=0)
 
void SetEventData (Double_t *block, UInt_t sequencenumber)
 
void EncodeEventData (std::vector< UInt_t > &buffer)
 
void UseExternalRandomVariable ()
 
void SetExternalRandomVariable (Double_t random_variable)
 
void ProcessEvent ()
 
Bool_t ApplyHWChecks ()
 
Bool_t ApplySingleEventCuts ()
 
void IncrementErrorCounters ()
 
void PrintErrorCounters () const
 report number of events failed due to HW and event cut failure More...
 
UInt_t GetEventcutErrorFlag ()
 return the error flag on this channel/device More...
 
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 QwIntegratedRasterChannel *ev_error)
 
Int_t SetSingleEventCuts (Double_t mean=0, Double_t sigma=0)
 
void SetSingleEventCuts (UInt_t errorflag, Double_t min=0, Double_t max=0, Double_t stability=0)
 Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel. More...
 
void SetDefaultSampleSize (Int_t sample_size)
 
void SetEventCutMode (Int_t bcuts)
 
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...
 
QwIntegratedRasterChanneloperator= (const QwIntegratedRasterChannel &value)
 
QwIntegratedRasterChanneloperator+= (const QwIntegratedRasterChannel &value)
 
QwIntegratedRasterChanneloperator-= (const QwIntegratedRasterChannel &value)
 
void Sum (QwIntegratedRasterChannel &value1, QwIntegratedRasterChannel &value2)
 
void Difference (QwIntegratedRasterChannel &value1, QwIntegratedRasterChannel &value2)
 
void Ratio (QwIntegratedRasterChannel &numer, QwIntegratedRasterChannel &denom)
 
void Scale (Double_t factor)
 
void AccumulateRunningSum (const QwIntegratedRasterChannel &value)
 
void CalculateRunningAverage ()
 
void SetPedestal (Double_t ped)
 
void SetCalibrationFactor (Double_t calib)
 
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 ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist)
 
void FillTreeVector (std::vector< Double_t > &values) const
 
std::vector< QwDBInterfaceGetDBEntry ()
 
std::vector< QwErrDBInterfaceGetErrDBEntry ()
 
const VQwDataElementGetElement () const
 
- 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...
 
virtual void LoadChannelParameters (QwParameterFile &paramfile)
 
size_t GetNumberOfDataWords ()
 Get the number of data words in this data element. More...
 
UInt_t GetGoodEventCount () const
 
virtual void AssignValueFrom (const VQwDataElement *valueptr)
 
virtual VQwDataElementoperator+= (const VQwDataElement &value)
 Addition-assignment operator. More...
 
virtual VQwDataElementoperator-= (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 void SetNeedsExternalClock (Bool_t needed)
 
virtual Bool_t NeedsExternalClock ()
 
virtual std::string GetExternalClockName ()
 
virtual void SetExternalClockPtr (const VQwHardwareChannel *clock)
 
virtual void SetExternalClockName (const std::string name)
 
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...
 

Private Attributes

Double_t fPedestal
 
Double_t fCalibration
 
Double_t fULimit
 
Double_t fLLimit
 
Bool_t fGoodEvent
 
fTriumf_ADC
 
Int_t fDeviceErrorCode
 
Bool_t bEVENTCUTMODE
 

Static Private Attributes

static const Bool_t bDEBUG =kFALSE
 

Additional Inherited Members

- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0, kDerived }
 
- Protected Member Functions inherited from VQwDataElement
void SetNumberOfDataWords (const UInt_t &numwords)
 Set the number of data words in this data element. More...
 
virtual VQwDataElementoperator= (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 MQwHistogramsoperator= (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 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_ptrfHistograms
 Histograms associated with this data element. More...
 

Detailed Description

template<typename T>
class QwIntegratedRasterChannel< T >

Definition at line 31 of file QwIntegratedRasterChannel.h.

Constructor & Destructor Documentation

template<typename T>
QwIntegratedRasterChannel< T >::QwIntegratedRasterChannel ( )
inline

Definition at line 34 of file QwIntegratedRasterChannel.h.

34 { };
template<typename T>
QwIntegratedRasterChannel< T >::QwIntegratedRasterChannel ( TString  name)
inline

Definition at line 35 of file QwIntegratedRasterChannel.h.

35  {
36  InitializeChannel(name,"raw");
37  };
void InitializeChannel(TString name, TString datatosave)
template<typename T>
QwIntegratedRasterChannel< T >::QwIntegratedRasterChannel ( TString  subsystemname,
TString  name 
)
inline

Definition at line 38 of file QwIntegratedRasterChannel.h.

38  {
39  SetSubsystemName(subsystemname);
40  InitializeChannel(subsystemname, name,"raw");
41  };
void SetSubsystemName(TString sysname)
Set the name of the inheriting subsystem name.
void InitializeChannel(TString name, TString datatosave)
template<typename T>
virtual QwIntegratedRasterChannel< T >::~QwIntegratedRasterChannel ( )
inlinevirtual

Definition at line 42 of file QwIntegratedRasterChannel.h.

42 { };

Member Function Documentation

template<typename T >
void QwIntegratedRasterChannel< T >::AccumulateRunningSum ( const QwIntegratedRasterChannel< T > &  value)

Definition at line 298 of file QwIntegratedRasterChannel.cc.

References QwIntegratedRasterChannel< T >::fTriumf_ADC.

298  {
299  fTriumf_ADC.AccumulateRunningSum(value.fTriumf_ADC);
300 }
template<typename T >
void QwIntegratedRasterChannel< T >::AddRandomEventDriftParameters ( Double_t  amplitude,
Double_t  phase,
Double_t  frequency 
)

Definition at line 93 of file QwIntegratedRasterChannel.cc.

94 {
95  fTriumf_ADC.AddRandomEventDriftParameters(amplitude, phase, frequency);
96  return;
97 }
template<typename T >
Bool_t QwIntegratedRasterChannel< T >::ApplyHWChecks ( )

Definition at line 149 of file QwIntegratedRasterChannel.cc.

150 {
151  Bool_t fEventIsGood=kTRUE;
152 
153  fDeviceErrorCode=fTriumf_ADC.ApplyHWChecks();//will check for HW consistancy and return the error code (=0 is HW good)
154  fEventIsGood=(fDeviceErrorCode & 0x0);//if no HW error return true
155 
156 
157  return fEventIsGood;
158 }
template<typename T >
Bool_t QwIntegratedRasterChannel< T >::ApplySingleEventCuts ( )

Definition at line 186 of file QwIntegratedRasterChannel.cc.

References fULimit.

186  {
187  //std::cout<<" QwIntegratedRasterChannel<T>::SingleEventCuts() "<<std::endl;
188  Bool_t status=kTRUE;
189 
190 
191  if (fTriumf_ADC.ApplySingleEventCuts()){
192  status=kTRUE;
193  }
194  else{
195 
196  if (bDEBUG) std::cout<<" evnt cut failed:-> set limit "<<fULimit;
197  status&=kFALSE;
198  }
199  fDeviceErrorCode|=fTriumf_ADC.GetEventcutErrorFlag();//retrun the error flag for event cuts
200 
201 
202  return status;
203 
204 }
template<typename T >
void QwIntegratedRasterChannel< T >::CalculateRunningAverage ( )

Definition at line 293 of file QwIntegratedRasterChannel.cc.

293  {
294  fTriumf_ADC.CalculateRunningAverage();
295 }
template<typename T >
void QwIntegratedRasterChannel< T >::ClearEventData ( )
virtual

Clear the event data in this element.

Reimplemented from VQwDataElement.

Definition at line 63 of file QwIntegratedRasterChannel.cc.

64 {
65  fTriumf_ADC.ClearEventData();
66  return;
67 }
template<typename T >
void QwIntegratedRasterChannel< T >::ConstructBranch ( TTree *  tree,
TString &  prefix 
)

Definition at line 364 of file QwIntegratedRasterChannel.cc.

365 {
366  if (GetElementName()==""){
367  // This channel is not used, so skip filling the histograms.
368  } else
369  {
370  fTriumf_ADC.ConstructBranch(tree, prefix);
371  // this functions doesn't do anything yet
372  }
373  return;
374 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
void QwIntegratedRasterChannel< T >::ConstructBranch ( TTree *  tree,
TString &  prefix,
QwParameterFile modulelist 
)

Definition at line 377 of file QwIntegratedRasterChannel.cc.

References QwLog::endl(), QwParameterFile::HasValue(), and QwMessage.

378 {
379  TString devicename;
380 
381  devicename=GetElementName();
382  devicename.ToLower();
383  if (GetElementName()==""){
384  // This channel is not used, so skip filling the histograms.
385  } else
386  {
387 
388  //QwMessage <<" QwIntegratedRasterChannel<T> "<<devicename<<QwLog::endl;
389  if (modulelist.HasValue(devicename)){
390  fTriumf_ADC.ConstructBranch(tree, prefix);
391  QwMessage <<" Tree leave added to "<<devicename<<QwLog::endl;
392  }
393  // this functions doesn't do anything yet
394  }
395  return;
396 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
Bool_t HasValue(TString &vname)
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
virtual const TString & GetElementName() const
Get the name of this element.

+ Here is the call graph for this function:

template<typename T >
void QwIntegratedRasterChannel< T >::ConstructBranchAndVector ( TTree *  tree,
TString &  prefix,
std::vector< Double_t > &  values 
)

Definition at line 348 of file QwIntegratedRasterChannel.cc.

349 {
350  if (GetElementName()==""){
351  // This channel is not used, so skip
352  } else
353  {
354  TString thisprefix=prefix;
355  if(prefix=="asym_"){
356  if (GetElementName()=="qwk_raster_x"||GetElementName()=="qwk_raster_y"||GetElementName()=="qwk_raster_sumxy") thisprefix="diff_";
357  }
358  fTriumf_ADC.ConstructBranchAndVector(tree, thisprefix,values);
359  }
360  return;
361 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
void QwIntegratedRasterChannel< T >::ConstructHistograms ( TDirectory *  folder,
TString &  prefix 
)
virtual

Construct the histograms for this data element.

Implements VQwDataElement.

Definition at line 318 of file QwIntegratedRasterChannel.cc.

319 {
320  if (GetElementName()=="")
321  {
322  // This channel is not used, so skip filling the histograms.
323  }
324  else
325  {
326  fTriumf_ADC.ConstructHistograms(folder, prefix);
327  }
328  return;
329 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
void QwIntegratedRasterChannel< T >::Difference ( QwIntegratedRasterChannel< T > &  value1,
QwIntegratedRasterChannel< T > &  value2 
)

Definition at line 273 of file QwIntegratedRasterChannel.cc.

273  {
274  *this = value1;
275  *this -= value2;
276 }
template<typename T >
void QwIntegratedRasterChannel< T >::EncodeEventData ( std::vector< UInt_t > &  buffer)

Definition at line 135 of file QwIntegratedRasterChannel.cc.

136 {
137  fTriumf_ADC.EncodeEventData(buffer);
138 }
template<typename T >
void QwIntegratedRasterChannel< T >::FillHistograms ( )
virtual

Fill the histograms for this data element.

Implements VQwDataElement.

Definition at line 332 of file QwIntegratedRasterChannel.cc.

333 {
334  if (GetElementName()=="")
335  {
336  // This channel is not used, so skip filling the histograms.
337  }
338  else
339  {
340  fTriumf_ADC.FillHistograms();
341  }
342 
343 
344  return;
345 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
void QwIntegratedRasterChannel< T >::FillTreeVector ( std::vector< Double_t > &  values) const

Definition at line 399 of file QwIntegratedRasterChannel.cc.

400 {
401  if (GetElementName()==""){
402  // This channel is not used, so skip filling the histograms.
403  } else
404  {
405  fTriumf_ADC.FillTreeVector(values);
406  // this functions doesn't do anything yet
407  }
408  return;
409 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
std::vector< QwDBInterface > QwIntegratedRasterChannel< T >::GetDBEntry ( )

Definition at line 412 of file QwIntegratedRasterChannel.cc.

413 {
414  std::vector <QwDBInterface> row_list;
415  fTriumf_ADC.AddEntriesToList(row_list);
416  return row_list;
417 }
template<typename T>
const VQwDataElement* QwIntegratedRasterChannel< T >::GetElement ( ) const
inline

Definition at line 116 of file QwIntegratedRasterChannel.h.

Referenced by QwIntegratedRasterChannel< QwVQWK_Channel >::GetElement().

116  {
117  return const_cast<QwIntegratedRasterChannel*>(this)->GetElement();
118  };
const VQwDataElement * GetElement() const

+ Here is the caller graph for this function:

template<typename T >
std::vector< QwErrDBInterface > QwIntegratedRasterChannel< T >::GetErrDBEntry ( )

Definition at line 421 of file QwIntegratedRasterChannel.cc.

422 {
423  std::vector <QwErrDBInterface> row_list;
424  fTriumf_ADC.AddErrEntriesToList(row_list);
425  return row_list;
426 }
template<typename T>
UInt_t QwIntegratedRasterChannel< T >::GetEventcutErrorFlag ( )
inlinevirtual

return the error flag on this channel/device

Reimplemented from VQwDataElement.

Definition at line 69 of file QwIntegratedRasterChannel.h.

Referenced by QwIntegratedRasterChannel< QwVQWK_Channel >::UpdateErrorFlag().

69  {//return the error flag
70  return fTriumf_ADC.GetEventcutErrorFlag();
71  }

+ Here is the caller graph for this function:

template<typename T>
void QwIntegratedRasterChannel< T >::IncrementErrorCounters ( )
inline

Definition at line 67 of file QwIntegratedRasterChannel.h.

67 {fTriumf_ADC.IncrementErrorCounters();};
template<typename T >
void QwIntegratedRasterChannel< T >::InitializeChannel ( TString  name,
TString  datatosave 
)

Definition at line 38 of file QwIntegratedRasterChannel.cc.

References fLLimit, and fULimit.

Referenced by QwIntegratedRasterChannel< QwVQWK_Channel >::QwIntegratedRasterChannel().

39 {
40  SetPedestal(0.);
42  fTriumf_ADC.InitializeChannel(name,datatosave);
43  SetElementName(name);
44  //set default limits to event cuts
45  fLLimit=0;//init two timits
46  fULimit=0;//init two timits
47  return;
48 }
void SetCalibrationFactor(Double_t calib)
void SetElementName(const TString &name)
Set the name of this element.

+ Here is the caller graph for this function:

template<typename T >
void QwIntegratedRasterChannel< T >::InitializeChannel ( TString  subsystem,
TString  name,
TString  datatosave 
)

Definition at line 51 of file QwIntegratedRasterChannel.cc.

References fLLimit, and fULimit.

51  {
52  SetPedestal(0.);
54  fTriumf_ADC.InitializeChannel(subsystem, "QwIntegratedRasterChannel", name, datatosave);
55  SetElementName(name);
56  //set default limits to event cuts
57  fLLimit=0;//init two timits
58  fULimit=0;//init two timits
59  return;
60 }
void SetCalibrationFactor(Double_t calib)
void SetElementName(const TString &name)
Set the name of this element.
template<typename T >
QwIntegratedRasterChannel< T > & QwIntegratedRasterChannel< T >::operator+= ( const QwIntegratedRasterChannel< T > &  value)

Definition at line 242 of file QwIntegratedRasterChannel.cc.

References QwIntegratedRasterChannel< T >::fPedestal, and QwIntegratedRasterChannel< T >::fTriumf_ADC.

243 {
244  if (GetElementName()!="")
245  {
246  this->fTriumf_ADC+=value.fTriumf_ADC;
247  this->fPedestal+=value.fPedestal;
248  this->fCalibration=0;
249  }
250  return *this;
251 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
QwIntegratedRasterChannel< T > & QwIntegratedRasterChannel< T >::operator-= ( const QwIntegratedRasterChannel< T > &  value)

Definition at line 254 of file QwIntegratedRasterChannel.cc.

References QwIntegratedRasterChannel< T >::fPedestal, and QwIntegratedRasterChannel< T >::fTriumf_ADC.

255 {
256  if (GetElementName()!="")
257  {
258  this->fTriumf_ADC-=value.fTriumf_ADC;
259  this->fPedestal-=value.fPedestal;
260  this->fCalibration=0;
261  }
262  return *this;
263 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
QwIntegratedRasterChannel< T > & QwIntegratedRasterChannel< T >::operator= ( const QwIntegratedRasterChannel< T > &  value)

Definition at line 224 of file QwIntegratedRasterChannel.cc.

References QwIntegratedRasterChannel< T >::fCalibration, QwIntegratedRasterChannel< T >::fPedestal, and QwIntegratedRasterChannel< T >::fTriumf_ADC.

225 {
226 // std::cout<<" Here in QwIntegratedRasterChannel<T>::operator= \n";
227  if (GetElementName()!="")
228  {
229  this->fTriumf_ADC=value.fTriumf_ADC;
230  this->fPedestal=value.fPedestal;
231  this->fCalibration=value.fCalibration;
232  }
233 // std::cout<<" to be copied \n";
234 // value.Print();
235 // std::cout<<" copied \n";
236 // this->Print();
237 
238  return *this;
239 }
virtual const TString & GetElementName() const
Get the name of this element.
template<typename T >
void QwIntegratedRasterChannel< T >::PrintErrorCounters ( ) const
virtual

report number of events failed due to HW and event cut failure

Reimplemented from VQwDataElement.

Definition at line 209 of file QwIntegratedRasterChannel.cc.

209  {// report number of events failed due to HW and event cut faliure
210  fTriumf_ADC.PrintErrorCounters();
211 }
template<typename T >
void QwIntegratedRasterChannel< T >::PrintInfo ( ) const
virtual

Print multiple lines of information about this data element.

Reimplemented from VQwDataElement.

Definition at line 310 of file QwIntegratedRasterChannel.cc.

311 {
312  std::cout << "QwVQWK_Channel Info " << std::endl;
313  fTriumf_ADC.PrintInfo();
314 }
template<typename T >
void QwIntegratedRasterChannel< T >::PrintValue ( ) const
virtual

Print single line of value and error of this data element.

Reimplemented from VQwDataElement.

Definition at line 304 of file QwIntegratedRasterChannel.cc.

305 {
306  fTriumf_ADC.PrintValue();
307 }
template<typename T >
Int_t QwIntegratedRasterChannel< T >::ProcessEvBuffer ( UInt_t *  buffer,
UInt_t  num_words_left,
UInt_t  subelement = 0 
)
virtual

Process the CODA event buffer for this element.

Implements VQwDataElement.

Definition at line 216 of file QwIntegratedRasterChannel.cc.

217 {
218  fTriumf_ADC.ProcessEvBuffer(buffer,word_position_in_buffer);
219 
220  return word_position_in_buffer;
221 }
template<typename T >
void QwIntegratedRasterChannel< T >::ProcessEvent ( )

Definition at line 141 of file QwIntegratedRasterChannel.cc.

142 {
143  ApplyHWChecks();//first apply HW checks and update HW error flags. Calling this routine either in ApplySingleEventCuts or here do not make any difference for a BCM but do for a BPMs because they have derrived devices.
144  fTriumf_ADC.ProcessEvent();
145  return;
146 }
template<typename T >
void QwIntegratedRasterChannel< T >::RandomizeEventData ( int  helicity = 0,
double  time = 0 
)

Definition at line 114 of file QwIntegratedRasterChannel.cc.

115 {
116  fTriumf_ADC.RandomizeEventData(helicity, time);
117  return;
118 }
template<typename T >
void QwIntegratedRasterChannel< T >::Ratio ( QwIntegratedRasterChannel< T > &  numer,
QwIntegratedRasterChannel< T > &  denom 
)

Definition at line 279 of file QwIntegratedRasterChannel.cc.

280 {
281  *this = numer;
282  return;
283 }
template<typename T >
void QwIntegratedRasterChannel< T >::Scale ( Double_t  factor)

Definition at line 286 of file QwIntegratedRasterChannel.cc.

287 {
288  fTriumf_ADC.Scale(factor);
289  return;
290 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetCalibrationFactor ( Double_t  calib)

Definition at line 30 of file QwIntegratedRasterChannel.cc.

31 {
32  fCalibration=calib;
33  fTriumf_ADC.SetCalibrationFactor(fCalibration);
34  return;
35 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetDefaultSampleSize ( Int_t  sample_size)

Definition at line 179 of file QwIntegratedRasterChannel.cc.

179  {
180  fTriumf_ADC.SetDefaultSampleSize((size_t)sample_size);
181 }
template<typename T>
void QwIntegratedRasterChannel< T >::SetEventCutMode ( Int_t  bcuts)
inline

Definition at line 82 of file QwIntegratedRasterChannel.h.

82  {
83  bEVENTCUTMODE=bcuts;
84  fTriumf_ADC.SetEventCutMode(bcuts);
85  }
template<typename T >
void QwIntegratedRasterChannel< T >::SetEventData ( Double_t *  block,
UInt_t  sequencenumber 
)

Definition at line 128 of file QwIntegratedRasterChannel.cc.

129 {
130  fTriumf_ADC.SetEventData(block, sequencenumber);
131  return;
132 }
template<typename T>
void QwIntegratedRasterChannel< T >::SetExternalRandomVariable ( Double_t  random_variable)

Definition at line 79 of file QwIntegratedRasterChannel.cc.

80 {
81  fTriumf_ADC.SetExternalRandomVariable(random_variable);
82  return;
83 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetHardwareSum ( Double_t  hwsum,
UInt_t  sequencenumber = 0 
)

Definition at line 121 of file QwIntegratedRasterChannel.cc.

122 {
123  fTriumf_ADC.SetHardwareSum(hwsum, sequencenumber);
124  return;
125 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetPedestal ( Double_t  ped)

Definition at line 22 of file QwIntegratedRasterChannel.cc.

23 {
24  fPedestal=pedestal;
25  fTriumf_ADC.SetPedestal(fPedestal);
26  return;
27 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetRandomEventAsymmetry ( Double_t  asymmetry)

Definition at line 107 of file QwIntegratedRasterChannel.cc.

108 {
109  fTriumf_ADC.SetRandomEventAsymmetry(asymmetry);
110  return;
111 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetRandomEventDriftParameters ( Double_t  amplitude,
Double_t  phase,
Double_t  frequency 
)

Definition at line 86 of file QwIntegratedRasterChannel.cc.

87 {
88  fTriumf_ADC.SetRandomEventDriftParameters(amplitude, phase, frequency);
89  return;
90 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetRandomEventParameters ( Double_t  mean,
Double_t  sigma 
)

Definition at line 100 of file QwIntegratedRasterChannel.cc.

101 {
102  fTriumf_ADC.SetRandomEventParameters(mean, sigma);
103  return;
104 }
template<typename T >
Int_t QwIntegratedRasterChannel< T >::SetSingleEventCuts ( Double_t  mean = 0,
Double_t  sigma = 0 
)

Definition at line 162 of file QwIntegratedRasterChannel.cc.

162  {
163  fTriumf_ADC.SetSingleEventCuts(LL,UL);
164  return 1;
165 }
template<typename T >
void QwIntegratedRasterChannel< T >::SetSingleEventCuts ( UInt_t  errorflag,
Double_t  min = 0,
Double_t  max = 0,
Double_t  stability = 0 
)
virtual

Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.

Reimplemented from VQwDataElement.

Definition at line 170 of file QwIntegratedRasterChannel.cc.

References QwLog::endl(), and QwMessage.

170  {
171  //set the unique tag to identify device type (bcm,bpm & etc)
172  //errorflag|=kBCMErrorFlag;
173  QwMessage<<"QwIntegratedRasterChannel<T> Error Code passing to QwVQWK_Ch "<<errorflag<<QwLog::endl;
174  fTriumf_ADC.SetSingleEventCuts(errorflag,LL,UL,stability);
175 
176 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299

+ Here is the call graph for this function:

template<typename T >
void QwIntegratedRasterChannel< T >::Sum ( QwIntegratedRasterChannel< T > &  value1,
QwIntegratedRasterChannel< T > &  value2 
)

Definition at line 267 of file QwIntegratedRasterChannel.cc.

267  {
268  *this = value1;
269  *this += value2;
270 }
template<typename T>
UInt_t QwIntegratedRasterChannel< T >::UpdateErrorFlag ( )
inlinevirtual

Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag".

Reimplemented from VQwDataElement.

Definition at line 72 of file QwIntegratedRasterChannel.h.

72 {return GetEventcutErrorFlag();};
UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device
template<typename T>
void QwIntegratedRasterChannel< T >::UpdateErrorFlag ( const QwIntegratedRasterChannel< T > *  ev_error)
inline

Definition at line 73 of file QwIntegratedRasterChannel.h.

73  {
74  return fTriumf_ADC.UpdateErrorFlag(ev_error->fTriumf_ADC);
75  }
template<typename T >
void QwIntegratedRasterChannel< T >::UseExternalRandomVariable ( )

Definition at line 72 of file QwIntegratedRasterChannel.cc.

73 {
74  fTriumf_ADC.UseExternalRandomVariable();
75  return;
76 }

Field Documentation

template<typename T>
const Bool_t QwIntegratedRasterChannel< T >::bDEBUG =kFALSE
staticprivate

Definition at line 139 of file QwIntegratedRasterChannel.h.

template<typename T>
Bool_t QwIntegratedRasterChannel< T >::bEVENTCUTMODE
private
template<typename T>
Double_t QwIntegratedRasterChannel< T >::fCalibration
private
template<typename T>
Int_t QwIntegratedRasterChannel< T >::fDeviceErrorCode
private

Definition at line 137 of file QwIntegratedRasterChannel.h.

template<typename T>
Bool_t QwIntegratedRasterChannel< T >::fGoodEvent
private

Definition at line 130 of file QwIntegratedRasterChannel.h.

template<typename T>
Double_t QwIntegratedRasterChannel< T >::fLLimit
private

Definition at line 129 of file QwIntegratedRasterChannel.h.

template<typename T>
Double_t QwIntegratedRasterChannel< T >::fULimit
private

Definition at line 129 of file QwIntegratedRasterChannel.h.


The documentation for this class was generated from the following files: