15 label_(ps.getParameter<
string>(
"Label")),
16 instanceName_(ps.getParameter<
string>(
"InstanceES")),
18 lookup_(ps.getUntrackedParameter<
FileInPath>(
"LookupTable")),
19 debug_(ps.getUntrackedParameter<
bool>(
"debugMode",
false)),
20 formatMajor_(ps.getUntrackedParameter<
int>(
"formatMajor", 4)),
21 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;
40 if( file.is_open() ) {
43 for (
int i=0;
i<nLines; ++
i) {
44 file >> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx ;
45 fedId_[(3-iz)/2-1][ip-1][ix-1][iy-1] = fed;
48 cout<<
"[ESDigiToRaw] Look up table file can not be found in "<<
lookup_.
fullPath().c_str() <<endl;
78 const ESDetId& detId = it->id();
81 if (ifed < 0)
continue;
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);
95 if (
debug_)
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.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< ESDigiCollection > ESDigiToken_
const_iterator begin() const
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_
const_iterator end() const
ESDigiToRaw(const edm::ParameterSet &ps)
static const int KCHIP_BC_RANGE
std::string fullPath() const
static const int LHC_BX_RANGE