15 : ESDataFormatter_(nullptr),
16 label_(ps.getParameter<
string>(
"Label")),
17 instanceName_(ps.getParameter<
string>(
"InstanceES")),
19 lookup_(ps.getUntrackedParameter<
FileInPath>(
"LookupTable")),
20 debug_(ps.getUntrackedParameter<bool>(
"debugMode",
false)),
21 formatMajor_(ps.getUntrackedParameter<int>(
"formatMajor", 4)),
22 formatMinor_(ps.getUntrackedParameter<int>(
"formatMinor", 1)) {
28 produces<FEDRawDataCollection>();
30 for (
int i = 0;
i < 2; ++
i)
31 for (
int j = 0;
j < 2; ++
j)
32 for (
int k = 0;
k < 40; ++
k)
33 for (
int m = 0;
m < 40;
m++)
37 int nLines, iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
43 file >> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx;
44 fedId_[(3 - iz) / 2 - 1][ip - 1][ix - 1][iy - 1] = fed;
47 cout <<
"[ESDigiToRaw] Look up table file can not be found in " <<
lookup_.
fullPath().c_str() << endl;
77 const ESDetId& detId = it->id();
83 Digis[ifed].push_back(df);
86 auto productRawData = std::make_unique<FEDRawDataCollection>();
88 ESDataFormatter::Digis::const_iterator itfed;
89 for (itfed = Digis.begin(); itfed != Digis.end(); ++itfed) {
90 int fId = (*itfed).first;
92 FEDRawData& fedRawData = productRawData->FEDData(fId);
96 cout <<
"FED : " << fId <<
" Data size : " << fedRawData.
size() <<
" (Bytes)" << endl;
EventNumber_t event() const
static const int KCHIP_EC_RANGE
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< ESDigiCollection > ESDigiToken_
size_t size() const
Lenght of the data buffer in bytes.
const ESDataFormatter * ESDataFormatter_
void produce(edm::StreamID, edm::Event &e, const edm::EventSetup &es) const override
const edm::FileInPath lookup_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
ESDigiToRaw(const edm::ParameterSet &ps)
static const int KCHIP_BC_RANGE
std::string fullPath() const
static const int LHC_BX_RANGE