59 instanceNameEB_ = iConfig.
getParameter<
string>(
"InstanceEB");
60 instanceNameEE_ = iConfig.
getParameter<
string>(
"InstanceEE");
65 EBDigiToken_ = consumes<EBDigiCollection>(EBlabel);
66 EEDigiToken_ = consumes<EEDigiCollection>(EElabel);
82 produces<FEDRawDataCollection>();
94 delete Towerblockformatter_;
95 delete TCCblockformatter_;
96 delete SRblockformatter_;
97 delete Headerblockformatter_;
111 if (debug_)
cout <<
"Enter in EcalDigiToRaw::produce ... " << endl;
117 Towerblockformatter_ -> StartEvent();
118 SRblockformatter_ -> StartEvent();
120 runnumber_ = iEvent.
id().
run();
126 counter_ = iEvent.
id().
event();
130 lv1_ = counter_ % (0x1<<24);
135 Headerblockformatter_ ->
DigiToRaw(productRawData.get());
148 if (debug_)
cout <<
"Creation of the TCC block " << endl;
154 it != ecalTrigPrim ->
end(); it++) {
162 int iDCC = TheMapping -> DCCid(detid);
168 TCCblockformatter_ ->
DigiToRaw(trigprim, rawdata, TheMapping);
176 if (debug_)
cout <<
" Process the SR flags " << endl;
184 it != ebSrFlags ->
end(); it++) {
186 int flag = srflag.
value();
189 int Dccid = TheMapping -> DCCid(
id);
190 int DCC_Channel = TheMapping -> iTT(
id);
193 if (debug_)
cout <<
"will process SRblockformatter_ for FEDid " <<
dec << FEDid << endl;
195 if (debug_) Headerblockformatter_ ->
print(rawdata);
196 SRblockformatter_ ->
DigiToRaw(Dccid,DCC_Channel,flag, rawdata);
207 it != eeSrFlags ->
end(); it++) {
209 int flag = srflag.
value();
211 pair<int, int> ind = TheMapping -> getDCCandSC(
id);
212 int Dccid = ind.first;
213 int DCC_Channel = ind.second;
217 SRblockformatter_ ->
DigiToRaw(Dccid,DCC_Channel,flag, rawdata);
232 if (debug_)
cout <<
"Creation of the TowerBlock ... Barrel case " << endl;
235 it != ebDigis->end(); it++) {
237 const EBDetId& ebdetid = it -> id();
238 int DCCid = TheMapping -> DCCid(ebdetid);
241 Towerblockformatter_ ->
DigiToRaw(dataframe, rawdata, TheMapping);
247 if (debug_)
cout <<
"Creation of the TowerBlock ... EndCap case " << endl;
250 it != eeDigis->end(); it++) {
252 const EEDetId& eedetid = it -> id();
254 int DCCid = elid.
dccId() ;
257 Towerblockformatter_ ->
DigiToRaw(dataframe, rawdata, TheMapping);
267 map<int, map<int,int> >* FEDorder = Towerblockformatter_ -> GetFEDorder();
269 Headerblockformatter_ -> CleanUp(productRawData.get(), FEDorder);
282 Towerblockformatter_ -> EndEvent(productRawData.get());
284 iEvent.
put(productRawData);
296 Headerblockformatter_ -> SetParam(
this);
297 Towerblockformatter_ -> SetParam(
this);
298 TCCblockformatter_ -> SetParam(
this);
299 SRblockformatter_ -> SetParam(
this);
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
int bunchCrossing() const
virtual const DetId & id() const =0
S & print(S &os, JobReport::InputFile const &f)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
void produce(edm::Event &e, const edm::EventSetup &c)
T const * product() const
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
EcalDigiToRaw(const edm::ParameterSet &pset)