QwAnalysis
VQwHardwareChannel Class Referenceabstract

#include <VQwHardwareChannel.h>

+ Inheritance diagram for VQwHardwareChannel:
+ Collaboration diagram for VQwHardwareChannel:

Public Member Functions

 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
 
virtual Int_t GetRawValue (size_t element) const =0
 
virtual Double_t GetValue (size_t element) const =0
 
virtual Double_t GetValueM2 (size_t element) const =0
 
virtual Double_t GetValueError (size_t element) const =0
 
Double_t GetValueWidth (size_t element) const
 
virtual void ClearEventData ()
 Clear the event data in this element. More...
 
virtual void Scale (Double_t Offset)=0
 
void InitializeChannel (TString name)
 Initialize the fields in this object. More...
 
virtual void InitializeChannel (TString name, TString datatosave)=0
 
virtual void InitializeChannel (TString subsystem, TString instrumenttype, TString name, TString datatosave)=0
 
virtual Int_t ApplyHWChecks ()=0
 
void SetEventCutMode (Int_t bcuts)
 
virtual Bool_t ApplySingleEventCuts ()=0
 
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 void CalculateRunningAverage ()=0
 
virtual VQwHardwareChanneloperator= (const VQwHardwareChannel &value)
 Arithmetic assignment operator: Should only copy event-based data. More...
 
void AssignValueFrom (const VQwDataElement *valueptr)=0
 
virtual VQwHardwareChanneloperator+= (const VQwHardwareChannel *input)=0
 
virtual VQwHardwareChanneloperator-= (const VQwHardwareChannel *input)=0
 
virtual VQwHardwareChanneloperator*= (const VQwHardwareChannel *input)=0
 
virtual VQwHardwareChanneloperator/= (const VQwHardwareChannel *input)=0
 
virtual void ScaledAdd (Double_t scale, const VQwHardwareChannel *value)=0
 
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, Int_t count)=0
 
virtual void AccumulateRunningSum (const VQwHardwareChannel *value)
 
virtual void DeaccumulateRunningSum (const VQwHardwareChannel *value)
 
virtual void AddValueFrom (const VQwHardwareChannel *valueptr)=0
 
virtual void SubtractValueFrom (const VQwHardwareChannel *valueptr)=0
 
virtual void MultiplyBy (const VQwHardwareChannel *valueptr)=0
 
virtual void DivideBy (const VQwHardwareChannel *valueptr)=0
 
virtual void ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values)=0
 
virtual void ConstructBranch (TTree *tree, TString &prefix)=0
 
void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist)
 
virtual void FillTreeVector (std::vector< Double_t > &values) const =0
 
- 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)
 
virtual Int_t ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t subelement=0)=0
 Process the CODA event buffer for this element. More...
 
size_t GetNumberOfDataWords ()
 Get the number of data words in this data element. More...
 
UInt_t GetGoodEventCount () const
 
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 ConstructHistograms (TDirectory *folder, TString &prefix)=0
 Construct the histograms for this data element. More...
 
virtual void FillHistograms ()=0
 Fill the histograms for this data element. More...
 
virtual void PrintValue () const
 Print single line of value and error of this data element. More...
 
virtual void PrintInfo () const
 Print multiple lines of information about this data element. More...
 
virtual void PrintErrorCounters () const
 report number of events failed due to HW and event cut failure More...
 
virtual UInt_t GetEventcutErrorFlag ()
 return the error flag on this channel/device 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...
 

Protected Member Functions

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 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

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
 
Channel calibration
Double_t fPedestal
 
Double_t fCalibrationFactor
 
Bool_t kFoundPedestal
 
Bool_t kFoundGain
 
Single event cuts and errors
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_ptrfHistograms
 Histograms associated with this data element. More...
 

Additional Inherited Members

- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0, kDerived }
 

Detailed Description

Definition at line 27 of file VQwHardwareChannel.h.

Constructor & Destructor Documentation

VQwHardwareChannel::VQwHardwareChannel ( )

