16 fedUnpackList_(conf.getParameter<std::vector<int> >(
"FEDs")),
19 orderedFedUnpackList_(conf.getParameter<std::vector<int> >(
"orderedFedList")),
22 orderedDCCIdList_(conf.getParameter<std::vector<int> >(
"orderedDCCIdList")),
25 numbXtalTSamples_(conf.getParameter<int>(
"numbXtalTSamples")),
28 numbTriggerTSamples_(conf.getParameter<int>(
"numbTriggerTSamples")),
31 headerUnpacking_(conf.getParameter<bool>(
"headerUnpacking")),
34 srpUnpacking_(conf.getParameter<bool>(
"srpUnpacking")),
37 tccUnpacking_(conf.getParameter<bool>(
"tccUnpacking")),
40 feUnpacking_(conf.getParameter<bool>(
"feUnpacking")),
43 memUnpacking_(conf.getParameter<bool>(
"memUnpacking")),
46 syncCheck_(conf.getParameter<bool>(
"syncCheck")),
49 feIdCheck_(conf.getParameter<bool>(
"feIdCheck")),
52 forceToKeepFRdata_(conf.getParameter<bool>(
"forceToKeepFRData")),
55 put_(conf.getParameter<bool>(
"eventPut")),
57 dataLabel_(conf.getParameter<edm::InputTag>(
"InputLabel")),
59 REGIONAL_(conf.getParameter<bool>(
"DoRegional")),
61 fedsLabel_(conf.getParameter<edm::InputTag>(
"FedLabel")),
75 <<
"\n Valid Number of xtal time samples are : 6,10,14,18,...,62";
83 <<
"\n Valid number of trigger time samples are : 1, 4 or 8";
99 std::ostringstream loggerOutput_;
103 edm::LogInfo(
"EcalRawToDigi") <<
"EcalRawToDigi will unpack FEDs ( " << loggerOutput_.str() <<
")";
104 LogDebug(
"EcalRawToDigi") <<
"EcalRawToDigi will unpack FEDs ( " << loggerOutput_.str() <<
")";
108 <<
"\n ECAL RawToDigi configuration:"
121 produces<EBDigiCollection>(
"ebDigis");
122 produces<EEDigiCollection>(
"eeDigis");
123 produces<EBSrFlagCollection>();
124 produces<EESrFlagCollection>();
125 produces<EcalRawDataCollection>();
126 produces<EcalPnDiodeDigiCollection>();
127 produces<EcalTrigPrimDigiCollection>(
"EcalTriggerPrimitives");
128 produces<EcalPSInputDigiCollection>(
"EcalPseudoStripInputs");
131 produces<EBDetIdCollection>(
"EcalIntegrityGainErrors");
132 produces<EBDetIdCollection>(
"EcalIntegrityGainSwitchErrors");
133 produces<EBDetIdCollection>(
"EcalIntegrityChIdErrors");
136 produces<EEDetIdCollection>(
"EcalIntegrityGainErrors");
137 produces<EEDetIdCollection>(
"EcalIntegrityGainSwitchErrors");
138 produces<EEDetIdCollection>(
"EcalIntegrityChIdErrors");
141 produces<EcalElectronicsIdCollection>(
"EcalIntegrityTTIdErrors");
142 produces<EcalElectronicsIdCollection>(
"EcalIntegrityZSXtalIdErrors");
143 produces<EcalElectronicsIdCollection>(
"EcalIntegrityBlockSizeErrors");
146 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemTtIdErrors");
147 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemBlockSizeErrors");
148 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemChIdErrors");
149 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemGainErrors");
166 <<
"Arrays orderedFedList and orderedDCCIdList are emply. "
167 "Hard coded correspondence for DCCId:FedId will be used.";
198 <<
" id " <<
id.rawId()
199 <<
" -> (" <<
id.ix() <<
", " <<
id.iy() <<
", " <<
id.zside() <<
") "
201 <<
"status = " << code
222 <<
" id " <<
id.rawId()
223 <<
" -> (" <<
id.ieta() <<
", " <<
id.iphi() <<
", " <<
id.zside() <<
") "
225 <<
"status = " << code
268 myMap_ -> deletePointers();
269 myMap_ -> resetPointers();
276 std::vector<int> FEDS_to_unpack;
280 FEDS_to_unpack = listoffeds -> GetList();
295 productDigisEB->reserve(1700);
311 std::auto_ptr< EBDetIdCollection> productInvalidGainsSwitch(
new EBDetIdCollection);
325 std::auto_ptr<EEDetIdCollection> productInvalidEEGainsSwitch(
new EEDetIdCollection);
393 std::vector<int>::const_iterator fed_it =
find(FEDS_to_unpack.begin(), FEDS_to_unpack.end(), *
i);
394 if (fed_it == FEDS_to_unpack.end())
continue;
400 const size_t length = fedData.
size();
402 LogDebug(
"EcalRawToDigi") <<
"raw data length: " << length ;
409 LogDebug(
"EcalRawToDigi") <<
"Getting FED = " << *
i <<
"(SM = "<<smId<<
")"<<
" data size is: " << length;
414 LogDebug(
"EcalRawToDigi") <<
" in EE :"<<productDigisEE->size()
415 <<
" in EB :"<<productDigisEB->size();
432 e.
put(productDccHeaders);
436 productDigisEB->sort();
437 e.
put(productDigisEB,
"ebDigis");
438 productDigisEE->sort();
439 e.
put(productDigisEE,
"eeDigis");
440 e.
put(productInvalidGains,
"EcalIntegrityGainErrors");
441 e.
put(productInvalidGainsSwitch,
"EcalIntegrityGainSwitchErrors");
442 e.
put(productInvalidChIds,
"EcalIntegrityChIdErrors");
444 e.
put(productInvalidEEGains,
"EcalIntegrityGainErrors");
445 e.
put(productInvalidEEGainsSwitch,
"EcalIntegrityGainSwitchErrors");
446 e.
put(productInvalidEEChIds,
"EcalIntegrityChIdErrors");
448 e.
put(productInvalidTTIds,
"EcalIntegrityTTIdErrors");
449 e.
put(productInvalidZSXtalIds,
"EcalIntegrityZSXtalIdErrors");
450 e.
put(productInvalidBlockLengths,
"EcalIntegrityBlockSizeErrors");
451 e.
put(productPnDiodeDigis);
454 e.
put(productInvalidMemTtIds,
"EcalIntegrityMemTtIdErrors");
455 e.
put(productInvalidMemBlockSizes,
"EcalIntegrityMemBlockSizeErrors");
456 e.
put(productInvalidMemChIds,
"EcalIntegrityMemChIdErrors");
457 e.
put(productInvalidMemGains,
"EcalIntegrityMemGainErrors");
460 e.
put(productEBSrFlags);
461 e.
put(productEESrFlags);
464 e.
put(productEcalTps,
"EcalTriggerPrimitives");
465 e.
put(productEcalPSs,
"EcalPseudoStripInputs");
void setChannelStatusDB(const EcalChannelStatusMap *chdb)
void setPnDiodeDigisCollection(std::auto_ptr< EcalPnDiodeDigiCollection > *x)
edm::ESWatcher< EcalMappingRcd > watcher_
T getUntrackedParameter(std::string const &, T const &) const
unsigned int numbXtalTSamples_
int xtalId() const
get the channel id
void unpack(const uint64_t *buffer, size_t bufferSize, unsigned int smId, unsigned int fedId)
void setInvalidZSXtalIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
int stripId() const
get the tower id
void setInvalidMemBlockSizesCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::vector< int > orderedFedUnpackList_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
void setDccHeadersCollection(std::auto_ptr< EcalRawDataCollection > *x)
void setEcalPSsCollection(std::auto_ptr< EcalPSInputDigiCollection > *x)
int towerId() const
get the tower id
void setInvalidEEGainsSwitchCollection(std::auto_ptr< EEDetIdCollection > *x)
static EEDetId unhashIndex(int hi)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void setEEDigisCollection(std::auto_ptr< EEDigiCollection > *x)
size_t size() const
Lenght of the data buffer in bytes.
std::vector< int > fedUnpackList_
const EcalElectronicsMapper * electronicsMapper() const
DCCDataUnpacker * theUnpacker_
void setInvalidMemTtIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
void setEBSrFlagsCollection(std::auto_ptr< EBSrFlagCollection > *x)
unsigned int getDCCId(unsigned int aSMId) const
virtual void beginRun(edm::Run &run, const edm::EventSetup &es)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool setActiveDCC(unsigned int dccId)
void setEBDigisCollection(std::auto_ptr< EBDigiCollection > *x)
uint16_t getChannelValue(const DetId &id) const
unsigned int numbTriggerTSamples_
virtual void produce(edm::Event &e, const edm::EventSetup &c)
void setInvalidMemGainsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::vector< int > orderedDCCIdList_
void setInvalidGainsCollection(std::auto_ptr< EBDetIdCollection > *x)
EcalRawToDigi(const edm::ParameterSet &ps)
void setInvalidEEChIdsCollection(std::auto_ptr< EEDetIdCollection > *x)
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void printStatusRecords(const DCCDataUnpacker *unpacker, const EcalElectronicsMapping *mapping)
void setInvalidTTIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidGainsSwitchCollection(std::auto_ptr< EBDetIdCollection > *x)
unsigned long long uint64_t
void setEESrFlagsCollection(std::auto_ptr< EESrFlagCollection > *x)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
T const * product() const
bool check(const edm::EventSetup &iSetup)
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void setEcalTpsCollection(std::auto_ptr< EcalTrigPrimDigiCollection > *x)
void setInvalidMemChIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidBlockLengthsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidEEGainsCollection(std::auto_ptr< EEDetIdCollection > *x)
EcalElectronicsMapper * myMap_
unsigned int getActiveSM()
void setInvalidChIdsCollection(std::auto_ptr< EBDetIdCollection > *x)