88 iConfig.getUntrackedParameter<
bool>(
"debug"),
89 iConfig.getUntrackedParameter<
bool>(
"DoBarrel"),
90 iConfig.getUntrackedParameter<
bool>(
"DoEndCap"),
91 iConfig.getUntrackedParameter<
bool>(
"WriteTCCBlock"),
92 iConfig.getUntrackedParameter<
bool>(
"WriteSRFlags"),
93 iConfig.getUntrackedParameter<
bool>(
"WriteTowerBlock")} {
94 auto label = iConfig.getParameter<
string>(
"Label");
95 auto instanceNameEB = iConfig.getParameter<
string>(
"InstanceEB");
96 auto instanceNameEE = iConfig.getParameter<
string>(
"InstanceEE");
101 EBDigiToken_ = consumes<EBDigiCollection>(EBlabel);
102 EEDigiToken_ = consumes<EEDigiCollection>(EElabel);
104 labelTT_ = consumes<EcalTrigPrimDigiCollection>(iConfig.getParameter<
edm::InputTag>(
"labelTT"));
106 labelEBSR_ = consumes<EBSrFlagCollection>(iConfig.getParameter<
edm::InputTag>(
"labelEBSRFlags"));
107 labelEESR_ = consumes<EESrFlagCollection>(iConfig.getParameter<
edm::InputTag>(
"labelEESRFlags"));
108 ecalmappingToken_ = esConsumes<EcalElectronicsMapping, EcalMappingRcd>();
110 putToken_ = produces<FEDRawDataCollection>();
120 cout <<
"Enter in EcalDigiToRaw::produce ... " << endl;
140 Headerblockformatter.
DigiToRaw(&productRawData);
151 cout <<
"Creation of the TCC block " << endl;
165 int iDCC = TheMapping->
DCCid(detid);
171 TCCblockformatter.
DigiToRaw(trigprim, rawdata, TheMapping);
179 cout <<
" Process the SR flags " << endl;
190 int Dccid = TheMapping->
DCCid(
id);
191 int DCC_Channel = TheMapping->
iTT(
id);
195 cout <<
"will process SRblockformatter_ for FEDid " <<
dec << FEDid << endl;
198 Headerblockformatter.
print(rawdata);
199 SRblockformatter.
DigiToRaw(Dccid, DCC_Channel,
flag, rawdata);
212 int Dccid = ind.first;
213 int DCC_Channel = ind.second;
217 SRblockformatter.
DigiToRaw(Dccid, DCC_Channel,
flag, rawdata);
231 cout <<
"Creation of the TowerBlock ... Barrel case " << endl;
235 const EBDetId& ebdetid = it->id();
236 int DCCid = TheMapping->
DCCid(ebdetid);
239 Towerblockformatter.
DigiToRaw(dataframe, rawdata, TheMapping);
245 cout <<
"Creation of the TowerBlock ... EndCap case " << endl;
249 const EEDetId& eedetid = it->id();
251 int DCCid = elid.
dccId();
254 Towerblockformatter.
DigiToRaw(dataframe, rawdata, TheMapping);
262 map<int, map<int, int> >& FEDorder = Towerblockformatter.
GetFEDorder();
264 Headerblockformatter.
CleanUp(&productRawData, &FEDorder);
274 Towerblockformatter.
EndEvent(&productRawData);
edm::EDGetTokenT< EESrFlagCollection > labelEESR_
std::pair< int, int > getDCCandSC(EcalScDetId id) const
edm::EDGetTokenT< EBDigiCollection > EBDigiToken_
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int DCCid(const EBDetId &id) const
returns the DCC of an EBDetId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalmappingToken_
std::vector< T >::const_iterator const_iterator
virtual const DetId & id() const =0
T getUntrackedParameter(std::string const &, T const &) const
T const * product() const
#define DEFINE_FWK_MODULE(type)
const_iterator begin() const
const std::vector< int32_t > listDCCId_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
const_iterator end() const
const_iterator end() const
edm::EDPutTokenT< FEDRawDataCollection > putToken_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > labelTT_
const_iterator begin() const
The iterator returned can not safely be used across threads.
edm::EDGetTokenT< EEDigiCollection > EEDigiToken_
void produce(edm::StreamID, edm::Event &e, const edm::EventSetup &c) const override
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int iTT(const EcalTrigTowerDetId &id) const
returns the index of a Trigger Tower within its TCC.
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
static std::atomic< unsigned int > counter
edm::EDGetTokenT< EBSrFlagCollection > labelEBSR_
EcalDigiToRaw(const edm::ParameterSet &pset)
const BlockFormatter::Config config_