Class: VQwHardwareChannel Virtual base class to support common functions for all hardware channel data elements. Only the data element classes which contain raw data from one physical channel (such as QwVQWK_Channel, QwScaler_Channel, etc.) should inherit from this class.

Definition at line 8 of file VQwHardwareChannel.cc.

References VQwDataElement::fErrorConfigFlag, VQwDataElement::fErrorFlag, fLLimit, and fULimit.

8  :
11 {
12  fULimit = 0.0;
13  fLLimit = 0.0;
14  fErrorFlag = 0;
15  fErrorConfigFlag = 0;
16 }
UInt_t fNumberOfDataWords
Number of raw data words in this data element.
UInt_t fNumberOfSubElements
Number of subelements in this data element.
UInt_t fErrorFlag
This the standard error code generated for the channel that contains the global/local/stability flags...
UInt_t fErrorConfigFlag
contains the global/local/stability flags
VQwHardwareChannel::VQwHardwareChannel ( const VQwHardwareChannel value)

Definition at line 18 of file VQwHardwareChannel.cc.

19  :VQwDataElement(value),
22  fDataToSave(value.fDataToSave),
25  fPedestal(value.fPedestal),
28  kFoundGain(value.kFoundGain),
30  fULimit(value.fULimit),
31  fLLimit(value.fLLimit),
32  fStability(value.fStability)
33 {
34 }
VQwDataElement()
Default constructor.
UInt_t fNumberOfDataWords
Number of raw data words in this data element.
UInt_t fNumberOfSubElements
Number of subelements in this data element.
VQwHardwareChannel::VQwHardwareChannel ( const VQwHardwareChannel value,
VQwDataElement::EDataToSave  datatosave 
)

Definition at line 36 of file VQwHardwareChannel.cc.

37  :VQwDataElement(value),
40  fDataToSave(datatosave),
43  fPedestal(value.fPedestal),
46  kFoundGain(value.kFoundGain),
48  fULimit(value.fULimit),
49  fLLimit(value.fLLimit),
50  fStability(value.fStability)
51 {
52 }
VQwDataElement()
Default constructor.
UInt_t fNumberOfDataWords
Number of raw data words in this data element.
UInt_t fNumberOfSubElements
Number of subelements in this data element.
virtual VQwHardwareChannel::~VQwHardwareChannel ( )
inlinevirtual

Definition at line 40 of file VQwHardwareChannel.h.

40 { };

Member Function Documentation

virtual void VQwHardwareChannel::AccumulateRunningSum ( const VQwHardwareChannel value,
Int_t  count 
)
pure virtual

Implemented in VQwScaler_Channel, and QwVQWK_Channel.

Referenced by AccumulateRunningSum(), and DeaccumulateRunningSum().

+ Here is the caller graph for this function:

virtual void VQwHardwareChannel::AccumulateRunningSum ( const VQwHardwareChannel value)
inlinevirtual

Definition at line 133 of file VQwHardwareChannel.h.

References AccumulateRunningSum(), and VQwDataElement::fGoodEventCount.

133  {
134  AccumulateRunningSum(value, value->fGoodEventCount);
135  };
virtual void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count)=0
Int_t fGoodEventCount
Number of good events accumulated in this element.

+ Here is the call graph for this function:

void VQwHardwareChannel::AddEntriesToList ( std::vector< QwDBInterface > &  row_list)

Definition at line 72 of file VQwHardwareChannel.cc.

References VQwDataElement::GetElementName(), VQwDataElement::GetGoodEventCount(), GetNumberOfSubelements(), GetValue(), GetValueError(), QwDBInterface::Reset(), QwDBInterface::SetDetectorName(), QwDBInterface::SetError(), QwDBInterface::SetN(), QwDBInterface::SetSubblock(), and QwDBInterface::SetValue().

Referenced by QwEnergyCalculator::GetDBEntry(), QwQPD::GetDBEntry(), QwBPMCavity::GetDBEntry(), QwLinearDiodeArray::GetDBEntry(), and QwIntegrationPMT::GetDBEntry().

