61 instanceNameEB_ = iConfig.
getParameter<
string>(
"InstanceEB");
62 instanceNameEE_ = iConfig.
getParameter<
string>(
"InstanceEE");
78 produces<FEDRawDataCollection>();
90 delete Towerblockformatter_;
91 delete TCCblockformatter_;
92 delete SRblockformatter_;
93 delete Headerblockformatter_;
107 if (debug_)
cout <<
"Enter in EcalDigiToRaw::produce ... " << endl;
113 Towerblockformatter_ -> StartEvent();
114 SRblockformatter_ -> StartEvent();
116 runnumber_ = iEvent.
id().
run();
122 counter_ = iEvent.
id().
event();
126 lv1_ = counter_ % (0x1<<24);
131 Headerblockformatter_ ->
DigiToRaw(productRawData.get());
144 if (debug_)
cout <<
"Creation of the TCC block " << endl;
150 it != ecalTrigPrim ->
end(); it++) {
158 int iDCC = TheMapping -> DCCid(detid);
164 TCCblockformatter_ ->
DigiToRaw(trigprim, rawdata, TheMapping);
172 if (debug_)
cout <<
" Process the SR flags " << endl;
180 it != ebSrFlags ->
end(); it++) {
182 int flag = srflag.
value();
185 int Dccid = TheMapping -> DCCid(
id);
186 int DCC_Channel = TheMapping -> iTT(
id);
189 if (debug_)
cout <<
"will process SRblockformatter_ for FEDid " << dec << FEDid << endl;
191 if (debug_) Headerblockformatter_ ->
print(rawdata);
192 SRblockformatter_ ->
DigiToRaw(Dccid,DCC_Channel,flag, rawdata);
203 it != eeSrFlags ->
end(); it++) {
205 int flag = srflag.
value();
207 pair<int, int> ind = TheMapping -> getDCCandSC(
id);
208 int Dccid = ind.first;
209 int DCC_Channel = ind.second;
213 SRblockformatter_ ->
DigiToRaw(Dccid,DCC_Channel,flag, rawdata);
228 if (debug_)
cout <<
"Creation of the TowerBlock ... Barrel case " << endl;
229 iEvent.
getByLabel(label_,instanceNameEB_,ebDigis);
231 it != ebDigis->end(); it++) {
233 const EBDetId& ebdetid = it -> id();
234 int DCCid = TheMapping -> DCCid(ebdetid);
237 Towerblockformatter_ ->
DigiToRaw(dataframe, rawdata, TheMapping);
243 if (debug_)
cout <<
"Creation of the TowerBlock ... EndCap case " << endl;
244 iEvent.
getByLabel(label_,instanceNameEE_,eeDigis);
246 it != eeDigis->end(); it++) {
248 const EEDetId& eedetid = it -> id();
250 int DCCid = elid.
dccId() ;
253 Towerblockformatter_ ->
DigiToRaw(dataframe, rawdata, TheMapping);
263 map<int, map<int,int> >* FEDorder = Towerblockformatter_ -> GetFEDorder();
265 Headerblockformatter_ -> CleanUp(productRawData.get(), FEDorder);
278 Towerblockformatter_ -> EndEvent(productRawData.get());
280 iEvent.
put(productRawData);
292 Headerblockformatter_ -> SetParam(
this);
293 Towerblockformatter_ -> SetParam(
this);
294 TCCblockformatter_ -> SetParam(
this);
295 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
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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)