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 ";
69 "HcalTBObjectUnpacker: TDC/QADC/WC configuration file not found or is empty: "<<
calibFile_<<endl;
73 "HcalTBObjectUnpacker: TDC/QADC/WC configuration file not found: "<<
calibFile_<<endl;
100 std::auto_ptr<HcalTBTriggerData>
103 std::auto_ptr<HcalTBRunData>
106 std::auto_ptr<HcalTBEventPosition>
109 std::auto_ptr<HcalTBTiming>
112 std::auto_ptr<HcalTBBeamCounters>
115 std::auto_ptr<HcalSourcePositionData>
163 printf(
"HcalTBObjectUnpacker cowardly refuses to parse a NULL file...\n");
175 while (
infile.getline(buffer, 1024)) {
176 if (buffer [0] ==
'#')
continue;
177 if (buffer [0] ==
'/' && buffer [1] ==
'/')
continue;
178 tmpStr = string(buffer);
179 vector<string> lineVect;
182 for (
unsigned i=0;
i<=tmpStr.size();
i++) {
183 if (tmpStr[
i] ==
' ' ||
i==tmpStr.size()) {
185 std::string item(tmpStr, start,
i-start);
186 lineVect.push_back(item);
193 if (empty) empty =
false;
197 if(lineVect.size()>0)
calibLines_.push_back(lineVect);
hcaltb::HcalTBTriggerDataUnpacker tdUnpacker_
void unpack(const FEDRawData &raw, HcalTBTriggerData &htbtd) const
#define DEFINE_FWK_MODULE(type)
void unpack(const FEDRawData &raw, HcalTBBeamCounters &beamadc, bool is04_=true) const
bool getByType(Handle< PROD > &result) const
std::vector< std::vector< std::string > > calibLines_
void unpack(const FEDRawData &raw, HcalSourcePositionData &hspd) const
hcaltb::HcalTBSlowDataUnpacker sdUnpacker_
hcaltb::HcalTBSourcePositionDataUnpacker spdUnpacker_
virtual ~HcalTBObjectUnpacker()
HcalTBObjectUnpacker(const edm::ParameterSet &ps)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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, HcalTBRunData &htbrd, HcalTBEventPosition &htbep) const
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_
std::string fullPath() const