73 {
74  QwDBInterface row;
75  TString name = GetElementName();
76  UInt_t entries = GetGoodEventCount();
77  // Loop over subelements and build the list.
78  for(UInt_t subelement=0;
79  subelement<GetNumberOfSubelements();
80  subelement++) {
81  row.Reset();
82  row.SetDetectorName(name);
83  row.SetSubblock(subelement);
84  row.SetN(entries);
85  row.SetValue(GetValue(subelement));
86  row.SetError(GetValueError(subelement));
87  row_list.push_back(row);
88  }
89 }
void SetError(Double_t in)
Definition: QwDBInterface.h:89
UInt_t GetGoodEventCount() const
void SetN(UInt_t in)
Definition: QwDBInterface.h:87
void SetDetectorName(TString &in)
Definition: QwDBInterface.h:72
void SetSubblock(UInt_t in)
Definition: QwDBInterface.h:86
size_t GetNumberOfSubelements()
Get the number of subelements in this data element.
void SetValue(Double_t in)
Definition: QwDBInterface.h:88
virtual const TString & GetElementName() const
Get the name of this element.
Double_t GetValueError() const
Double_t GetValue() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void VQwHardwareChannel::AddErrEntriesToList ( std::vector< QwErrDBInterface > &  row_list)
inlinevirtual

Reimplemented in QwVQWK_Channel.

Definition at line 129 of file VQwHardwareChannel.h.

129 {};
virtual void VQwHardwareChannel::AddValueFrom ( const VQwHardwareChannel valueptr)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual Int_t VQwHardwareChannel::ApplyHWChecks ( )
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual Bool_t VQwHardwareChannel::ApplySingleEventCuts ( )
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

void VQwHardwareChannel::AssignValueFrom ( const VQwDataElement valueptr)
pure virtual

Reimplemented from VQwDataElement.

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

Referenced by QwSubsystemArray::ReturnInternalValue().

+ Here is the caller graph for this function:

virtual void VQwHardwareChannel::CalculateRunningAverage ( )
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual void VQwHardwareChannel::ClearEventData ( )
inlinevirtual

Clear the event data in this element.

Reimplemented from VQwDataElement.

Reimplemented in QwVQWK_Channel, and VQwScaler_Channel.

Definition at line 70 of file VQwHardwareChannel.h.

References VQwDataElement::ClearEventData().

70  {
72  };
virtual void ClearEventData()
Clear the event data in this element.

+ Here is the call graph for this function:

virtual void VQwHardwareChannel::ConstructBranch ( TTree *  tree,
TString &  prefix 
)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

Referenced by ConstructBranch().

+ Here is the caller graph for this function:

void VQwHardwareChannel::ConstructBranch ( TTree *  tree,
TString &  prefix,
QwParameterFile modulelist 
)

Definition at line 91 of file VQwHardwareChannel.cc.

References ConstructBranch(), VQwDataElement::GetElementName(), and QwParameterFile::HasValue().

91  {
92  if (GetElementName()!=""){
93  TString devicename;
94  devicename=GetElementName();
95  devicename.ToLower();
96  if (modulelist.HasValue(devicename)){
97  ConstructBranch(tree,prefix);
98  }
99  }
100 }
virtual void ConstructBranch(TTree *tree, TString &prefix)=0
Bool_t HasValue(TString &vname)
virtual const TString & GetElementName() const
Get the name of this element.

+ Here is the call graph for this function:

virtual void VQwHardwareChannel::ConstructBranchAndVector ( TTree *  tree,
TString &  prefix,
std::vector< Double_t > &  values 
)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual void VQwHardwareChannel::DeaccumulateRunningSum ( const VQwHardwareChannel value)
inlinevirtual

Definition at line 136 of file VQwHardwareChannel.h.

References AccumulateRunningSum().

136  {
137  AccumulateRunningSum(value, -1);
138  };
virtual void AccumulateRunningSum(const VQwHardwareChannel *value, Int_t count)=0

+ Here is the call graph for this function:

