From 92a4de24d1e2e42e1fb1ffa2990eda5274bde29d Mon Sep 17 00:00:00 2001 From: Anton Karneyeu Date: Fri, 16 Oct 2009 18:49:57 +0000 Subject: [PATCH] --- yaml --- r: 75645 b: "refs/heads/CMSSW_7_1_X" c: 42b16433f8c055762376fb44d703cfcf51c5019e h: "refs/heads/CMSSW_7_1_X" i: 75643: bbfcad8ee9f9ea4afc94c17d698bbb26b5178d69 v: v3 --- [refs] | 2 +- .../interface/EcalRegionCabling.h | 20 +++----- .../EcalRawToDigi/plugins/EcalRawToDigi.cc | 14 +++-- .../EcalRawToRecHitByproductProducer.cc | 2 +- .../plugins/EcalRawToRecHitProducer.cc | 2 +- .../plugins/EcalRawToRecHitRoI.cc | 51 ++++++++++--------- .../plugins/EcalRawToRecHitRoI.h | 11 ++-- .../EcalRawToDigi/plugins/MatacqProducer.cc | 26 +++++----- .../EcalRawToDigi/src/DCCEBEventBlock.cc | 16 +++--- .../EcalRawToDigi/src/DCCEBSRPBlock.cc | 2 +- .../EcalRawToDigi/src/DCCEBTCCBlock.cc | 4 +- .../EcalRawToDigi/src/DCCEEEventBlock.cc | 12 ++--- .../EcalRawToDigi/src/DCCEETCCBlock.cc | 10 ++-- .../EcalRawToDigi/src/DCCFEBlock.cc | 22 ++++---- .../EcalRawToDigi/src/DCCMemBlock.cc | 45 ++++++++-------- .../EcalRawToDigi/src/DCCSCBlock.cc | 35 ++++++------- .../EcalRawToDigi/src/DCCSRPBlock.cc | 4 +- .../EcalRawToDigi/src/DCCTCCBlock.cc | 8 +-- .../EcalRawToDigi/src/DCCTowerBlock.cc | 16 +++--- .../src/EcalDCCHeaderRuntypeDecoder.cc | 8 +-- .../src/EcalElectronicsMapper.cc | 4 +- .../EcalRawToDigi/src/EcalUnpackerWorker.cc | 6 +-- 22 files changed, 163 insertions(+), 157 deletions(-) diff --git a/[refs] b/[refs] index 1d45654528e64..bce65b2056173 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": cc210e486cec1a893cbca0b97ffb2f3c1858106f +"refs/heads/CMSSW_7_1_X": 42b16433f8c055762376fb44d703cfcf51c5019e diff --git a/trunk/EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h b/trunk/EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h index cbcc77b4df46a..6277e844b4470 100644 --- a/trunk/EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h +++ b/trunk/EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h @@ -14,16 +14,12 @@ class EcalRegionCabling { public: - EcalRegionCabling(edm::ParameterSet & conf, const EcalElectronicsMapping * m): mapping_(m) - { - if (conf.exists("esMapping")){ - edm::ParameterSet esMap=conf.getParameter("esMapping"); - es_mapping_ = new ESElectronicsMapper(esMap); - }else{ - edm::LogError("EcalRegionCabling")<<"preshower mapping pointer not initialized. Temporary."; - es_mapping_=0; - } - } + EcalRegionCabling(edm::ParameterSet & conf, const EcalElectronicsMapping * m) + : mapping_(m) + { + const edm::ParameterSet esMap = conf.getParameter("esMapping"); + es_mapping_ = new ESElectronicsMapper(esMap); + } ~EcalRegionCabling(){ // this pointer is own by this object. @@ -51,7 +47,7 @@ class EcalRegionCabling { static uint32_t elementIndex(const int FEDindex) { //do a test for the time being if (FEDindex > FEDNumbering::MAXECALFEDID || FEDindex < FEDNumbering::MINECALFEDID) { - edm::LogError("EcalRegionCabling")<<"FEDindex: "<< FEDindex + edm::LogError("IncorrectMapping")<<"FEDindex: "<< FEDindex <<" is not between: "<<(int) FEDNumbering::MINECALFEDID <<" and "<<(int)FEDNumbering::MAXECALFEDID; return 0;} @@ -61,7 +57,7 @@ class EcalRegionCabling { static uint32_t esElementIndex(const int FEDindex) { //do a test for the time being if (FEDindex > FEDNumbering::MAXPreShowerFEDID || FEDindex < FEDNumbering::MINPreShowerFEDID) { - edm::LogError("EcalRegionCabling")<<"FEDindex: "<< FEDindex + edm::LogError("IncorrectMapping")<<"FEDindex: "<< FEDindex <<" is not between: "<<(int) FEDNumbering::MINPreShowerFEDID <<" and "<<(int)FEDNumbering::MAXPreShowerFEDID; return 0;} diff --git a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.cc b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.cc index 968a1e431b3c7..6b3164508da2a 100644 --- a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.cc +++ b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.cc @@ -74,7 +74,7 @@ EcalRawToDigi::EcalRawToDigi(edm::ParameterSet const& conf): std::ostringstream output; output <<"\n Unsuported number of xtal time samples : "<makeMapFromVectors(orderedFedUnpackList_, orderedDCCIdList_); - + // myMap::makeMapFromVectors() returns "true" always + // need to be fixed? if(!readResult){ - edm::LogError("EcalRawToDigi")<<"\n unable to read file : " - <("DCCMapFile"); + edm::LogWarning("IncorrectConfiguration") + << "Arrays orderedFedList and orderedDCCIdList are emply. " + "Hard coded correspondence for DCCId:FedId will be used."; + // edm::LogError("EcalRawToDigi")<<"\n unable to read file : " + // <("DCCMapFile"); } // Build a new ECAL DCC data unpacker diff --git a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitByproductProducer.cc b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitByproductProducer.cc index dcaae191ea18e..ea2bf20fc008c 100644 --- a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitByproductProducer.cc +++ b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitByproductProducer.cc @@ -48,7 +48,7 @@ EcalRawToRecHitByproductProducer::produce(edm::Event& iEvent, const edm::EventSe iSetup.get().get(workerName_, workerESH); const EcalUnpackerWorker * worker = dynamic_cast(&*workerESH); if (!worker) - edm::LogError("EcalRawToRecHit|Byproducts")<<"worker "<< workerName_ <<" could not be cast in EcalUnpackerWorker type." + edm::LogError("IncorrectConfiguration")<<"worker "<< workerName_ <<" could not be cast in EcalUnpackerWorker type." <<" this must be a configuration mistake. Expect a segfault right now."; LogDebug("EcalRawToRecHit|Byproducts")<<"worker retrieved."; diff --git a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitProducer.cc b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitProducer.cc index a0de2308026f2..46aacfeb78a30 100644 --- a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitProducer.cc +++ b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitProducer.cc @@ -78,7 +78,7 @@ EcalRawToRecHitProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSet if (EcalNum==1) EBrechits->push_back(*iRecHit); else if (EcalNum==2) EErechits->push_back(*iRecHit); else { - edm::LogError("EcalRawToRecHit|Producer")<<" a subdetid is not recognized. recHit on :"<< iRecHit->id().rawId() + edm::LogError("IncorrectRecHit")<<" a subdetid is not recognized. recHit on :"<< iRecHit->id().rawId() <<" is lost."; }//subdetid }//loop over things in region diff --git a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitRoI.cc b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitRoI.cc index 7f664229658f2..7826859de7924 100644 --- a/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitRoI.cc +++ b/trunk/EventFilter/EcalRawToDigi/plugins/EcalRawToRecHitRoI.cc @@ -50,7 +50,7 @@ EcalRawToRecHitRoI::CandJobPSet::CandJobPSet(edm::ParameterSet &cfg) : CalUnpack else if (type == "l1muon"){cType=l1muon;} else if (type == "l1jet"){cType=l1jet;} else { - edm::LogError("EcalRawToRecHitRoI")<<"\n\n could not interpret the cType: "< by default. expect your trigger path to be slow !\n\n"; cType=view;} } @@ -108,28 +108,30 @@ EcalRawToRecHitRoI::EcalRawToRecHitRoI(const edm::ParameterSet& pset) : } if (!All_ && !Muon_ && !EGamma_ && !Jet_ && !Candidate_){ - edm::LogError(category)<<"I have no specified type of work." + edm::LogError("IncorrectConfiguration")<<"I have no specified type of work." <<"\nI will produce empty list of FEDs." <<"\nI will produce an empty EcalRecHitRefGetter." <<"\n I am sure you don't want that."; //throw. this is a typo/omittion in a cfg. } - produces(); - produces(); - - if (pset.exists("doES")){ - do_es_=pset.getParameter("doES"); - if (do_es_){ - LogDebug(category)<<"will also make the list of FEDs for the ES."; - sourceTag_es_=pset.getParameter("sourceTag_es"); - esinstance_=pset.getUntrackedParameter("esInstance","es"); - if (esinstance_=="") edm::LogError(category)<<" instance name for ES region and FED list cannot be empty. expect a fwk failure."; - produces(esinstance_); - produces(esinstance_); - } - }else do_es_=false; - + produces(); + produces(); + + if (pset.exists("doES")) + do_es_ = pset.getParameter("doES"); + else + do_es_ = false; + + if (do_es_) { + LogDebug(category)<<"will also make the list of FEDs for the ES."; + sourceTag_es_=pset.getParameter("sourceTag_es"); + esinstance_=pset.getUntrackedParameter("esInstance","es"); + if (esinstance_=="") + edm::LogError("IncorrectConfiguration")<<" instance name for ES region and FED list cannot be empty. expect a fwk failure."; + produces(esinstance_); + produces(esinstance_); + } } @@ -198,7 +200,7 @@ void EcalRawToRecHitRoI::produce(edm::Event & e, const edm::EventSetup& iSetup){ e.getByLabel(sourceTag_, lgetter); if (lgetter.failedToGet()) { - edm::LogError(category)<<" could not retrieve the lazy getter from: "< void EcalRawToRecHitRoI::OneCandCollection(co edm::Handle candColl; e.getByLabel(cjpset.Source, candColl); - if (candColl.failedToGet()) {edm::LogError(category)<<"could not get: "<begin(); typename CollectionType::const_iterator end= candColl->end(); @@ -196,8 +199,8 @@ template void EcalRawToRecHitRoI::OneCandCollection(co GlobalVector vector(it->px(),it->py(),it->pz()); if (point.mag()==0 && vector.mag()==0){ - edm::LogWarning(category)<<" state of candidate is not valid. skipping."; - continue; + edm::LogWarning("IncorrectRecHit")<<" state of candidate is not valid. skipping."; + continue; } FreeTrajectoryState fts(point, vector, it->charge(), propH->magneticField()); @@ -211,7 +214,7 @@ template void EcalRawToRecHitRoI::OneCandCollection(co eta= point.eta(); phi= point.phi(); } - else{edm::LogError(category)<<"I tried to be precise, but propagation failed. from:\n"<::iterator it = orbitOffset_.find(runNumber); if(it == orbitOffset_.end()){ - LogWarning("Matacq") << "Orbit offset not found for run " + LogWarning("IncorrectLaserEvent") << "Orbit offset not found for run " << runNumber << ". No orbit correction will be applied."; } else{ @@ -173,7 +173,7 @@ MatacqProducer::addMatacqData(edm::Event& event){ if(produceRaw_){ uint32_t dataLen64 = matacq_.getParsedLen(); if(dataLen64 > bufferSize*8 || matacq_.getDccLen()!= dataLen64){ - LogWarning("Matacq") << " Error in Matacq event fragment length! " + LogWarning("IncorrectLaserEvent") << " Error in Matacq event fragment length! " << "DCC len: " << matacq_.getDccLen() << "*8 Bytes, Parsed len: " << matacq_.getParsedLen() << "*8 Bytes. " @@ -194,11 +194,11 @@ MatacqProducer::addMatacqData(edm::Event& event){ ++stats_.nNonLaserEventsWithMatacq; } } else{ - LogWarning("Matacq") << "No matacq data found for " + LogWarning("IncorrectLaserEvent") << "No matacq data found for " << "run " << runNumber << " orbit " << orbitId; } } else{ - LogWarning("Matacq") << "No matacq file found for event " + LogWarning("IncorrectLaserEvent") << "No matacq file found for event " << event.id(); } } @@ -320,7 +320,7 @@ MatacqProducer::getMatacqEvent(uint32_t runNumber, } } } else{ - LogWarning("Matacq") << "Failed to access file " << inFileName_ << "."; + LogWarning("IncorrectConfiguration") << "Failed to access file " << inFileName_ << "."; } if(pos>=0){ if(verbosity_>2) cout << "[Matacq] jumping to estimated position " @@ -498,7 +498,7 @@ MatacqProducer::getMatacqFile(uint32_t runNumber, uint32_t orbitId, } if(!mopen(fname)){ - LogWarning("Matacq") << "Failed to open file " << fname << "\n"; + LogWarning("IncorrectConfiguration") << "Failed to open file " << fname << "\n"; openedFileRunNumber_ = 0; if(fileChange!=0) *fileChange = false; return false; @@ -542,7 +542,7 @@ uint32_t MatacqProducer::getOrbitId(edm::Event& ev) const{ if(orbit!=0 && thisOrbit!=0 && abs(orbit-thisOrbit)>orbitTolerance_){ //throw cms::Exception("EventCorruption") // << "Orbit ID inconsitency in DCC headers"; - LogWarning("EventCorruption") + LogWarning("IncorrectEvent") << "Orbit ID inconsitency in DCC headers"; orbit = 0; break; @@ -554,7 +554,7 @@ uint32_t MatacqProducer::getOrbitId(edm::Event& ev) const{ if(orbit==0){ // throw cms::Exception("NotFound") // << "Failed to retrieve orbit ID of event "<< ev.id(); - LogWarning("NotFound") << "Failed to retrieve orbit ID of event " + LogWarning("IncorrectEvent") << "Failed to retrieve orbit ID of event " << ev.id(); } return orbit; @@ -583,12 +583,12 @@ int MatacqProducer::getCalibTriggerType(edm::Event& ev) const{ int tType = stat.result(&p); if(p<0){ //throw cms::Exception("NotFound") << "No ECAL DCC data found\n"; - LogWarning("NotFound") << "No ECAL DCC data found\n"; + LogWarning("IncorrectEvent") << "No ECAL DCC data found\n"; tType = -1; } if(p<.8){ //throw cms::Exception("EventCorruption") << "Inconsitency in detailed trigger type indicated in ECAL DCC data headers\n"; - LogWarning("EventCorruption") << "Inconsitency in detailed trigger type indicated in ECAL DCC data headers\n"; + LogWarning("IncorrectEvent") << "Inconsitency in detailed trigger type indicated in ECAL DCC data headers\n"; tType = -1; } return tType; @@ -638,7 +638,7 @@ void MatacqProducer::PosEstimator::init(MatacqProducer* mp){ mp->mseek(last, SEEK_SET, "Moving to beginning of last complete " "matacq event"); if(!mp->mread((char*) data, headerSize, "Reading matacq header", true)){ - LogWarning("Matacq") << "Fast matacq event retrieval failure. " + LogWarning("IncorrectLaserEvent") << "Fast matacq event retrieval failure. " "Falling back to safe retrieval mode."; orbitStepMean_ = 0; } @@ -651,7 +651,7 @@ void MatacqProducer::PosEstimator::init(MatacqProducer* mp){ //some consistency check if(lastLen!=eventLength_){ - LogWarning("Matacq") + LogWarning("IncorrectLaserEvent") << "Fast matacq event retrieval failure: it looks like " "the matacq file contains events of different sizes. Falling back to " "safe retrieval mode."; @@ -828,7 +828,7 @@ bool MatacqProducer::mopen(const std::string& name){ IOFlags::OpenRead)); inFileName_ = name; } catch(cms::Exception& e){ - LogWarning("Matacq") << e.what(); + LogWarning("IncorrectConfiguration") << e.what(); inFile_.reset(); inFileName_ = ""; return false; diff --git a/trunk/EventFilter/EcalRawToDigi/src/DCCEBEventBlock.cc b/trunk/EventFilter/EcalRawToDigi/src/DCCEBEventBlock.cc index 3434edb3b0bbe..15ba45421a002 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/DCCEBEventBlock.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/DCCEBEventBlock.cc @@ -53,7 +53,7 @@ void DCCEBEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ if( fedId_ != expFedId ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigi") + edm::LogWarning("IncorrectEvent") <<"\n For event L1A: "< Skipping to next fed block..."; @@ -67,7 +67,7 @@ void DCCEBEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ // Check if this event is an empty event if( eventSize_ == EMPTYEVENTSIZE ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigi") + edm::LogWarning("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; } @@ -78,7 +78,7 @@ void DCCEBEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ //Check if event size allows at least building the header else if( eventSize_ < HEADERSIZE ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalRawToDigi") + edm::LogError("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; @@ -100,7 +100,7 @@ void DCCEBEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ if( eventSize_ != blockLength_*8 ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalRawToDigi") + edm::LogError("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; @@ -185,7 +185,7 @@ void DCCEBEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ else if ( triggerType_ == CALIBRATIONTRIGGER ){ numbChannels = 70; } else { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalRawToDigi") + edm::LogError("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; @@ -198,14 +198,14 @@ void DCCEBEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ // equals number_channels_found_in_data. // The checks are doing f.e. by f.e. only. - if( feUnpacking_ || memUnpacking_ ){ + if( feUnpacking_ || memUnpacking_ ){ it = feChStatus_.begin(); // looping over FE channels, i.e. tower blocks for( uint chNumber=1; chNumber<= numbChannels && STATUS!=STOP_EVENT_UNPACKING; chNumber++, it++ ){ //for( uint i=1; chNumber<= numbChannels; chNumber++, it++ ){ - short chStatus(*it); + const short chStatus(*it); // not issuiung messages for regular cases if(chStatus == CH_DISABLED || @@ -216,7 +216,7 @@ void DCCEBEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ else if( chStatus == CH_TIMEOUT || chStatus == CH_HEADERERR || chStatus == CH_LINKERR || chStatus == CH_LENGTHERR || chStatus == CH_IFIFOFULL || chStatus == CH_L1AIFIFOFULL) { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigi") << "In fed: " << fedId_ << " at LV1: " << l1_ + edm::LogWarning("IncorrectBlock") << "In fed: " << fedId_ << " at LV1: " << l1_ << " the DCC channel: " << chNumber << " has channel status: " << chStatus << " and is not being unpacked"; diff --git a/trunk/EventFilter/EcalRawToDigi/src/DCCEBSRPBlock.cc b/trunk/EventFilter/EcalRawToDigi/src/DCCEBSRPBlock.cc index ec71a92b5b75b..58061ca5204f9 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/DCCEBSRPBlock.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/DCCEBSRPBlock.cc @@ -72,7 +72,7 @@ bool DCCEBSRPBlock::checkSrpIdAndNumbSRFlags(){ // Check number of SR flags if( nSRFlags_ != expNumbSrFlags_ ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigi@SUB=DCCSRPBlock::unpack") + edm::LogWarning("IncorrectBlock") <<"\nUnable to unpack SRP block for event "<l1A()<<" in fed <<"<getActiveDCC() <<"\nNumber of flags "<l1A()<<" with bx "<bx()<<" in fed "<getActiveDCC() <<"\n TCC id is "<l1A()<<" in fed "<getActiveDCC() <<"\n Number of TTs "< Skipping to next fed block..."; @@ -64,7 +64,7 @@ void DCCEEEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ // Check if this event is an empty event if( eventSize_ == EMPTYEVENTSIZE ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigi") + edm::LogWarning("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; } @@ -75,7 +75,7 @@ void DCCEEEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ //Check if event size allows at least building the header else if( eventSize_ < HEADERSIZE ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalRawToDigi") + edm::LogError("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; @@ -97,7 +97,7 @@ void DCCEEEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ if( eventSize_ != blockLength_*8 ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalRawToDigi") + edm::LogError("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; @@ -182,7 +182,7 @@ void DCCEEEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ else if ( triggerType_ == CALIBRATIONTRIGGER ){ numbChannels = 70; } else { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalRawToDigi") + edm::LogError("IncorrectEvent") <<"\n Event L1A: "< Skipping to next fed block..."; @@ -213,7 +213,7 @@ void DCCEEEventBlock::unpack( uint64_t * buffer, uint numbBytes, uint expFedId){ else if( chStatus == CH_TIMEOUT || chStatus == CH_HEADERERR || chStatus == CH_LINKERR || chStatus == CH_LENGTHERR || chStatus == CH_IFIFOFULL || chStatus == CH_L1AIFIFOFULL ) { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigi") << "In fed: " << fedId_ << " at LV1: " << l1_ + edm::LogWarning("IncorrectBlock") << "In fed: " << fedId_ << " at LV1: " << l1_ << " the DCC channel: " << chNumber << " has channel status: " << chStatus << " and is not being unpacked"; diff --git a/trunk/EventFilter/EcalRawToDigi/src/DCCEETCCBlock.cc b/trunk/EventFilter/EcalRawToDigi/src/DCCEETCCBlock.cc index 4ff7556c8037d..bab28ea184f6b 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/DCCEETCCBlock.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/DCCEETCCBlock.cc @@ -30,7 +30,7 @@ void DCCEETCCBlock::addTriggerPrimitivesToCollection(){ int dccFOV = event_->fov(); if (! (dccFOV==dcc_FOV_0 || dccFOV==dcc_FOV_1 || dccFOV==dcc_FOV_2) ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiTCC") + edm::LogWarning("IncorrectEvent") <<"\n FOV value in data is: " << dccFOV << "At event: " <l1A()<<" with bx "<bx()<<" in fed <<"<getActiveDCC() <<"\n TCC id "<getActiveSM(); + const int activeDCC = mapper_->getActiveSM(); std::vector * m = mapper_->getTccs(activeDCC); std::vector::iterator it; for(it= m->begin();it!=m->end();it++){ - if((*it) == tccId_){ + if((*it) == tccId_){ tccFound=true; /* @@ -206,7 +206,7 @@ bool DCCEETCCBlock::checkTccIdAndNumbTTs(){ if( nTTs_ != 28 && nTTs_ !=16 ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiTCC") + edm::LogWarning("IncorrectBlock") <<"\n Error on event "<l1A()<<" with bx "<bx()<<" in fed <<"<getActiveDCC() <<"\n TCC id "< Skipping to next fed block..."; @@ -220,7 +220,7 @@ bool DCCEETCCBlock::checkTccIdAndNumbTTs(){ if(!tccFound){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiTCC") + edm::LogWarning("IncorrectBlock") <<"\n Error on event "<l1A()<<" with bx "<bx()<<" in fed <<"<getActiveDCC() <<"\n TCC id "< Skipping to next fed block..."; diff --git a/trunk/EventFilter/EcalRawToDigi/src/DCCFEBlock.cc b/trunk/EventFilter/EcalRawToDigi/src/DCCFEBlock.cc index a0883d345d638..f90e29363d322 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/DCCFEBlock.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/DCCFEBlock.cc @@ -33,11 +33,11 @@ int DCCFEBlock::unpack(uint64_t ** data, uint * dwToEnd, bool zs, uint expectedT data_ = *data; dwToEnd_ = dwToEnd; - uint activeDCC = mapper_->getActiveSM(); + const uint activeDCC = mapper_->getActiveSM(); if( (*dwToEnd_)<1){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiTowerSize") + edm::LogWarning("IncorrectEvent") <<"\n Unable to unpack Tower block for event "<l1A()<<" in fed "<getNumChannelsInDcc(activeDCC) ){ // fe_id must be within range foreseen in the FED if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiTowerId") + edm::LogWarning("IncorrectBlock") <<"\n For event "<l1A()<<" and fed "<getActiveDCC() <<"\n Expected FE_id is "< Skipping to next FE block..."; @@ -90,7 +90,7 @@ int DCCFEBlock::unpack(uint64_t ** data, uint * dwToEnd, bool zs, uint expectedT else if( (!checkFeId_) && towerId_ > mapper_->getNumChannelsInDcc(activeDCC) ){ // fe_id must still be within range foreseen in the FED if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiTowerId") + edm::LogWarning("IncorrectBlock") <<"\n For event "<l1A()<<" and fed "<getActiveDCC()<<" (there's no check fe_id==dcc_channel)" <<"\n the FE_id found: "< Skipping to next FE block..."; @@ -110,7 +110,7 @@ int DCCFEBlock::unpack(uint64_t ** data, uint * dwToEnd, bool zs, uint expectedT // accounting for counters starting from 0 in ECAL FE, while from 1 in CSM if( dccBx != bx_ || dccL1 != (l1_+1) ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiNumTowerBlocks") + edm::LogWarning("IncorrectBlock") <<"\n Synchronization error for Tower Block "<l1A() <<" with bx "<bx()<<" in fed "<getActiveDCC() <<"\n TCC local l1A is "<l1A()<<" in fed "<getActiveDCC() <<"\n Number of time samples "<l1A()<<" in fed "<getActiveDCC() <<"\n Only "<<((*dwToEnd_)*8)<<" bytes are available while "< Skipping to next fed block..."; @@ -158,7 +158,7 @@ int DCCFEBlock::unpack(uint64_t ** data, uint * dwToEnd, bool zs, uint expectedT if ( unfilteredDataBlockLength_ != blockLength_ ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiNumTowerBlocks") + edm::LogWarning("IncorrectEvent") <<"\n For event L1A "<l1A()<<", fed "<getActiveDCC()<<" and tower "< Skipping to next fed block..."; @@ -178,7 +178,7 @@ int DCCFEBlock::unpack(uint64_t ** data, uint * dwToEnd, bool zs, uint expectedT if ( unfilteredDataBlockLength_ != blockLength_ ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiNumTowerBlocks") + edm::LogWarning("IncorrectBlock") <<"\n For event L1A "<l1A()<<", fed "<getActiveDCC()<<" and tower "< Keeps unpacking as the unpacker was forced to keep FR data (by configuration) ..."; @@ -190,7 +190,7 @@ int DCCFEBlock::unpack(uint64_t ** data, uint * dwToEnd, bool zs, uint expectedT } else if( blockLength_ > unfilteredDataBlockLength_ || (blockLength_-1) < numbDWInXtalBlock_ ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiNumTowerBlocks") + edm::LogWarning("IncorrectEvent") <<"\n For event L1A "<l1A()<<" and fed "<getActiveDCC() <<"\n The tower "< Skipping to next fed block..."; @@ -237,7 +237,7 @@ int DCCFEBlock::unpack(uint64_t ** data, uint * dwToEnd, bool zs, uint expectedT if (statusUnpackXtal== SKIP_BLOCK_UNPACKING) { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigi") + edm::LogWarning("IncorrectBlock") <<"\n For event L1A "<l1A()<<" and fed "<getActiveDCC() <<"\n The tower "<l1A()<<" in fed "<getActiveDCC() <<"\nThe end of event was reached !"; } @@ -82,7 +82,7 @@ int DCCMemBlock::unpack(uint64_t ** data, uint * dwToEnd, uint expectedTowerID){ EcalElectronicsId id( mapper_->getActiveSM() , expTowerID_,1, 1); (*invalidMemBlockSizes_)->push_back(id); if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiMemBlock") + edm::LogWarning("IncorrectEvent") <<"\nFor event "<l1A()<<", fed "<getActiveDCC()<<" and tower block "<l1A()<<" in fed "<getActiveDCC() <<"\n Only "<<((*dwToEnd_)*8)<<" bytes are available while "<<(blockLength_*8)<<" are needed!"; // chosing channel 1 as representative of a dummy... @@ -110,7 +110,7 @@ int DCCMemBlock::unpack(uint64_t ** data, uint * dwToEnd, uint expectedTowerID){ // accounting for counters starting from 0 in ECAL FE, while from 1 in CSM if( dccBx != bx_ || dccL1 != (l1_+1) ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiMemBlock") + edm::LogWarning("IncorrectEvent") <<"\nSynchronization error for Mem block in event with DCC L1A: "<l1A()<<" with DCC bx: "<bx() <<" in fed: <<"<getActiveDCC()<<"\nMem local L1A is: "<l1A()<<" in fed "<getActiveDCC() <<"\nNumber of time samples "<getActiveSM() , expTowerID_, 1,1); (*invalidMemTtIds_)->push_back(id); if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiMemTowerId") + edm::LogWarning("IncorrectBlock") <<"\nFor event "<l1A()<<" and fed "<getActiveDCC() << " and sm: " << mapper_->getActiveSM() <<"\nExpected mem tower block is "<(data_); @@ -196,14 +196,14 @@ void DCCMemBlock::unpackMemTowerData(){ bool errorOnDecoding(false); - if(expStripId != stripId || expXtalId != xtalId){ + if(expStripId != stripId || expXtalId != xtalId){ // chosing channel and strip as EcalElectronicsId EcalElectronicsId id( mapper_->getActiveSM() , towerId_, expStripId, expXtalId); (*invalidMemChIds_)->push_back(id); if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiMemChId") + edm::LogWarning("IncorrectBlock") <<"\nFor event "<l1A()<<", fed "<getActiveDCC()<<" and tower mem block "<push_back(id); if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiMemGain") + edm::LogWarning("IncorrectBlock") <<"\nFor event "<l1A()<<", fed "<getActiveDCC()<<" , mem tower block "<getActiveDCC() : this is the FED_id (601 - 654 for ECAL at CMS) + const int activeSM = mapper_->getActiveSM(); int subdet(0); - if (NUMB_SM_EB_MIN_MIN <= mapper_->getActiveSM() && mapper_->getActiveSM() <= NUMB_SM_EB_PLU_MAX) - { subdet = EcalBarrel;} - else if(NUMB_SM_EE_MIN_MIN <= mapper_->getActiveSM() && mapper_->getActiveSM() <= NUMB_SM_EE_MIN_MAX || - NUMB_SM_EE_PLU_MIN <= mapper_->getActiveSM() && mapper_->getActiveSM() <= NUMB_SM_EE_PLU_MAX) - { subdet = EcalEndcap;} - else{ - if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiMemBlock") - <<"\n mapper points to non existing dccid: " << mapper_->getActiveSM(); - } + if (NUMB_SM_EB_MIN_MIN <= activeSM && activeSM <= NUMB_SM_EB_PLU_MAX) { + subdet = EcalBarrel; + } + else if(NUMB_SM_EE_MIN_MIN <= activeSM && activeSM <= NUMB_SM_EE_MIN_MAX || + NUMB_SM_EE_PLU_MIN <= activeSM && activeSM <= NUMB_SM_EE_PLU_MAX) { + subdet = EcalEndcap; + } + else { + if( ! DCCDataUnpacker::silentMode_ ){ + edm::LogWarning("IncorrectMapping") + <<"\n mapper points to non existing dccid: " << activeSM; + } } - EcalPnDiodeDetId PnId(subdet, mapper_->getActiveSM(), realPnId ); + EcalPnDiodeDetId PnId(subdet, activeSM, realPnId ); EcalPnDiodeDigi thePnDigi(PnId ); thePnDigi.setSize(kSamplesPerPn_); diff --git a/trunk/EventFilter/EcalRawToDigi/src/DCCSCBlock.cc b/trunk/EventFilter/EcalRawToDigi/src/DCCSCBlock.cc index bdd4abdc5e351..dc548eaa1de2d 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/DCCSCBlock.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/DCCSCBlock.cc @@ -44,7 +44,7 @@ int DCCSCBlock::unpackXtalData(uint expStripID, uint expXtalID){ if( !zs_ && (expStripID != stripId || expXtalID != xtalId)){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiChId") + edm::LogWarning("IncorrectBlock") <<"\n For event LV1: "<l1A()<<", fed "<getActiveDCC()<<" and tower "< 5 || xtalId == 0 || xtalId > 5){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiChId") + edm::LogWarning("IncorrectBlock") <<"\n For event LV1: "<l1A()<<", fed "<getActiveDCC()<<" and tower "<l1A()<<", fed "<getActiveDCC()<<" and tower "<l1A()<<", fed "<getActiveDCC()<<" and tower "<l1A()<<", fed "<getActiveDCC()<<" and tower "<0 && xtalGains_[i-1]>xtalGains_[i]) { - numGainWrong++; - if (firstGainWrong == -1) { firstGainWrong=i;} + for (uint i=1; ixtalGains_[i]) { + numGainWrong++; + + if (firstGainWrong == -1) { firstGainWrong=i;} } } if (numGainWrong>0) { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiGainSwitch") + edm::LogWarning("IncorrectBlock") <<"\n For event LV1: "<l1A()<<", fed "<getActiveDCC()<<" and tower "<l1A()<<", fed "<getActiveDCC()<<" and tower "< * errorColection){ - int activeDCC = mapper_->getActiveSM(); + const int activeDCC = mapper_->getActiveSM(); if ( (NUMB_SM_EE_MIN_MIN <=activeDCC && activeDCC<=NUMB_SM_EE_MIN_MAX) || (NUMB_SM_EE_PLU_MIN <=activeDCC && activeDCC<=NUMB_SM_EE_PLU_MAX) ){ @@ -276,7 +276,7 @@ void DCCSCBlock::fillEcalElectronicsError( std::auto_ptrpush_back(*eleTp); }else{ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiDevChId") + edm::LogWarning("IncorrectBlock") <<"\n For event "<l1A()<<" there's fed: "<< activeDCC <<" activeDcc: "<getActiveSM() <<" but that activeDcc is not valid in EE."; @@ -284,8 +284,3 @@ void DCCSCBlock::fillEcalElectronicsError( std::auto_ptrl1A()<<" in fed <<"<getActiveDCC() <<"\n Only "<<((*dwToEnd_)*8)<<" bytes are available while "<<(blockLength_*8)<<" are needed!"; @@ -66,7 +66,7 @@ int DCCSRPBlock::unpack(uint64_t ** data, uint * dwToEnd, uint numbFlags ){ uint dccBx = ( event_->bx() ) & SRP_L1_MASK; if( dccBx != bx_ || dccL1 != l1_ ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiSRP") + edm::LogWarning("IncorrectEvent") <<"EcalRawToDigi@SUB=DCCSRPBlock::unpack" <<"\nSynchronization error for SRP block in event "<l1A()<<" with bx "<bx()<<" in fed <<"<getActiveDCC() <<"\n SRP local l1A is "<l1A()<<" in fed "<getActiveDCC() <<"\n Only 8 bytes are available until the end of event ..." @@ -34,7 +34,7 @@ int DCCTCCBlock::unpack(uint64_t ** data, uint * dwToEnd, short tccChId){ if( (*dwToEnd_)l1A()<<" in fed "<getActiveDCC() <<"\n Only "<<((*dwToEnd_)*8)<<" bytes are available until the end of event while "<<(blockLength_*8)<<" are needed!" @@ -73,7 +73,7 @@ int DCCTCCBlock::unpack(uint64_t ** data, uint * dwToEnd, short tccChId){ uint dccL1 = (event_->l1A()) & TCC_L1_MASK; if( dccBx != bx_ || dccL1 != l1_ ){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiTCC") + edm::LogWarning("IncorrectBlock") <<"\n Synchronization error for TCC block in event "<l1A() <<" with bx "<bx()<<" in fed <<"<getActiveDCC() <<"\n TCC local l1A is "<numbTriggerTSamples()); if( nTSamples_ != expTriggerTSamples ){ - edm::LogWarning("EcalRawToDigiTCC") + edm::LogWarning("IncorrectBlock") <<"\n Unable to unpack TCC block for event "<l1A()<<" in fed "<getActiveDCC() <<"\n Number of time samples is "<l1A()<<", fed "<getActiveDCC()<<" and tower "< 5 || xtalId == 0 || xtalId > 5){ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiChId") + edm::LogWarning("IncorrectBlock") <<"\n For event L1A: "<l1A()<<", fed "<getActiveDCC()<<" and tower "<l1A()<<", fed "<getActiveDCC()<<" and tower "<l1A()<<", fed "<getActiveDCC()<<" and tower "<l1A()<<", fed "<getActiveDCC()<<" and tower "<0) { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiGainSwitch") + edm::LogWarning("IncorrectBlock") <<"\n For event L1A: "<l1A()<<", fed "<getActiveDCC()<<" and tower "< * errorColection ){ - int activeDCC = mapper_->getActiveSM(); + const int activeDCC = mapper_->getActiveSM(); if(NUMB_SM_EB_MIN_MIN<=activeDCC && activeDCC<=NUMB_SM_EB_PLU_MAX){ EcalElectronicsId * eleTp = mapper_->getTTEleIdPointer(activeDCC+TCCID_SMID_SHIFT_EB,expTowerID_); (*errorColection)->push_back(*eleTp); }else{ if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogWarning("EcalRawToDigiDevChId") + edm::LogWarning("IncorrectBlock") <<"\n For event "<l1A()<<" there's fed: "<< activeDCC <<" activeDcc: "<getActiveSM() <<" but that activeDcc is not valid in EB."; diff --git a/trunk/EventFilter/EcalRawToDigi/src/EcalDCCHeaderRuntypeDecoder.cc b/trunk/EventFilter/EcalRawToDigi/src/EcalDCCHeaderRuntypeDecoder.cc index 850dd1df03da6..ccba1037595ad 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/EcalDCCHeaderRuntypeDecoder.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/EcalDCCHeaderRuntypeDecoder.cc @@ -63,7 +63,7 @@ bool EcalDCCHeaderRuntypeDecoder::Decode( ulong TrigType, // global h else { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalDCCHeaderRuntypeDecoder") <<"Unrecognized runtype and sequence: "<setRunType(-1); WasDecodingOk_ = false; @@ -134,7 +134,7 @@ void EcalDCCHeaderRuntypeDecoder::DecodeSettingGlobal ( ulong TrigType, ulong de else { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalDCCHeaderRuntypeDecoder") <<"Unrecognized detailedTriggerTypeInTTCCommand: " << detailedTriggerTypeInTTCCommand; + edm::LogError("IncorrectHeader") <<"Unrecognized detailedTriggerTypeInTTCCommand: " << detailedTriggerTypeInTTCCommand; } theHeader->setRunType(-1); WasDecodingOk_ = false; @@ -146,7 +146,7 @@ void EcalDCCHeaderRuntypeDecoder::DecodeSettingGlobal ( ulong TrigType, ulong de else { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalDCCHeaderRuntypeDecoder") <<"Unrecognized detailed trigger type"; + edm::LogError("IncorrectHeader") <<"Unrecognized detailed trigger type"; } theHeader->setRunType(-1); WasDecodingOk_ = false; @@ -212,7 +212,7 @@ void EcalDCCHeaderRuntypeDecoder::DecodeSetting ( int Setting, EcalDCCHeaderBl } else { if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalDCCHeaderRuntypeDecoder") <<"Unrecognized run type: "<getRunType(); + edm::LogError("IncorrectHeader") <<"Unrecognized run type: "<getRunType(); } WasDecodingOk_ = false; } diff --git a/trunk/EventFilter/EcalRawToDigi/src/EcalElectronicsMapper.cc b/trunk/EventFilter/EcalRawToDigi/src/EcalElectronicsMapper.cc index 27af7afb385e2..9972bd77792a7 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/EcalElectronicsMapper.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/EcalElectronicsMapper.cc @@ -364,7 +364,7 @@ uint EcalElectronicsMapper::getDCCId(uint aSMId_) const{ //error return if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalElectronicsMapper") << "DCC requested for SM id: " << aSMId_ << " not found"; + edm::LogError("IncorrectMapping") << "DCC requested for SM id: " << aSMId_ << " not found"; } return 0; } @@ -381,7 +381,7 @@ uint EcalElectronicsMapper::getSMId(uint aDCCId_) const { //error return if( ! DCCDataUnpacker::silentMode_ ){ - edm::LogError("EcalEcalElectronicsMapper") << "SM requested DCC id: " << aDCCId_ << " not found"; + edm::LogError("IncorrectMapping") << "SM requested DCC id: " << aDCCId_ << " not found"; } return 0; } diff --git a/trunk/EventFilter/EcalRawToDigi/src/EcalUnpackerWorker.cc b/trunk/EventFilter/EcalRawToDigi/src/EcalUnpackerWorker.cc index d2462d64d79fa..23abefa448159 100644 --- a/trunk/EventFilter/EcalRawToDigi/src/EcalUnpackerWorker.cc +++ b/trunk/EventFilter/EcalRawToDigi/src/EcalUnpackerWorker.cc @@ -24,12 +24,12 @@ EcalUnpackerWorker::EcalUnpackerWorker(const edm::ParameterSet & conf){ uint numbTriggerTSamples_ = EEMpset.getParameter("numbTriggerTSamples"); if( numbXtalTSamples_ <6 || numbXtalTSamples_>64 || (numbXtalTSamples_-2)%4 ){ - edm::LogError("EcalRawToRecHit|Worker")<<"Unsuported number of xtal time samples : "<makeMapFromVectors(oFl,oDl); if(!readResult){ - edm::LogError("EcalRawToRecHit|Worker")<<"\n unable to configure EcalElectronicsMapper from vectors."; + edm::LogError("IncorrectConfiguration")<<"\n unable to configure EcalElectronicsMapper from vectors."; } unpacker_ = new DCCDataUnpacker(myMap_,