17#ifdef __USE_DATABASE__
42template<
typename T> boost::variate_generator < boost::mt19937, boost::random::uniform_real_distribution<double> >
94 this->
fBeamCurrent.InitializeChannel(subsystem,
"QwCombinedBCM", name,
"derived");
99 TString type, TString datatosave)
106 this->
fBeamCurrent.InitializeChannel(subsystem,
"QwCombinedBCM", name,
"derived");
119 tmpADC.InitializeChannel(
"tmp",
"derived");
123 for (
size_t i = 0; i <
fElement.size(); i++) {
130 Bool_t ldebug = kFALSE;
136 for (
size_t i = 0; i < 4; i++) {
186 std::cout <<
"random value=="<<tmp <<
"; fProbabilityOfTrip=="<<
fProbabilityOfTrip<<
"; time=="<<time<<std::endl;
215 if (paramfile.
GetLine().find(
"beamtrip")!=std::string::npos){
224 }
else if (paramfile.
GetLine().find(
"resolution")!=std::string::npos){
251 for (
size_t i=0;i<
fElement.size();i++){
265 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.
boost::random::uniform_real_distribution< double > QwCombinedBCM< T >::fDistribution
boost::mt19937 QwCombinedBCM< T >::fRandomnessGenerator
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 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
void LoadMockDataParameters(QwParameterFile ¶mfile) override
UInt_t UpdateErrorFlag() override
Bool_t ApplySingleEventCuts() override
VQwBCM & operator=(const VQwBCM &value) override
static boost::random::uniform_real_distribution< double > fDistribution
Internal normal probability distribution.
static boost::variate_generator< boost::mt19937, boost::random::uniform_real_distribution< double > > fRandomVariable
Internal normal random variable.
void SetBCMForCombo(VQwBCM *bcm, Double_t weight, Double_t sumqw) override
static boost::mt19937 fRandomnessGenerator
Internal randomness generator.
void RandomizeEventData(int helicity=0, double time=0.0) override
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()