virtual void VQwHardwareChannel::DivideBy ( const VQwHardwareChannel valueptr)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual void VQwHardwareChannel::FillTreeVector ( std::vector< Double_t > &  values) const
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

Double_t VQwHardwareChannel::GetCalibrationFactor ( ) const
inline

Definition at line 126 of file VQwHardwareChannel.h.

References fCalibrationFactor.

126 { return fCalibrationFactor; };
virtual UInt_t VQwHardwareChannel::GetErrorCode ( ) const
inlinevirtual

Definition at line 105 of file VQwHardwareChannel.h.

References VQwDataElement::fErrorFlag.

Referenced by QwQPD::ApplySingleEventCuts(), QwBPMCavity::ApplySingleEventCuts(), QwLinearDiodeArray::ApplySingleEventCuts(), QwQPD::UpdateErrorFlag(), QwBPMCavity::UpdateErrorFlag(), and QwLinearDiodeArray::UpdateErrorFlag().

105 {return (fErrorFlag);};
UInt_t fErrorFlag
This the standard error code generated for the channel that contains the global/local/stability flags...

+ Here is the caller graph for this function:

Double_t VQwHardwareChannel::GetEventCutLowerLimit ( ) const
inline

Definition at line 99 of file VQwHardwareChannel.h.

References fLLimit.

99 { return fLLimit; };
Double_t VQwHardwareChannel::GetEventCutUpperLimit ( ) const
inline

Definition at line 98 of file VQwHardwareChannel.h.

References fULimit.

98 { return fULimit; };
size_t VQwHardwareChannel::GetNumberOfDataWords ( )
inline

Get the number of data words in this data element.

Definition at line 45 of file VQwHardwareChannel.h.

References fNumberOfDataWords.

45 {return fNumberOfDataWords;}
UInt_t fNumberOfDataWords
Number of raw data words in this data element.
size_t VQwHardwareChannel::GetNumberOfSubelements ( )
inline

Get the number of subelements in this data element.

Definition at line 48 of file VQwHardwareChannel.h.

References fNumberOfSubElements.

Referenced by AddEntriesToList().

48 {return fNumberOfSubElements;};
UInt_t fNumberOfSubElements
Number of subelements in this data element.

+ Here is the caller graph for this function:

Double_t VQwHardwareChannel::GetPedestal ( ) const
inline

Definition at line 124 of file VQwHardwareChannel.h.

References fPedestal.

124 { return fPedestal; };
Int_t VQwHardwareChannel::GetRawValue ( ) const
inline

Definition at line 50 of file VQwHardwareChannel.h.

References GetRawValue().

Referenced by VQwScaler_Channel::ApplyHWChecks(), QwVQWK_Channel::GetRawBlockValue(), QwVQWK_Channel::GetRawHardwareSum(), and GetRawValue().

50 {return this->GetRawValue(0);};
Int_t GetRawValue() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual Int_t VQwHardwareChannel::GetRawValue ( size_t  element) const
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

Double_t VQwHardwareChannel::GetStabilityLimit ( ) const
inline

Definition at line 101 of file VQwHardwareChannel.h.

References fStability.

101 { return fStability;};
Double_t VQwHardwareChannel::GetValue ( ) const
inline

Definition at line 51 of file VQwHardwareChannel.h.

References GetValue().

Referenced by AddEntriesToList(), VQwScaler_Channel::ApplySingleEventCuts(), QwVQWK_Channel::GetBlockValue(), QwVQWK_Channel::GetHardwareSum(), GetValue(), VQwScaler_Channel::PrintValue(), and VQwScaler_Channel::ProcessEvent().

51 {return this->GetValue(0);};
Double_t GetValue() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual Double_t VQwHardwareChannel::GetValue ( size_t  element) const
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

Double_t VQwHardwareChannel::GetValueError ( ) const
inline

Definition at line 53 of file VQwHardwareChannel.h.

References GetValueError().

