17#ifdef __USE_DATABASE__
87 this->
fBeamCurrent.InitializeChannel(subsystem,
"QwCombinedBCM", name,
"derived");
92 TString type, TString datatosave)
99 this->
fBeamCurrent.InitializeChannel(subsystem,
"QwCombinedBCM", name,
"derived");
112 tmpADC.InitializeChannel(
"tmp",
"derived");
116 for (
size_t i = 0; i <
fElement.size(); i++) {
123 Bool_t ldebug = kFALSE;
129 for (
size_t i = 0; i < 4; i++) {
179 std::cout <<
"random value=="<<tmp <<
"; fProbabilityOfTrip=="<<
fProbabilityOfTrip<<
"; time=="<<time<<std::endl;
208 if (paramfile.
GetLine().find(
"beamtrip")!=std::string::npos){
217 }
else if (paramfile.
GetLine().find(
"resolution")!=std::string::npos){
244 for (
size_t i=0;i<
fElement.size();i++){
258 for (
size_t i=0;i<
fElement.size();i++){
Base and derived classes for scaler channel data handling.
#define QwMessage
Predefined log drain for regular messages.
Decoding and management for Moller ADC channels (6x32-bit datawords)
Decoding and management for VQWK ADC channels (6x32-bit datawords)
Database interface for QwIntegrationPMT and subsystems.
Combined beam current monitor using weighted average of multiple BCMs.
std::function< double()> QwCombinedBCM< T >::fRandomVariable
static std::ostream & endl(std::ostream &)
End of the line.
Configuration file parser with flexible tokenization and search capabilities.
T GetTypedNextToken()
Get next token into specific type.
std::string GetNextToken(const std::string &separatorchars)
Get next token as a string.
virtual const TString & GetElementName() const
Get the name of this element.
void SetElementName(const TString &name)
Set the name of this element.
void SetModuleType(TString ModuleType)
set the type of the beam instrument
Template for a combined beam current monitor using weighted inputs.
void SetPedestal(Double_t ped) override
Set the pedestal value for the beam current monitor.
void InitializeChannel(TString name, TString datatosave) override
void SetCalibrationFactor(Double_t calib) override
Set the calibration factor for the beam current monitor.
static std::uniform_real_distribution< double > fDistribution
Internal uniform probability distribution.
static void SetTripSeed(uint seedval)
Double_t fProbabilityOfTrip
void ProcessEvent() override
std::vector< Double_t > fWeights
std::vector< QwBCM< T > * > fElement
void GetProjectedCharge(VQwBCM *device) override
static std::function< double()> fRandomVariable
Internal normal random variable.
void LoadMockDataParameters(QwParameterFile ¶mfile) override
UInt_t UpdateErrorFlag() override
Bool_t ApplySingleEventCuts() override
VQwBCM & operator=(const VQwBCM &value) override
void SetBCMForCombo(VQwBCM *bcm, Double_t weight, Double_t sumqw) override
void RandomizeEventData(int helicity=0, double time=0.0) override
static std::mt19937 fRandomnessGenerator
Internal randomness generator.
void SetResolution(Double_t resolution)
Bool_t ApplySingleEventCuts() override
Apply single-event cuts for this BCM and return pass/fail.
void ClearEventData() override
Clear event-scoped data in the underlying channel.
virtual void FillRawEventData()
VQwBCM(VQwDataElement &beamcurrent)
virtual const VQwHardwareChannel * GetCharge() const
virtual void ApplyResolutionSmearing()