18 triggerFed_(conf.getUntrackedParameter<int>(
"HcalTriggerFED",-1)),
19 sdFed_(conf.getUntrackedParameter<int>(
"HcalSlowDataFED",-1)),
20 spdFed_(conf.getUntrackedParameter<int>(
"HcalSourcePositionFED",-1)),
21 tdcFed_(conf.getUntrackedParameter<int>(
"HcalTDCFED",-1)),
22 qadcFed_(conf.getUntrackedParameter<int>(
"HcalQADCFED",-1)),
23 calibFile_(conf.getUntrackedParameter<string>(
"ConfigurationFile",
"")),
24 tdcUnpacker_(conf.getUntrackedParameter<bool>(
"IncludeUnmatchedHits",
false)),
29 std::cout <<
"HcalTBObjectUnpacker will unpack Trigger FED ";
35 std::cout <<
"HcalTBObjectUnpacker will unpack SlowData FED ";
42 std::cout <<
"HcalTBObjectUnpacker will unpack TDC FED ";
49 std::cout <<
"HcalTBObjectUnpacker will unpack QADC FED ";
55 std::cout <<
"HcalTBObjectUnpacker will unpack Source Position Data FED ";
68 "HcalTBObjectUnpacker: TDC/QADC/WC configuration file not found or is empty: "<<
calibFile_<<endl;
72 "HcalTBObjectUnpacker: TDC/QADC/WC configuration file not found: "<<
calibFile_<<endl;
99 std::auto_ptr<HcalTBTriggerData>
102 std::auto_ptr<HcalTBRunData>
105 std::auto_ptr<HcalTBEventPosition>
108 std::auto_ptr<HcalTBTiming>
111 std::auto_ptr<HcalTBBeamCounters>
114 std::auto_ptr<HcalSourcePositionData>
162 printf(
"HcalTBObjectUnpacker cowardly refuses to parse a NULL file...\n");
171 while (
infile.getline(buffer, 1024)) {
172 if (buffer [0] ==
'#')
continue;
173 if (buffer [0] ==
'/' && buffer [1] ==
'/')
continue;
174 tmpStr = string(buffer);
175 vector<string> lineVect;
177 int start = 0;
bool empty =
true;
178 for (
unsigned i=0;
i<=tmpStr.size();
i++) {
179 if (tmpStr[
i] ==
' ' ||
i==tmpStr.size()) {
181 std::string item(tmpStr, start,
i-start);
182 lineVect.push_back(item);
189 if (empty) empty =
false;
193 if(lineVect.size()>0)
calibLines_.push_back(lineVect);
hcaltb::HcalTBTriggerDataUnpacker tdUnpacker_
void unpack(const FEDRawData &raw, HcalTBBeamCounters &beamadc, bool is04_=true) const
bool getByType(Handle< PROD > &result) const
std::vector< std::vector< std::string > > calibLines_
hcaltb::HcalTBSlowDataUnpacker sdUnpacker_
hcaltb::HcalTBSourcePositionDataUnpacker spdUnpacker_
void unpack(const FEDRawData &raw, HcalTBTriggerData &htbtd)
virtual ~HcalTBObjectUnpacker()
HcalTBObjectUnpacker(const edm::ParameterSet &ps)
void unpack(const FEDRawData &raw, HcalTBRunData &htbrd, HcalTBEventPosition &htbep)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void unpack(const FEDRawData &raw, HcalSourcePositionData &hspd)
void setCalib(const std::vector< std::vector< std::string > > &calibLines_)
virtual void produce(edm::Event &e, const edm::EventSetup &c)
void unpack(const FEDRawData &raw, HcalTBEventPosition &pos, HcalTBTiming &timing) const
hcaltb::HcalTBTDCUnpacker tdcUnpacker_
void setCalib(const std::vector< std::vector< std::string > > &calibLines_)
hcaltb::HcalTBQADCUnpacker qadcUnpacker_