Referenced by AddEntriesToList(), QwVQWK_Channel::GetBlockErrorValue(), QwVQWK_Channel::GetHardwareSumError(), GetValueError(), GetValueWidth(), and VQwScaler_Channel::PrintValue().

53 {return this->GetValueError(0);};
Double_t GetValueError() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual Double_t VQwHardwareChannel::GetValueError ( size_t  element) const
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

Double_t VQwHardwareChannel::GetValueM2 ( ) const
inline

Definition at line 52 of file VQwHardwareChannel.h.

References GetValueM2().

Referenced by QwVQWK_Channel::GetHardwareSumM2(), and GetValueM2().

52 {return this->GetValueM2(0);};
Double_t GetValueM2() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual Double_t VQwHardwareChannel::GetValueM2 ( size_t  element) const
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

Double_t VQwHardwareChannel::GetValueWidth ( ) const
inline

Definition at line 54 of file VQwHardwareChannel.h.

References GetValueWidth().

Referenced by QwVQWK_Channel::CalculateRunningAverage(), QwVQWK_Channel::GetHardwareSumWidth(), GetValueWidth(), and VQwScaler_Channel::PrintValue().

54 {return this->GetValueWidth(0);};
Double_t GetValueWidth() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Double_t VQwHardwareChannel::GetValueWidth ( size_t  element) const
inline

Definition at line 59 of file VQwHardwareChannel.h.

References VQwDataElement::fGoodEventCount, GetValueError(), and RangeCheck().

59  {
60  RangeCheck(element);
61  Double_t width;
62  if (fGoodEventCount>0){
63  width = (GetValueError(element)*std::sqrt(Double_t(fGoodEventCount)));
64  } else {
65  width = 0.0;
66  }
67  return width;
68  };
void RangeCheck(size_t element) const
Checks that the requested element is in range, to be used in accesses to subelements similar to std::...
Int_t fGoodEventCount
Number of good events accumulated in this element.
Double_t GetValueError() const

+ Here is the call graph for this function:

void VQwHardwareChannel::InitializeChannel ( TString  name)
inline

Initialize the fields in this object.

Definition at line 79 of file VQwHardwareChannel.h.

References InitializeChannel().

Referenced by InitializeChannel().

79 {InitializeChannel(name, "raw");};
void InitializeChannel(TString name)
Initialize the fields in this object.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void VQwHardwareChannel::InitializeChannel ( TString  name,
TString  datatosave 
)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual void VQwHardwareChannel::InitializeChannel ( TString  subsystem,
TString  instrumenttype,
TString  name,
TString  datatosave 
)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual void VQwHardwareChannel::MultiplyBy ( const VQwHardwareChannel valueptr)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual VQwHardwareChannel& VQwHardwareChannel::operator*= ( const VQwHardwareChannel input)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual VQwHardwareChannel& VQwHardwareChannel::operator+= ( const VQwHardwareChannel input)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual VQwHardwareChannel& VQwHardwareChannel::operator-= ( const VQwHardwareChannel input)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual VQwHardwareChannel& VQwHardwareChannel::operator/= ( const VQwHardwareChannel input)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual VQwHardwareChannel& VQwHardwareChannel::operator= ( const VQwHardwareChannel value)
inlinevirtual

Arithmetic assignment operator: Should only copy event-based data.

Definition at line 111 of file VQwHardwareChannel.h.

References VQwDataElement::operator=().

Referenced by VQwScaler_Channel::operator=(), and QwVQWK_Channel::operator=().

111  {
113  return *this;
114  }
virtual VQwDataElement & operator=(const VQwDataElement &value)
Arithmetic assignment operator: Should only copy event-based data.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void VQwHardwareChannel::RangeCheck ( size_t  element) const
inlineprotected

Checks that the requested element is in range, to be used in accesses to subelements similar to std::vector::at().

Definition at line 175 of file VQwHardwareChannel.h.

References fNumberOfSubElements, and VQwDataElement::GetElementName().

Referenced by QwVQWK_Channel::GetRawValue(), QwVQWK_Channel::GetValue(), QwVQWK_Channel::GetValueError(), QwVQWK_Channel::GetValueM2(), and GetValueWidth().

