29 fElement.push_back(
dynamic_cast<QwBCM<T>*
>(bcm));
30 fWeights.push_back(weight);
40 SetCalibrationFactor(1.);
41 this->SetElementName(name);
42 this->fBeamCurrent.InitializeChannel(name,
"derived");
49 SetCalibrationFactor(1.);
50 this->SetElementName(name);
51 this->fBeamCurrent.InitializeChannel(subsystem,
"QwCombinedBCM", name,
"derived");
56 TString type, TString datatosave)
59 SetCalibrationFactor(1.);
60 this->SetElementName(name);
61 this->SetModuleType(type);
62 this->fBeamCurrent.InitializeChannel(subsystem,
"QwCombinedBCM", name,
"derived");
71 tmpADC.InitializeChannel(
"tmp",
"derived");
73 for (
size_t i = 0; i < fElement.size(); i++) {
74 tmpADC = fElement[i]->fBeamCurrent;
75 tmpADC.Scale(fWeights[i]);
76 this->fBeamCurrent += tmpADC;
78 this->fBeamCurrent.Scale(1.0/fSumQweights);
80 Bool_t ldebug = kFALSE;
83 QwMessage <<
"QwCombinedBCM: " << this->GetElementName() << QwLog::endl
84 <<
"weighted average of hardware sums = " << this->fBeamCurrent.GetValue() <<
QwLog::endl;
85 if (this->fBeamCurrent.GetNumberOfSubelements() > 1) {
86 for (
size_t i = 0; i < 4; i++) {
87 QwMessage <<
"weighted average of block[" << i <<
"] = " << this->fBeamCurrent.GetValue(i) <<
QwLog::endl;
105 for (
size_t i=0;i<fElement.size();i++){
106 this->fBeamCurrent.UpdateErrorFlag(fElement.at(i)->fBeamCurrent.GetErrorCode());
116 for (
size_t i=0;i<fElement.size();i++){
117 this->fBeamCurrent.UpdateErrorFlag(fElement.at(i)->fBeamCurrent.GetErrorCode());
119 return this->fBeamCurrent.GetEventcutErrorFlag();
181 if (this->GetElementName()!=
"")
190 if (this->GetElementName()!=
"")
#define QwMessage
Predefined log drain for regular messages.
VQwBCM & operator=(const VQwBCM &value)
void SetBCMForCombo(VQwBCM *bcm, Double_t weight, Double_t sumqw)
UInt_t UpdateErrorFlag()
Update the error flag based on the error flags of internally contained objects Return paramter is the...
static const double T
Magnetic field: base unit is T.
Bool_t ApplySingleEventCuts()
static std::ostream & endl(std::ostream &)
End of the line.
Bool_t ApplySingleEventCuts()
void InitializeChannel(TString name, TString datatosave)