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")),
59 REGIONAL_(conf.getParameter<bool>(
"DoRegional")),
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:"
123 produces<EBDigiCollection>(
"ebDigis");
124 produces<EEDigiCollection>(
"eeDigis");
125 produces<EBSrFlagCollection>();
126 produces<EESrFlagCollection>();
127 produces<EcalRawDataCollection>();
128 produces<EcalPnDiodeDigiCollection>();
129 produces<EcalTrigPrimDigiCollection>(
"EcalTriggerPrimitives");
130 produces<EcalPSInputDigiCollection>(
"EcalPseudoStripInputs");
133 produces<EBDetIdCollection>(
"EcalIntegrityGainErrors");
134 produces<EBDetIdCollection>(
"EcalIntegrityGainSwitchErrors");
135 produces<EBDetIdCollection>(
"EcalIntegrityChIdErrors");
138 produces<EEDetIdCollection>(
"EcalIntegrityGainErrors");
139 produces<EEDetIdCollection>(
"EcalIntegrityGainSwitchErrors");
140 produces<EEDetIdCollection>(
"EcalIntegrityChIdErrors");
143 produces<EcalElectronicsIdCollection>(
"EcalIntegrityTTIdErrors");
144 produces<EcalElectronicsIdCollection>(
"EcalIntegrityZSXtalIdErrors");
145 produces<EcalElectronicsIdCollection>(
"EcalIntegrityBlockSizeErrors");
148 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemTtIdErrors");
149 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemBlockSizeErrors");
150 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemChIdErrors");
151 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemGainErrors");
153 dataToken_=consumes<FEDRawDataCollection>(dataLabel);
155 fedsToken_=consumes<EcalListOfFEDS>(fedsLabel);
171 <<
"Arrays orderedFedList and orderedDCCIdList are emply. "
172 "Hard coded correspondence for DCCId:FedId will be used.";
203 <<
" id " <<
id.rawId()
204 <<
" -> (" <<
id.ix() <<
", " <<
id.iy() <<
", " <<
id.zside() <<
") "
206 <<
"status = " << code
227 <<
" id " <<
id.rawId()
228 <<
" -> (" <<
id.ieta() <<
", " <<
id.iphi() <<
", " <<
id.zside() <<
") "
230 <<
"status = " << code
273 myMap_ -> deletePointers();
274 myMap_ -> resetPointers();
281 std::vector<int> FEDS_to_unpack;
285 FEDS_to_unpack = listoffeds -> GetList();
300 productDigisEB->reserve(1700);
316 std::auto_ptr< EBDetIdCollection> productInvalidGainsSwitch(
new EBDetIdCollection);
330 std::auto_ptr<EEDetIdCollection> productInvalidEEGainsSwitch(
new EEDetIdCollection);
398 std::vector<int>::const_iterator fed_it =
find(FEDS_to_unpack.begin(), FEDS_to_unpack.end(), *
i);
399 if (fed_it == FEDS_to_unpack.end())
continue;
405 const size_t length = fedData.
size();
407 LogDebug(
"EcalRawToDigi") <<
"raw data length: " << length ;
414 LogDebug(
"EcalRawToDigi") <<
"Getting FED = " << *
i <<
"(SM = "<<smId<<
")"<<
" data size is: " << length;
419 LogDebug(
"EcalRawToDigi") <<
" in EE :"<<productDigisEE->size()
420 <<
" in EB :"<<productDigisEB->size();
437 e.
put(productDccHeaders);
441 productDigisEB->sort();
442 e.
put(productDigisEB,
"ebDigis");
443 productDigisEE->sort();
444 e.
put(productDigisEE,
"eeDigis");
445 e.
put(productInvalidGains,
"EcalIntegrityGainErrors");
446 e.
put(productInvalidGainsSwitch,
"EcalIntegrityGainSwitchErrors");
447 e.
put(productInvalidChIds,
"EcalIntegrityChIdErrors");
449 e.
put(productInvalidEEGains,
"EcalIntegrityGainErrors");
450 e.
put(productInvalidEEGainsSwitch,
"EcalIntegrityGainSwitchErrors");
451 e.
put(productInvalidEEChIds,
"EcalIntegrityChIdErrors");
453 e.
put(productInvalidTTIds,
"EcalIntegrityTTIdErrors");
454 e.
put(productInvalidZSXtalIds,
"EcalIntegrityZSXtalIdErrors");
455 e.
put(productInvalidBlockLengths,
"EcalIntegrityBlockSizeErrors");
456 e.
put(productPnDiodeDigis);
459 e.
put(productInvalidMemTtIds,
"EcalIntegrityMemTtIdErrors");
460 e.
put(productInvalidMemBlockSizes,
"EcalIntegrityMemBlockSizeErrors");
461 e.
put(productInvalidMemChIds,
"EcalIntegrityMemChIdErrors");
462 e.
put(productInvalidMemGains,
"EcalIntegrityMemGainErrors");
465 e.
put(productEBSrFlags);
466 e.
put(productEESrFlags);
469 e.
put(productEcalTps,
"EcalTriggerPrimitives");
470 e.
put(productEcalPSs,
"EcalPseudoStripInputs");
void setChannelStatusDB(const EcalChannelStatusMap *chdb)
T getParameter(std::string const &) const
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
edm::EDGetTokenT< FEDRawDataCollection > dataToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
static std::atomic< bool > silentMode_
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_
bool makeMapFromVectors(std::vector< int > &, std::vector< int > &)
void setInvalidMemGainsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::vector< int > orderedDCCIdList_
void setInvalidGainsCollection(std::auto_ptr< EBDetIdCollection > *x)
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
EcalRawToDigi(const edm::ParameterSet &ps)
void setInvalidEEChIdsCollection(std::auto_ptr< EEDetIdCollection > *x)
edm::EDGetTokenT< EcalListOfFEDS > fedsToken_
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
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)
T const * product() const
bool check(const edm::EventSetup &iSetup)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
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_
virtual void beginRun(const edm::Run &run, const edm::EventSetup &es) override
unsigned int getActiveSM()
void setInvalidChIdsCollection(std::auto_ptr< EBDetIdCollection > *x)