175  {
176  if (element<0 || element >= fNumberOfSubElements){
177  TString loc="VQwDataElement::RangeCheck for "
178  +this->GetElementName()+" failed for subelement "+Form("%zu",element);
179  throw std::out_of_range(loc.Data());
180 
181  }
182  };
UInt_t fNumberOfSubElements
Number of subelements in this data element.
virtual const TString & GetElementName() const
Get the name of this element.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void VQwHardwareChannel::Scale ( Double_t  Offset)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

virtual void VQwHardwareChannel::ScaledAdd ( Double_t  scale,
const VQwHardwareChannel value 
)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

void VQwHardwareChannel::SetCalibrationFactor ( Double_t  factor)
inline
void VQwHardwareChannel::SetDataToSave ( TString  datatosave)
inlineprotected

Set the flag indicating if raw or derived values are in this data element.

Definition at line 158 of file VQwHardwareChannel.h.

References fDataToSave, VQwDataElement::kDerived, and VQwDataElement::kRaw.

Referenced by VQwScaler_Channel::InitializeChannel(), and QwVQWK_Channel::InitializeChannel().

158  {
159  if (datatosave == "raw")
160  fDataToSave = kRaw;
161  else if (datatosave == "derived")
163  else
164  fDataToSave = kRaw; // wdc, added default fall-through
165  }

+ Here is the caller graph for this function:

void VQwHardwareChannel::SetDataToSave ( VQwDataElement::EDataToSave  datatosave)
inlineprotected

Set the flag indicating if raw or derived values are in this data element.

Definition at line 168 of file VQwHardwareChannel.h.

References fDataToSave.

168  {
169  fDataToSave = datatosave;
170  }
void VQwHardwareChannel::SetEventCutMode ( Int_t  bcuts)
inline
void VQwHardwareChannel::SetNumberOfDataWords ( const UInt_t &  numwords)
inlineprotected

Set the number of data words in this data element.

Definition at line 152 of file VQwHardwareChannel.h.

References fNumberOfDataWords.

Referenced by VQwScaler_Channel::InitializeChannel(), and QwVQWK_Channel::InitializeChannel().

152 {fNumberOfDataWords = numwords;}
UInt_t fNumberOfDataWords
Number of raw data words in this data element.

+ Here is the caller graph for this function:

void VQwHardwareChannel::SetNumberOfSubElements ( const size_t  elements)
inlineprotected

Set the number of data words in this data element.

Definition at line 154 of file VQwHardwareChannel.h.

References fNumberOfSubElements.

Referenced by VQwScaler_Channel::InitializeChannel(), and QwVQWK_Channel::InitializeChannel().

154 {fNumberOfSubElements = elements;};
UInt_t fNumberOfSubElements
Number of subelements in this data element.

+ Here is the caller graph for this function:

void VQwHardwareChannel::SetPedestal ( Double_t  ped)
inline
void VQwHardwareChannel::SetSingleEventCuts ( Double_t  min,
Double_t  max 
)

Set the upper and lower limits (fULimit and fLLimit) for this channel.

Definition at line 55 of file VQwHardwareChannel.cc.

References fLLimit, fULimit, and Qw::min.

Referenced by QwEnergyCalculator::SetSingleEventCuts(), VQwBPM::SetSingleEventCuts(), SetSingleEventCuts(), and QwIntegrationPMT::SetSingleEventCuts().

56 {
57  fULimit=max;
58  fLLimit=min;
59 }
static const double min
Definition: QwUnits.h:76

+ Here is the caller graph for this function:

void VQwHardwareChannel::SetSingleEventCuts ( UInt_t  errorflag,
Double_t  min,
Double_t  max,
Double_t  stability 
)
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 61 of file VQwHardwareChannel.cc.

References QwLog::endl(), VQwDataElement::fErrorConfigFlag, fStability, VQwDataElement::GetElementName(), kGlobalCut, kStabilityCut, QwMessage, and SetSingleEventCuts().

