9 #include "CLHEP/Random/RandFlat.h"
13 : theAmplifier(amplifier),
14 theCoderFactory(coderFactory),
17 theStartingCapIdIsRandom(
false),
18 PreMixDigis(PreMixing)
42 result.setSize(frame.
size());
50 convert<HBHEDataFrame>(lf,
result);
52 for(
int isample = 0; isample !=lf.size(); ++isample) {
53 uint16_t theADC = round(10.0*lf[isample]);
54 unsigned capId = result[isample].capid();
57 uint16_t keepADC = result[isample].adc();
71 convert<HODataFrame>(lf,
result);
73 for(
int isample = 0; isample !=lf.size(); ++isample) {
74 uint16_t theADC = round(10.0*lf[isample]);
75 unsigned capId = result[isample].capid();
78 uint16_t keepADC = result[isample].adc();
92 convert<HFDataFrame>(lf,
result);
94 for(
int isample = 0; isample !=lf.size(); ++isample) {
95 uint16_t theADC = round(10.0*lf[isample]);
96 unsigned capId = result[isample].capid();
99 uint16_t keepADC = result[isample].adc();
112 convert<ZDCDataFrame>(lf,
result);
114 for(
int isample = 0; isample !=lf.size(); ++isample) {
115 uint16_t theADC = round(10.0*lf[isample]);
116 unsigned capId = result[isample].capid();
119 uint16_t keepADC = result[isample].adc();
134 convert<HcalUpgradeDataFrame>(lf,
result);
HcalAmplifier * theAmplifier
void setRandomEngine(CLHEP::HepRandomEngine &engine)
void setStartingCapId(int startingCapId)
void convert(CaloSamples &frame, Digi &result)
void setStartingCapId(int capId)
void setDbService(const HcalDbService *service)
HcalElectronicsSim(HcalAmplifier *amplifier, const HcalCoderFactory *coderFactory, bool PreMix)
void analogToDigital(CaloSamples &linearFrame, HBHEDataFrame &result)
void setSample(int i, const HcalQIESample &sam)
void setSample(int i, const HcalQIESample &sam)
void setRandomEngine(CLHEP::HepRandomEngine &engine)
const HcalCoderFactory * theCoderFactory
bool theStartingCapIdIsRandom
void setSample(int i, const HcalQIESample &sam)
void timing(const CaloSamples &lf, HcalUpgradeDataFrame &digi) const
adds timing information to the digi
int size() const
get the size
virtual void amplify(CaloSamples &linearFrame) const
CLHEP::RandFlat * theRandFlat
void setSample(int i, const HcalQIESample &sam)
volatile std::atomic< bool > shutdown_flag false
void setRandomEngine(CLHEP::HepRandomEngine &engine)
DetId id() const
get the (generic) id
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
std::auto_ptr< HcalCoder > coder(const DetId &detId) const
user gets control of the pointer