23 unsigned int numbXtalTSamples_ = EEMpset.
getParameter<
unsigned int>(
"numbXtalTSamples");
24 unsigned int numbTriggerTSamples_ = EEMpset.getParameter<
unsigned int>(
"numbTriggerTSamples");
26 if( numbXtalTSamples_ <6 || numbXtalTSamples_>64 || (numbXtalTSamples_-2)%4 ){
27 edm::LogError(
"IncorrectConfiguration")<<
"Unsuported number of xtal time samples : "<<numbXtalTSamples_
28 <<
"\n Valid Number of xtal time samples are : 6,10,14,18,...,62";
31 if( numbTriggerTSamples_ !=1 && numbTriggerTSamples_ !=4 && numbTriggerTSamples_ !=8 ){
32 edm::LogError(
"IncorrectConfiguration")<<
"Unsuported number of trigger time samples : "<<numbTriggerTSamples_
33 <<
"\n Valid number of trigger time samples are : 1, 4 or 8";
37 std::vector<int> oFl = DCCpset.
getParameter<std::vector<int> >(
"orderedFedList");
38 std::vector<int> oDl = DCCpset.
getParameter<std::vector<int> >(
"orderedDCCIdList");
42 edm::LogError(
"IncorrectConfiguration")<<
"\n unable to configure EcalElectronicsMapper from vectors.";
56 <<
"\n ECAL RawToDigi within RawToRecHit configuration:"
57 <<
"\n Header unpacking is "<<DCCpset.
getParameter<
bool>(
"headerUnpacking")
58 <<
"\n SRP Bl. unpacking is "<<DCCpset.
getParameter<
bool>(
"srpUnpacking")
59 <<
"\n TCC Bl. unpacking is "<<DCCpset.
getParameter<
bool>(
"tccUnpacking")
60 <<
"\n FE Bl. unpacking is "<<DCCpset.
getParameter<
bool>(
"feUnpacking")
61 <<
"\n MEM Bl. unpacking is "<<DCCpset.
getParameter<
bool>(
"memUnpacking")
62 <<
"\n sync check is "<<DCCpset.
getParameter<
bool>(
"syncCheck")
63 <<
"\n feID check is "<<DCCpset.
getParameter<
bool>(
"feIdCheck")
64 <<
"\n force keep FR data is "<<DCCpset.
getParameter<
bool>(
"forceKeepFRData")
129 const bool reserveMem =
true;
164 LogDebug(
"EcalRawToRecHit|Worker")<<
"is going to work on index: "<<index
174 <<
"size of digi collections before unpacking: "
185 int length = fedData.
size();
190 LogDebug(
"EcalRawToRecHit|Worker")<<
"calling the unpacker: "<<length<<
" "<<smId<<
" "<<fedIndex ;
192 unpacker_->
unpack( pData, static_cast<unsigned int>(length),smId,fedIndex);
193 LogDebug(
"EcalRawToRecHit|Worker")<<
"unpacking done." ;
197 edm::LogInfo(
"EcalUnpackerWorker")<<
"cannot set: "<<fedIndex<<
" to be an active DCC.";
198 LogDebug(
"EcalRawToRecHit|Worker")<<
"cannot set: "<<fedIndex<<
" to be an active DCC.";
203 edm::LogInfo(
"EcalUnpackerWorker")<<
"empty event on this FED: "<<fedIndex<<
" length: "<<length;
204 LogDebug(
"EcalRawToRecHit|Worker")<<
"empty event on this FED: "<<fedIndex<<
" length: "<<length;
209 <<
"size of digi collections after unpacking: "
220 LogDebug(
"EcalRawToRecHit|Worker")<<
"going to work on EE rechits from: "<<endDigiEE-beginDigiEE<<
" digis."
221 <<
"\ngoing to work on EB rechits from: "<<endDigiEB-beginDigiEB<<
" digis." ;
225 if (beginDigiEB!=endDigiEB){
226 work<EBDetId>(beginDigiEB, endDigiEB, uncalibRecHits, ecalrechits);
228 LogDebug(
"EcalRawToRecHit|Worker")<<uncalibRecHits->size()<<
" uncalibrated rechit created so far\n"
229 <<ecalrechits->size()<<
" rechit created so far." ;
233 if (beginDigiEE!=endDigiEE){
234 work<EEDetId>(beginDigiEE, endDigiEE, uncalibRecHits, ecalrechits);
236 LogDebug(
"EcalRawToRecHit|Worker")<<uncalibRecHits->size()<<
" uncalibrated rechit created eventually\n"
237 <<ecalrechits->size()<<
" rechit created eventually" ;
T getParameter(std::string const &) const
std::auto_ptr< EcalRecHitCollection > work(const uint32_t &i, const FEDRawDataCollection &) const
void setPnDiodeDigisCollection(std::auto_ptr< EcalPnDiodeDigiCollection > *x)
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< EEDetIdCollection > productInvalidEEGainsSwitch
EcalRecHitWorkerBaseClass * CalibWorker_
std::auto_ptr< EcalTrigPrimDigiCollection > productTps
std::auto_ptr< EcalPSInputDigiCollection > productPSs
std::auto_ptr< EcalElectronicsIdCollection > productInvalidBlockLengths
std::auto_ptr< EcalPnDiodeDigiCollection > productPnDiodeDigis
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
virtual void set(const edm::EventSetup &es)=0
void unpack(const uint64_t *buffer, size_t bufferSize, unsigned int smId, unsigned int fedId)
void setInvalidZSXtalIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
DCCDataUnpacker * unpacker_
void setInvalidMemBlockSizesCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::auto_ptr< EEDetIdCollection > productInvalidEEGains
EcalUncalibRecHitWorkerBaseClass * UncalibWorker_
void setDccHeadersCollection(std::auto_ptr< EcalRawDataCollection > *x)
void setEcalPSsCollection(std::auto_ptr< EcalPSInputDigiCollection > *x)
std::auto_ptr< EBSrFlagCollection > productEBSrFlags
void setInvalidEEGainsSwitchCollection(std::auto_ptr< EEDetIdCollection > *x)
void setEEDigisCollection(std::auto_ptr< EEDigiCollection > *x)
std::auto_ptr< EESrFlagCollection > productEESrFlags
void setEcalElectronicsMapping(const EcalElectronicsMapping *)
size_t size() const
Lenght of the data buffer in bytes.
std::auto_ptr< EBDetIdCollection > productInvalidChIds
std::auto_ptr< EEDigiCollection > productDigisEE
void setInvalidMemTtIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemTtIds
const DepRecordT & getRecord() const
static int fedIndex(const uint32_t index)
void setEBSrFlagsCollection(std::auto_ptr< EBSrFlagCollection > *x)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
bool setActiveDCC(unsigned int dccId)
void setEBDigisCollection(std::auto_ptr< EBDigiCollection > *x)
bool makeMapFromVectors(std::vector< int > &, std::vector< int > &)
void setInvalidMemGainsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
void setInvalidGainsCollection(std::auto_ptr< EBDetIdCollection > *x)
void setInvalidEEChIdsCollection(std::auto_ptr< EEDetIdCollection > *x)
void update(const edm::Event &e) const
void setInvalidTTIdsCollection(std::auto_ptr< EcalElectronicsIdCollection > *x)
std::auto_ptr< EBDetIdCollection > productInvalidGainsSwitch
std::auto_ptr< EBDigiCollection > productDigisEB
std::auto_ptr< EBDetIdCollection > productInvalidGains
void setInvalidGainsSwitchCollection(std::auto_ptr< EBDetIdCollection > *x)
void write(edm::Event &e) const
unsigned long long uint64_t
void setEESrFlagsCollection(std::auto_ptr< EESrFlagCollection > *x)
void setHandles(const EcalUnpackerWorkerRecord &iRecord)
EcalElectronicsMapper * myMap_
EcalUnpackerWorker(const edm::ParameterSet &conf)
virtual void set(const edm::EventSetup &es)=0
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemBlockSizes
edm::ESHandle< EcalRegionCabling > cabling
std::auto_ptr< EEDetIdCollection > productInvalidEEChIds
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemGains
std::auto_ptr< EcalElectronicsIdCollection > productInvalidTTIds
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
std::auto_ptr< EEDigiCollection > * eeDigisCollection()
std::auto_ptr< EcalElectronicsIdCollection > productInvalidMemChIds
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)
std::auto_ptr< EBDigiCollection > * ebDigisCollection()
unsigned int getActiveSM()
std::auto_ptr< EcalElectronicsIdCollection > productInvalidZSXtalIds
void set(const edm::EventSetup &es) const
tuple size
Write out results.
std::auto_ptr< EcalRawDataCollection > productDccHeaders
T get(const Candidate &c)
edm::SortedCollection< EcalRecHit > EcalRecHitCollection
void setInvalidChIdsCollection(std::auto_ptr< EBDetIdCollection > *x)