16 triggerFed_(conf.getUntrackedParameter<
int>(
"HcalTriggerFED",-1)),
17 sdFed_(conf.getUntrackedParameter<
int>(
"HcalSlowDataFED",-1)),
18 spdFed_(conf.getUntrackedParameter<
int>(
"HcalSourcePositionFED",-1)),
19 tdcFed_(conf.getUntrackedParameter<
int>(
"HcalTDCFED",-1)),
20 qadcFed_(conf.getUntrackedParameter<
int>(
"HcalQADCFED",-1)),
21 calibFile_(conf.getUntrackedParameter<
string>(
"ConfigurationFile",
"")),
22 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;
99 auto trigd = std::make_unique<HcalTBTriggerData>();
101 auto rund = std::make_unique<HcalTBRunData>();
103 auto epd = std::make_unique<HcalTBEventPosition>();
105 auto tmgd = std::make_unique<HcalTBTiming>();
107 auto bcntd = std::make_unique<HcalTBBeamCounters>();
109 auto spd = std::make_unique<HcalSourcePositionData>();
156 printf(
"HcalTBObjectUnpacker cowardly refuses to parse a NULL file...\n");
163 ifstream infile(fip.
fullPath().c_str());
168 while (infile.getline(buffer, 1024)) {
169 if (buffer [0] ==
'#')
continue;
170 if (buffer [0] ==
'/' && buffer [1] ==
'/')
continue;
172 vector<string> lineVect;
175 for (
unsigned i=0;
i<=tmpStr.size();
i++) {
176 if (tmpStr[
i] ==
' ' ||
i==tmpStr.size()) {
179 lineVect.push_back(item);
186 if (empty) empty =
false;
190 if(!lineVect.empty())
calibLines_.push_back(lineVect);
hcaltb::HcalTBTriggerDataUnpacker tdUnpacker_
T getParameter(std::string const &) const
void unpack(const FEDRawData &raw, HcalTBTriggerData &htbtd) const
void produce(edm::Event &e, const edm::EventSetup &c) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void unpack(const FEDRawData &raw, HcalTBBeamCounters &beamadc, bool is04_=true) const
std::vector< std::vector< std::string > > calibLines_
void unpack(const FEDRawData &raw, HcalSourcePositionData &hspd) const
hcaltb::HcalTBSlowDataUnpacker sdUnpacker_
hcaltb::HcalTBSourcePositionDataUnpacker spdUnpacker_
HcalTBObjectUnpacker(const edm::ParameterSet &ps)
#define DEFINE_FWK_MODULE(type)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void setCalib(const std::vector< std::vector< std::string > > &calibLines_)
~HcalTBObjectUnpacker() override
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
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