49 Bool_t local_debug =
false;
52 TString sumstr = name+TString(
"");
56 if(local_debug) std::cout<<
"linked combined PMT channel "<<
GetElementName()<<std::endl;
80 Bool_t ldebug = kFALSE;
81 Double_t total_weights=0.0;
86 for (
size_t i=0;i<
fElement.size();i++)
102 if (total_weights!=0.0)
108 std::cout<<
"QwCombinedPMT::CalculateAverage()"<<std::endl;
117 for (
size_t i=0;i<4;i++)
119 std::cout<<
"weighted average of block["<<i<<
"] = "<<
fSumADC.
GetValue(i+1)<<
"\n";
128 Bool_t eventokay=kTRUE;
168 for (
size_t i=0;i<
fElement.size();i++) {
177 if(
typeid(*ev_error)==
typeid(*
this)) {
183 TString loc=
"Standard exception from QwCombinedPMT::UpdateErrorFlag :"+
186 throw std::invalid_argument(loc.Data());
188 }
catch (std::exception&
e) {
189 std::cerr<< e.what()<<std::endl;
212 for (
size_t i=0; i<value.
fElement.size(); i++)
241 for (
size_t i=0; i<value.
fElement.size(); i++)
259 for (
size_t i=0; i<value.
fElement.size(); i++)
364 TString sumprefix = prefix+TString(
"");
397 TString sumprefix = prefix+
"";
412 TString sumprefix = prefix+
"";
422 devicename.ToLower();
429 if (modulelist.
HasValue(devicename)){
430 TString sumprefix = prefix+
"";
#define QwMessage
Predefined log drain for regular messages.
std::vector< QwDBInterface > GetDBEntry()
void ClearEventData()
Clear the event data in this element.
Bool_t ApplySingleEventCuts()
void AccumulateRunningSum(const QwIntegrationPMT &value)
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
QwCombinedPMT & operator-=(const QwCombinedPMT &value)
void PrintErrorCounters()
void InitializeChannel(TString name, TString datatosave)
void AccumulateRunningSum(const QwCombinedPMT &value)
void Scale(Double_t factor)
void Normalize(VQwDataElement *denom)
void SetSingleEventCuts(UInt_t errorflag, Double_t LL, Double_t UL, Double_t stability)
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.
Class for blinding data, adapted from G0 blinder class.
void PrintValue() const
Print single line of value and error of this data element.
void ClearEventData()
Clear the event data in this element.
void ConstructHistograms(TDirectory *folder, TString &prefix)
Construct the histograms for this data element.
void Scale(Double_t factor)
void SetEventData(Double_t *block, UInt_t sequencenumber)
void FillHistograms()
Fill the histograms for this data element.
void DeaccumulateRunningSum(QwCombinedPMT &value)
UInt_t UpdateErrorFlag()
Update the error flag based on the error flags of internally contained objects Return paramter is the...
void InitializeChannel(TString name, TString datatosave)
void Ratio(QwIntegrationPMT &numer, QwIntegrationPMT &denom)
void Ratio(QwCombinedPMT &numer, QwCombinedPMT &denom)
void ConstructBranch(TTree *tree, TString &prefix)
void Normalize(VQwDataElement *denom)
void SetDefaultSampleSize(Int_t sample_size)
void CalculateRunningAverage()
void LinkChannel(TString name)
void Difference(QwCombinedPMT &value1, QwCombinedPMT &value2)
void FillHistograms()
Fill the histograms for this data element.
Bool_t HasValue(TString &vname)
void CalculateRunningAverage()
The pure virtual base class of all data elements.
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t subelement=0)
Process the CODA event buffer for this element.
void Blind(const QwBlinder *blinder)
Blind the asymmetry.
void PrintErrorCounters()
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
void PrintValue() const
Print single line of value and error of this data element.
std::vector< QwDBInterface > GetDBEntry()
Int_t SetSingleEventCuts(Double_t, Double_t)
void SetBlindability(Bool_t isblindable)
void SetElementName(const TString &name)
Set the name of this element.
std::vector< QwIntegrationPMT * > fElement
used to validate sequence number in the IsGoodEvent()
void ConstructHistograms(TDirectory *folder, TString &prefix)
Construct the histograms for this data element.
void DeaccumulateRunningSum(QwIntegrationPMT &value)
void Blind(const QwBlinder *blinder)
Blind the asymmetry.
void SetEventData(Double_t *block, UInt_t sequencenumber)
UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device
void FillTreeVector(std::vector< Double_t > &values) const
QwCombinedPMT & operator=(const QwCombinedPMT &value)
UInt_t UpdateErrorFlag()
Update the error flag based on the error flags of internally contained objects Return paramter is the...
std::vector< Double_t > fWeights
static std::ostream & endl(std::ostream &)
End of the line.
void CalculateSumAndAverage()
virtual const TString & GetElementName() const
Get the name of this element.
Bool_t ApplySingleEventCuts()
std::vector< QwErrDBInterface > GetErrDBEntry()
void ConstructBranch(TTree *tree, TString &prefix)
void SetElementName(const TString &name)
std::vector< QwErrDBInterface > GetErrDBEntry()
void FillTreeVector(std::vector< Double_t > &values) const
void SetHardwareSum(Double_t hwsum, UInt_t sequencenumber=0)
void PrintInfo() const
Print multiple lines of information about this data element.
void Add(QwIntegrationPMT *pmt, Double_t weight)
void SetDefaultSampleSize(Int_t sample_size)
void Sum(QwCombinedPMT &value1, QwCombinedPMT &value2)
QwCombinedPMT & operator+=(const QwCombinedPMT &value)
void PrintInfo() const
Print multiple lines of information about this data element.