62 {
63  fErrorConfigFlag=errorflag;
64  fStability=stability;
66  QwMessage << "Set single event cuts for " << GetElementName() << ": "
67  << "Config-error-flag == 0x" << std::hex << errorflag << std::dec
68  << ", global? " << ((fErrorConfigFlag & kGlobalCut)==kGlobalCut) << ", stability? " << ((fErrorConfigFlag & kStabilityCut)==kStabilityCut)<<" cut "<<fStability << QwLog::endl;
69 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
void SetSingleEventCuts(Double_t min, Double_t max)
Set the upper and lower limits (fULimit and fLLimit) for this channel.
static const double min
Definition: QwUnits.h:76
UInt_t fErrorConfigFlag
contains the global/local/stability flags
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
static const UInt_t kGlobalCut
Definition: QwTypes.h:176
virtual const TString & GetElementName() const
Get the name of this element.
static const UInt_t kStabilityCut
Definition: QwTypes.h:178

+ Here is the call graph for this function:

virtual void VQwHardwareChannel::SubtractValueFrom ( const VQwHardwareChannel valueptr)
pure virtual

Implemented in QwVQWK_Channel, and VQwScaler_Channel.

UInt_t VQwHardwareChannel::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 103 of file VQwHardwareChannel.h.

References VQwDataElement::GetEventcutErrorFlag().

Referenced by QwQPD::ApplySingleEventCuts(), QwBPMCavity::ApplySingleEventCuts(), QwLinearDiodeArray::ApplySingleEventCuts(), QwEnergyCalculator::UpdateErrorFlag(), QwQPD::UpdateErrorFlag(), QwBPMCavity::UpdateErrorFlag(), QwLinearDiodeArray::UpdateErrorFlag(), and QwIntegrationPMT::UpdateErrorFlag().

103 {return GetEventcutErrorFlag();};
virtual UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void VQwHardwareChannel::UpdateErrorFlag ( const VQwHardwareChannel elem)
inline

Definition at line 104 of file VQwHardwareChannel.h.

References VQwDataElement::fErrorFlag.

104 {fErrorFlag |= elem.fErrorFlag;};
UInt_t fErrorFlag
This the standard error code generated for the channel that contains the global/local/stability flags...

Field Documentation

Int_t VQwHardwareChannel::bEVENTCUTMODE
protected
Double_t VQwHardwareChannel::fLLimit
protected
UInt_t VQwHardwareChannel::fNumberOfDataWords
protected

Number of raw data words in this data element.

Definition at line 182 of file VQwHardwareChannel.h.

Referenced by GetNumberOfDataWords(), QwVQWK_Channel::ProcessEvBuffer(), and SetNumberOfDataWords().

UInt_t VQwHardwareChannel::fNumberOfSubElements
protected

Number of subelements in this data element.

Definition at line 188 of file VQwHardwareChannel.h.

Referenced by GetNumberOfSubelements(), RangeCheck(), and SetNumberOfSubElements().

Double_t VQwHardwareChannel::fPedestal
protected
              Pedestal of the hardware sum signal,

we assume the pedestal level is constant over time and can be divided by four for use with each block, units: [counts / number of samples]

Definition at line 198 of file VQwHardwareChannel.h.

Referenced by GetPedestal(), VQwScaler_Channel::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), QwVQWK_Channel::PrintInfo(), VQwScaler_Channel::ProcessEvent(), QwVQWK_Channel::ProcessEvent(), VQwScaler_Channel::RandomizeEventData(), QwVQWK_Channel::SetEventData(), and SetPedestal().

Double_t VQwHardwareChannel::fStability
protected

how much deviaton from the stable reading is allowed

Definition at line 211 of file VQwHardwareChannel.h.

Referenced by QwVQWK_Channel::CalculateRunningAverage(), GetStabilityLimit(), and SetSingleEventCuts().

Bool_t VQwHardwareChannel::kFoundGain
protected
Bool_t VQwHardwareChannel::kFoundPedestal
protected

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