#include <DQM/EcalBarrelMonitorTasks/interface/EBSelectiveReadoutTask.h>
Public Member Functions | |
EBSelectiveReadoutTask (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~EBSelectiveReadoutTask () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginJob (const edm::EventSetup &c) |
BeginJob. | |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
BeginRun. | |
void | cleanup (void) |
Cleanup. | |
void | endJob (void) |
EndJob. | |
void | endRun (const edm::Run &r, const edm::EventSetup &c) |
EndRun. | |
void | reset (void) |
Reset. | |
void | setup (void) |
Setup. | |
Static Protected Attributes | |
static const int | bytesPerCrystal = 24 |
Number of bytes per crystal. | |
static const int | ebTtEdge = 5 |
Number of crystals along an EB TT. | |
static const int | kByte = 1024 |
static const int | nEBDcc = 36 |
static const int | nEbEta = 170 |
number of crystals along Eta in EB | |
static const int | nEbPhi = 360 |
number of crystals along Phi in EB | |
static const int | nEbRus = 36*68 |
number of RUs for EB | |
static const int | nECALDcc = 54 |
static const int | nTtEta = 56 |
Number of Trigger Towers along Eta. | |
static const int | nTTEta = 34 |
Constants. | |
static const int | nTtPhi = 72 |
Number of Trigger Towers along Phi. | |
static const int | nTTPhi = 72 |
static const int | scEdge = 5 |
Number of crystals along a supercrystal edge. | |
Private Types | |
enum | subdet_t { EB, EE } |
distinguishes barral and endcap of ECAL. More... | |
Private Member Functions | |
void | anaDigi (const EBDataFrame &frame, const EBSrFlagCollection &srFlagColl) |
Accumulates statitics for data volume analysis. | |
void | anaDigiInit () |
Initializes statistics accumalator for data volume analysis. | |
int | cIndex2iEta (int i) const |
converse of iEta2cIndex() method. | |
int | cIndex2iPhi (int i) const |
converse of iPhi2cIndex() method. | |
int | cIndex2iXY (int iX0) const |
converse of iXY2cIndex() method. | |
int | dccIndex (int i, int j) const |
Gets the index of the DCC reading a crystal. | |
unsigned | dccNum (const DetId &xtalId) const |
Retrieve the logical number of the DCC reading a given crystal channel. | |
int | dccPhiIndex (int i, int j) const |
Gets the phi index of the DCC reading a crystal. | |
int | dccPhiIndexOfRU (int i, int j) const |
Gets the phi index of the DCC reading a RU (SC or TT). | |
double | getDccEventSize (int iDcc0, double nReadXtals) const |
Gets the size of an DCC event fragment. | |
double | getDccOverhead (subdet_t subdet) const |
Gets the size in bytes fixed-size part of a DCC event fragment. | |
double | getEbEventSize (double nReadXtals) const |
Computes the size of an ECAL barrel event fragment. | |
int | iEta2cIndex (int iEta) const |
Converts a std CMSSW crystal eta index to a c-array index (starting from zero and without hole). | |
int | iPhi2cIndex (int iPhi) const |
Converts a std CMSSW crystal phi index to a c-array index (starting from zero and without hole). | |
int | iXY2cIndex (int iX) const |
Converts a std CMSSW crystal x or y index to a c-array index (starting from zero and without hole). | |
EcalTrigTowerDetId | readOutUnitOf (const EBDetId &xtalId) const |
Retrives the readout unit, a trigger tower in the barrel case, and a supercrystal in the endcap case, a given crystal belongs to. | |
Private Attributes | |
DQMStore * | dqmStore_ |
MonitorElement * | EBDccEventSize_ |
edm::InputTag | EBDigiCollection_ |
MonitorElement * | EBEventSize_ |
MonitorElement * | EBFullReadoutSRFlagMap_ |
MonitorElement * | EBHighInterestPayload_ |
MonitorElement * | EBHighInterestTriggerTowerFlagMap_ |
MonitorElement * | EBLowInterestPayload_ |
MonitorElement * | EBLowInterestTriggerTowerFlagMap_ |
MonitorElement * | EBReadoutUnitForcedBitMap_ |
bool | ebRuActive_ [nEbEta/ebTtEdge][nEbPhi/ebTtEdge] |
For book keeping of RU actually read out (not fully zero suppressed). | |
edm::InputTag | EBSRFlagCollection_ |
edm::InputTag | EBUnsuppressedDigiCollection_ |
edm::InputTag | EcalRecHitCollection_ |
edm::InputTag | EcalTrigPrimDigiCollection_ |
bool | enableCleanup_ |
edm::InputTag | FEDRawDataCollection_ |
int | ievt_ |
bool | init_ |
bool | mergeRuns_ |
int | nEb_ |
ECAL barrel read channel count. | |
int | nEbHI_ |
ECAL barrel high interest read channel count. | |
int | nEbLI_ |
ECAL barrel low interest read channel count. | |
int | nPerDcc_ [nECALDcc] |
ECAL read channel count for each DCC:. | |
int | nRuPerDcc_ [nECALDcc] |
Count for each DCC of RUs with at leat one channel read out:. | |
std::string | prefixME_ |
Definition at line 21 of file EBSelectiveReadoutTask.h.
enum EBSelectiveReadoutTask::subdet_t [private] |
EBSelectiveReadoutTask::EBSelectiveReadoutTask | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 38 of file EBSelectiveReadoutTask.cc.
References dqmStore_, EBDccEventSize_, EBDigiCollection_, EBEventSize_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, EBSRFlagCollection_, EBUnsuppressedDigiCollection_, EcalTrigPrimDigiCollection_, enableCleanup_, FEDRawDataCollection_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), init_, mergeRuns_, and prefixME_.
00038 { 00039 00040 init_ = false; 00041 00042 dqmStore_ = Service<DQMStore>().operator->(); 00043 00044 prefixME_ = ps.getUntrackedParameter<string>("prefixME", ""); 00045 00046 enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false); 00047 00048 mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false); 00049 00050 // parameters... 00051 EBDigiCollection_ = ps.getParameter<edm::InputTag>("EBDigiCollection"); 00052 EBUnsuppressedDigiCollection_ = ps.getParameter<edm::InputTag>("EBUsuppressedDigiCollection"); 00053 EBSRFlagCollection_ = ps.getParameter<edm::InputTag>("EBSRFlagCollection"); 00054 EcalTrigPrimDigiCollection_ = ps.getParameter<edm::InputTag>("EcalTrigPrimDigiCollection"); 00055 FEDRawDataCollection_ = ps.getParameter<edm::InputTag>("FEDRawDataCollection"); 00056 00057 // histograms... 00058 EBDccEventSize_ = 0; 00059 EBReadoutUnitForcedBitMap_ = 0; 00060 EBFullReadoutSRFlagMap_ = 0; 00061 EBHighInterestTriggerTowerFlagMap_ = 0; 00062 EBLowInterestTriggerTowerFlagMap_ = 0; 00063 EBEventSize_ = 0; 00064 EBHighInterestPayload_ = 0; 00065 EBLowInterestPayload_ = 0; 00066 00067 }
EBSelectiveReadoutTask::~EBSelectiveReadoutTask | ( | ) | [virtual] |
void EBSelectiveReadoutTask::anaDigi | ( | const EBDataFrame & | frame, | |
const EBSrFlagCollection & | srFlagColl | |||
) | [private] |
Accumulates statitics for data volume analysis.
To be called for each ECAL digi. See anaDigiInit().
Definition at line 355 of file EBSelectiveReadoutTask.cc.
References GeomDetEnumerators::barrel, dccNum(), ebRuActive_, ebTtEdge, EcalBarrel, edm::SortedCollection< T, SORT >::end(), edm::SortedCollection< T, SORT >::find(), EBDataFrame::id(), iEta2cIndex(), iPhi2cIndex(), nEb_, nEbHI_, nEbLI_, nPerDcc_, nRuPerDcc_, readOutUnitOf(), and EcalSrFlag::SRF_FULL.
Referenced by analyze().
00355 { 00356 00357 EBDetId id = frame.id(); 00358 EBSrFlagCollection::const_iterator srf = srFlagColl.find(readOutUnitOf(id)); 00359 00360 if(srf == srFlagColl.end()){ 00361 // LogWarning("EBSelectiveReadoutTask") << "SR flag not found"; 00362 return; 00363 } 00364 00365 bool highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK) 00366 == EcalSrFlag::SRF_FULL); 00367 00368 bool barrel = (id.subdetId()==EcalBarrel); 00369 00370 if(barrel){ 00371 ++nEb_; 00372 if(highInterest){ 00373 ++nEbHI_; 00374 } else{//low interest 00375 ++nEbLI_; 00376 } 00377 int iEta0 = iEta2cIndex(id.ieta()); 00378 int iPhi0 = iPhi2cIndex(id.iphi()); 00379 if(!ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge]){ 00380 ++nRuPerDcc_[dccNum(id)-1]; 00381 ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge] = true; 00382 } 00383 } 00384 00385 ++nPerDcc_[dccNum(id)-1]; 00386 }
void EBSelectiveReadoutTask::anaDigiInit | ( | ) | [private] |
Initializes statistics accumalator for data volume analysis.
To be call at start of each event analysis.
Definition at line 388 of file EBSelectiveReadoutTask.cc.
References ebRuActive_, nEb_, nEbHI_, nEbLI_, nPerDcc_, and nRuPerDcc_.
Referenced by analyze().
00388 { 00389 nEb_ = 0; 00390 nEbLI_ = 0; 00391 nEbHI_ = 0; 00392 bzero(nPerDcc_, sizeof(nPerDcc_)); 00393 bzero(nRuPerDcc_, sizeof(nRuPerDcc_)); 00394 bzero(ebRuActive_, sizeof(ebRuActive_)); 00395 }
void EBSelectiveReadoutTask::analyze | ( | const edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 212 of file EBSelectiveReadoutTask.cc.
References anaDigi(), anaDigiInit(), bytesPerCrystal, EBDccEventSize_, EBDigiCollection_, EBEventSize_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, EBSRFlagCollection_, EcalBarrel, EcalTrigPrimDigiCollection_, FEDRawDataCollection_, MonitorElement::Fill(), edm::Event::getByLabel(), getEbEventSize(), ievt_, init_, edm::Handle< T >::isValid(), it, kByte, nEb_, nEBDcc, nEbHI_, nEbLI_, setup(), EcalSrFlag::SRF_FORCED_MASK, EcalSrFlag::SRF_FULL, and Numbers::subDet().
00212 { 00213 00214 if ( ! init_ ) this->setup(); 00215 00216 ievt_++; 00217 00218 Handle<FEDRawDataCollection> raw; 00219 if ( e.getByLabel(FEDRawDataCollection_, raw) ) { 00220 00221 for ( int iDcc = 0; iDcc < nEBDcc; ++iDcc ) { 00222 00223 EBDccEventSize_->Fill(iDcc+1, ((double)raw->FEDData(610+iDcc).size())/kByte ); 00224 00225 } 00226 00227 } else { 00228 LogWarning("EBSelectiveReadoutTask") << FEDRawDataCollection_ << " not available"; 00229 } 00230 00231 TH2F *h01 = UtilsClient::getHisto<TH2F*>( EBFullReadoutSRFlagMap_ ); 00232 float integral01 = h01->GetEntries(); 00233 if( integral01 != 0 ) h01->Scale( integral01 ); 00234 00235 TH2F *h02 = UtilsClient::getHisto<TH2F*>( EBReadoutUnitForcedBitMap_ ); 00236 float integral02 = h02->GetEntries(); 00237 if( integral02 != 0 ) h02->Scale( integral02 ); 00238 00239 // Selective Readout Flags 00240 Handle<EBSrFlagCollection> ebSrFlags; 00241 if ( e.getByLabel(EBSRFlagCollection_,ebSrFlags) ) { 00242 00243 for ( EBSrFlagCollection::const_iterator it = ebSrFlags->begin(); it != ebSrFlags->end(); ++it ) { 00244 00245 int iet = it->id().ieta(); 00246 int ipt = it->id().iphi(); 00247 00248 float xiet = (iet>0) ? iet-0.5 : iet+0.5 ; 00249 float xipt = ipt-0.5; 00250 00251 int flag = it->value() & ~EcalSrFlag::SRF_FORCED_MASK; 00252 00253 if(flag == EcalSrFlag::SRF_FULL){ 00254 EBFullReadoutSRFlagMap_->Fill(xipt,xiet); 00255 } else { 00256 EBFullReadoutSRFlagMap_->Fill(-1,-18); 00257 } 00258 00259 if(it->value() & EcalSrFlag::SRF_FORCED_MASK){ 00260 EBReadoutUnitForcedBitMap_->Fill(xipt,xiet); 00261 } else { 00262 EBReadoutUnitForcedBitMap_->Fill(-1,-18); 00263 } 00264 00265 } 00266 } else { 00267 LogWarning("EBSelectiveReadoutTask") << EBSRFlagCollection_ << " not available"; 00268 } 00269 00270 integral01 = h01->GetEntries(); 00271 if( integral01 != 0 ) h01->Scale( 1.0/integral01 ); 00272 integral02 = h02->GetEntries(); 00273 if( integral02 != 0 ) h02->Scale( 1.0/integral02 ); 00274 00275 TH2F *h03 = UtilsClient::getHisto<TH2F*>( EBLowInterestTriggerTowerFlagMap_ ); 00276 float integral03 = h03->GetEntries(); 00277 if( integral03 != 0 ) h03->Scale( integral03 ); 00278 00279 TH2F *h04 = UtilsClient::getHisto<TH2F*>( EBHighInterestTriggerTowerFlagMap_ ); 00280 float integral04 = h04->GetEntries(); 00281 if( integral04 != 0 ) h04->Scale( integral04 ); 00282 00283 Handle<EcalTrigPrimDigiCollection> TPCollection; 00284 if ( e.getByLabel(EcalTrigPrimDigiCollection_, TPCollection) ) { 00285 00286 // Trigger Primitives 00287 EcalTrigPrimDigiCollection::const_iterator TPdigi; 00288 for (TPdigi = TPCollection->begin(); TPdigi != TPCollection->end(); ++TPdigi ) { 00289 00290 if ( Numbers::subDet( TPdigi->id() ) != EcalBarrel ) continue; 00291 00292 int iet = TPdigi->id().ieta(); 00293 int ipt = TPdigi->id().iphi(); 00294 00295 float xiet = (iet>0) ? iet-0.5 : iet+0.5 ; 00296 float xipt = ipt-0.5; 00297 00298 if ( (TPdigi->ttFlag() & 0x3) == 0 ) { 00299 EBLowInterestTriggerTowerFlagMap_->Fill(xipt,xiet); 00300 } else { 00301 EBLowInterestTriggerTowerFlagMap_->Fill(-1,-18); 00302 } 00303 00304 if ( (TPdigi->ttFlag() & 0x3) == 3 ) { 00305 EBHighInterestTriggerTowerFlagMap_->Fill(xipt,xiet); 00306 } else { 00307 EBHighInterestTriggerTowerFlagMap_->Fill(-1,-18); 00308 } 00309 00310 } 00311 } else { 00312 LogWarning("EBSelectiveReadoutTask") << EcalTrigPrimDigiCollection_ << " not available"; 00313 } 00314 00315 integral03 = h03->GetEntries(); 00316 if( integral03 != 0 ) h03->Scale( 1.0/integral03 ); 00317 integral04 = h04->GetEntries(); 00318 if( integral04 != 0 ) h04->Scale( 1.0/integral04 ); 00319 00320 if (!ebSrFlags.isValid()) return; 00321 00322 // Data Volume 00323 double aLowInterest=0; 00324 double aHighInterest=0; 00325 double aAnyInterest=0; 00326 00327 Handle<EBDigiCollection> ebDigis; 00328 if ( e.getByLabel(EBDigiCollection_ , ebDigis) ) { 00329 00330 anaDigiInit(); 00331 00332 for (unsigned int digis=0; digis<ebDigis->size(); ++digis){ 00333 EBDataFrame ebdf = (*ebDigis)[digis]; 00334 anaDigi(ebdf, *ebSrFlags); 00335 } 00336 00337 //low interest channels: 00338 aLowInterest = nEbLI_*bytesPerCrystal/kByte; 00339 EBLowInterestPayload_->Fill(aLowInterest); 00340 00341 //low interest channels: 00342 aHighInterest = nEbHI_*bytesPerCrystal/kByte; 00343 EBHighInterestPayload_->Fill(aHighInterest); 00344 00345 //any-interest channels: 00346 aAnyInterest = getEbEventSize(nEb_)/kByte; 00347 EBEventSize_->Fill(aAnyInterest); 00348 00349 } else { 00350 LogWarning("EBSelectiveReadoutTask") << EBDigiCollection_ << " not available"; 00351 } 00352 00353 }
void EBSelectiveReadoutTask::beginJob | ( | const edm::EventSetup & | c | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 73 of file EBSelectiveReadoutTask.cc.
References dqmStore_, ievt_, Numbers::initGeometry(), prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().
00073 { 00074 00075 ievt_ = 0; 00076 00077 if ( dqmStore_ ) { 00078 dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask"); 00079 dqmStore_->rmdir(prefixME_ + "/EBSelectiveReadoutTask"); 00080 } 00081 00082 Numbers::initGeometry(c, false); 00083 00084 }
void EBSelectiveReadoutTask::beginRun | ( | const edm::Run & | r, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
BeginRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 182 of file EBSelectiveReadoutTask.cc.
References mergeRuns_, and reset().
00182 { 00183 00184 if ( ! mergeRuns_ ) this->reset(); 00185 00186 }
converse of iPhi2cIndex() method.
Definition at line 151 of file EBSelectiveReadoutTask.h.
00151 { 00152 return i+1; 00153 }
Cleanup.
Definition at line 137 of file EBSelectiveReadoutTask.cc.
References dqmStore_, EBDccEventSize_, EBEventSize_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, MonitorElement::getName(), init_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().
Referenced by endJob().
00137 { 00138 00139 if ( ! init_ ) return; 00140 00141 if ( dqmStore_ ) { 00142 dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask"); 00143 00144 if ( EBDccEventSize_ ) dqmStore_->removeElement( EBDccEventSize_->getName() ); 00145 EBDccEventSize_ = 0; 00146 00147 if ( EBReadoutUnitForcedBitMap_ ) dqmStore_->removeElement( EBReadoutUnitForcedBitMap_->getName() ); 00148 EBReadoutUnitForcedBitMap_ = 0; 00149 00150 if ( EBFullReadoutSRFlagMap_ ) dqmStore_->removeElement( EBFullReadoutSRFlagMap_->getName() ); 00151 EBFullReadoutSRFlagMap_ = 0; 00152 00153 if ( EBHighInterestTriggerTowerFlagMap_ ) dqmStore_->removeElement( EBHighInterestTriggerTowerFlagMap_->getName() ); 00154 EBHighInterestTriggerTowerFlagMap_ = 0; 00155 00156 if ( EBLowInterestTriggerTowerFlagMap_ ) dqmStore_->removeElement( EBLowInterestTriggerTowerFlagMap_->getName() ); 00157 EBLowInterestTriggerTowerFlagMap_ = 0; 00158 00159 if ( EBEventSize_ ) dqmStore_->removeElement( EBEventSize_->getName() ); 00160 EBEventSize_ = 0; 00161 00162 if ( EBHighInterestPayload_ ) dqmStore_->removeElement( EBHighInterestPayload_->getName() ); 00163 EBHighInterestPayload_ = 0; 00164 00165 if ( EBLowInterestPayload_ ) dqmStore_->removeElement( EBLowInterestPayload_->getName() ); 00166 EBLowInterestPayload_ = 0; 00167 00168 } 00169 00170 init_ = false; 00171 00172 }
Gets the index of the DCC reading a crystal.
i | iEta | |
j | iPhi |
Definition at line 440 of file EBSelectiveReadoutTask.cc.
Referenced by dccNum().
00440 { 00441 //a SM is 85 crystal long: 00442 int iEtaSM = i/85; 00443 //a SM is 20 crystal wide: 00444 int iPhiSM = j/20; 00445 //DCC numbers start at 9 in the barrel and there 18 DCC/SM 00446 return 9+18*iEtaSM+iPhiSM; 00447 }
unsigned EBSelectiveReadoutTask::dccNum | ( | const DetId & | xtalId | ) | const [private] |
Retrieve the logical number of the DCC reading a given crystal channel.
xtarId | crystal channel identifier |
Definition at line 402 of file EBSelectiveReadoutTask.cc.
References dccIndex(), DetId::det(), DetId::Ecal, EcalBarrel, Exception, EBDetId::ieta(), iEta2cIndex(), EBDetId::iphi(), iPhi2cIndex(), j, k, nECALDcc, and DetId::subdetId().
Referenced by anaDigi().
00402 { 00403 int j; 00404 int k; 00405 00406 if ( xtalId.det()!=DetId::Ecal ) { 00407 throw cms::Exception("EBSelectiveReadoutTask") << "Crystal does not belong to ECAL"; 00408 } 00409 00410 if(xtalId.subdetId()==EcalBarrel){ 00411 EBDetId ebDetId(xtalId); 00412 j = iEta2cIndex(ebDetId.ieta()); 00413 k = iPhi2cIndex(ebDetId.iphi()); 00414 } else { 00415 throw cms::Exception("EBSelectiveReadoutTask") 00416 <<"Not ECAL barrel."; 00417 } 00418 int iDcc0 = dccIndex(j,k); 00419 assert(iDcc0>=0 && iDcc0<nECALDcc); 00420 return iDcc0+1; 00421 }
Gets the phi index of the DCC reading a crystal.
i | iEta | |
j | iPhi |
Definition at line 196 of file EBSelectiveReadoutTask.h.
References dccPhiIndexOfRU().
00196 { 00197 return dccPhiIndexOfRU(i/5, j/5); 00198 }
Gets the phi index of the DCC reading a RU (SC or TT).
i | iEta | |
j | iPhi |
Definition at line 434 of file EBSelectiveReadoutTask.cc.
Referenced by dccPhiIndex().
00434 { 00435 //iEta=i, iPhi=j 00436 //phi edge of a SM is 4 TT 00437 return j/4; 00438 }
EndJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 174 of file EBSelectiveReadoutTask.cc.
References cleanup(), enableCleanup_, and ievt_.
00174 { 00175 00176 LogInfo("EBSelectiveReadoutTask") << "analyzed " << ievt_ << " events"; 00177 00178 if ( enableCleanup_ ) this->cleanup(); 00179 00180 }
void EBSelectiveReadoutTask::endRun | ( | const edm::Run & | r, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
EndRun.
Reimplemented from edm::EDAnalyzer.
Definition at line 188 of file EBSelectiveReadoutTask.cc.
double EBSelectiveReadoutTask::getDccEventSize | ( | int | iDcc0, | |
double | nReadXtals | |||
) | const [inline, private] |
Gets the size of an DCC event fragment.
iDcc0 | the DCC logical number starting from 0. | |
nReadXtals | number of read crystal channels. |
Definition at line 174 of file EBSelectiveReadoutTask.h.
References bytesPerCrystal, EB, EE, getDccOverhead(), and nRuPerDcc_.
00174 { 00175 subdet_t subdet; 00176 if(iDcc0<9 || iDcc0>=45){ 00177 subdet = EE; 00178 } else{ 00179 subdet = EB; 00180 } 00181 return getDccOverhead(subdet)+nReadXtals*bytesPerCrystal+nRuPerDcc_[iDcc0]*8; 00182 }
double EBSelectiveReadoutTask::getDccOverhead | ( | subdet_t | subdet | ) | const [inline, private] |
Gets the size in bytes fixed-size part of a DCC event fragment.
Definition at line 164 of file EBSelectiveReadoutTask.h.
References EB.
Referenced by getDccEventSize(), and getEbEventSize().
00164 { 00165 // return (subdet==EB?34:25)*8; 00166 return (subdet==EB?34:52)*8; 00167 }
double EBSelectiveReadoutTask::getEbEventSize | ( | double | nReadXtals | ) | const [private] |
Computes the size of an ECAL barrel event fragment.
nReadXtals | number of read crystal channels |
Definition at line 423 of file EBSelectiveReadoutTask.cc.
References bytesPerCrystal, EB, getDccOverhead(), nEBDcc, and nRuPerDcc_.
Referenced by analyze().
00423 { 00424 double ruHeaderPayload = 0.; 00425 const int nEEDcc = 18; 00426 const int firstEbDcc0 = nEEDcc/2; 00427 for (int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 + nEBDcc; ++iDcc0 ) { 00428 ruHeaderPayload += nRuPerDcc_[iDcc0]*8.; 00429 } 00430 return getDccOverhead(EB)*nEBDcc + nReadXtals*bytesPerCrystal 00431 + ruHeaderPayload; 00432 }
Converts a std CMSSW crystal eta index to a c-array index (starting from zero and without hole).
Definition at line 112 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), and dccNum().
Converts a std CMSSW crystal phi index to a c-array index (starting from zero and without hole).
Definition at line 119 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), and dccNum().
Converts a std CMSSW crystal x or y index to a c-array index (starting from zero and without hole).
Definition at line 133 of file EBSelectiveReadoutTask.h.
EcalTrigTowerDetId EBSelectiveReadoutTask::readOutUnitOf | ( | const EBDetId & | xtalId | ) | const [private] |
Retrives the readout unit, a trigger tower in the barrel case, and a supercrystal in the endcap case, a given crystal belongs to.
xtalId | identifier of the crystal |
Definition at line 398 of file EBSelectiveReadoutTask.cc.
References EBDetId::tower().
Referenced by anaDigi().
00398 { 00399 return xtalId.tower(); 00400 }
Reset.
Definition at line 192 of file EBSelectiveReadoutTask.cc.
References EBDccEventSize_, EBEventSize_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, and MonitorElement::Reset().
Referenced by beginRun().
00192 { 00193 00194 if ( EBDccEventSize_ ) EBDccEventSize_->Reset(); 00195 00196 if ( EBReadoutUnitForcedBitMap_ ) EBReadoutUnitForcedBitMap_->Reset(); 00197 00198 if ( EBFullReadoutSRFlagMap_ ) EBFullReadoutSRFlagMap_->Reset(); 00199 00200 if ( EBHighInterestTriggerTowerFlagMap_ ) EBHighInterestTriggerTowerFlagMap_->Reset(); 00201 00202 if ( EBLowInterestTriggerTowerFlagMap_ ) EBLowInterestTriggerTowerFlagMap_->Reset(); 00203 00204 if ( EBEventSize_ ) EBEventSize_->Reset(); 00205 00206 if ( EBHighInterestPayload_ ) EBHighInterestPayload_->Reset(); 00207 00208 if ( EBLowInterestPayload_ ) EBLowInterestPayload_->Reset(); 00209 00210 }
Setup.
Definition at line 86 of file EBSelectiveReadoutTask.cc.
References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), dqmStore_, EBDccEventSize_, EBEventSize_, EBFullReadoutSRFlagMap_, EBHighInterestPayload_, EBHighInterestTriggerTowerFlagMap_, EBLowInterestPayload_, EBLowInterestTriggerTowerFlagMap_, EBReadoutUnitForcedBitMap_, histo, i, init_, prefixME_, Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and DQMStore::setCurrentFolder().
Referenced by analyze().
00086 { 00087 00088 init_ = true; 00089 00090 char histo[200]; 00091 00092 if ( dqmStore_ ) { 00093 dqmStore_->setCurrentFolder(prefixME_ + "/EBSelectiveReadoutTask"); 00094 00095 sprintf(histo, "EBSRT DCC event size"); 00096 EBDccEventSize_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 200., "s"); 00097 for (int i = 0; i < 36; i++) { 00098 EBDccEventSize_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1); 00099 } 00100 00101 sprintf(histo, "EBSRT readout unit with SR forced"); 00102 EBReadoutUnitForcedBitMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17); 00103 EBReadoutUnitForcedBitMap_->setAxisTitle("jphi", 1); 00104 EBReadoutUnitForcedBitMap_->setAxisTitle("jeta", 2); 00105 00106 sprintf(histo, "EBSRT full readout SR flags"); 00107 EBFullReadoutSRFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17); 00108 EBFullReadoutSRFlagMap_->setAxisTitle("jphi", 1); 00109 EBFullReadoutSRFlagMap_->setAxisTitle("jeta", 2); 00110 00111 sprintf(histo, "EBSRT high interest TT Flags"); 00112 EBHighInterestTriggerTowerFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17); 00113 EBHighInterestTriggerTowerFlagMap_->setAxisTitle("jphi", 1); 00114 EBHighInterestTriggerTowerFlagMap_->setAxisTitle("jeta", 2); 00115 00116 sprintf(histo, "EBSRT low interest TT Flags"); 00117 EBLowInterestTriggerTowerFlagMap_ = dqmStore_->book2D(histo, histo, 72, 0, 72, 34, -17, 17); 00118 EBLowInterestTriggerTowerFlagMap_->setAxisTitle("jphi", 1); 00119 EBLowInterestTriggerTowerFlagMap_->setAxisTitle("jeta", 2); 00120 00121 sprintf(histo, "EBSRT event size"); 00122 EBEventSize_ = dqmStore_->book1D(histo, histo, 100, 0, 200); 00123 EBEventSize_->setAxisTitle("event size (kB)",1); 00124 00125 sprintf(histo, "EBSRT high interest payload"); 00126 EBHighInterestPayload_ = dqmStore_->book1D(histo, histo, 100, 0, 200); 00127 EBHighInterestPayload_->setAxisTitle("event size (kB)",1); 00128 00129 sprintf(histo, "EBSRT low interest payload"); 00130 EBLowInterestPayload_ = dqmStore_->book1D(histo, histo, 100, 0, 200); 00131 EBLowInterestPayload_->setAxisTitle("event size (kB)",1); 00132 00133 } 00134 00135 }
const int EBSelectiveReadoutTask::bytesPerCrystal = 24 [static, protected] |
Number of bytes per crystal.
Definition at line 86 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), getDccEventSize(), and getEbEventSize().
DQMStore* EBSelectiveReadoutTask::dqmStore_ [private] |
Definition at line 233 of file EBSelectiveReadoutTask.h.
Referenced by beginJob(), cleanup(), EBSelectiveReadoutTask(), and setup().
Definition at line 248 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
Definition at line 241 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), and EBSelectiveReadoutTask().
Definition at line 253 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
Definition at line 250 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
Definition at line 254 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
Definition at line 251 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
Definition at line 255 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
Definition at line 252 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
Definition at line 249 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), reset(), and setup().
For book keeping of RU actually read out (not fully zero suppressed).
Definition at line 229 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), and anaDigiInit().
Definition at line 244 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), and EBSelectiveReadoutTask().
const int EBSelectiveReadoutTask::ebTtEdge = 5 [static, protected] |
Number of crystals along an EB TT.
Definition at line 74 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi().
Definition at line 243 of file EBSelectiveReadoutTask.h.
Definition at line 245 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), and EBSelectiveReadoutTask().
bool EBSelectiveReadoutTask::enableCleanup_ [private] |
Definition at line 237 of file EBSelectiveReadoutTask.h.
Referenced by EBSelectiveReadoutTask(), and endJob().
Definition at line 246 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), and EBSelectiveReadoutTask().
int EBSelectiveReadoutTask::ievt_ [private] |
Definition at line 231 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), beginJob(), and endJob().
bool EBSelectiveReadoutTask::init_ [private] |
Definition at line 257 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), cleanup(), EBSelectiveReadoutTask(), and setup().
const int EBSelectiveReadoutTask::kByte = 1024 [static, protected] |
bool EBSelectiveReadoutTask::mergeRuns_ [private] |
Definition at line 239 of file EBSelectiveReadoutTask.h.
Referenced by beginRun(), and EBSelectiveReadoutTask().
int EBSelectiveReadoutTask::nEb_ [private] |
ECAL barrel read channel count.
Definition at line 209 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
const int EBSelectiveReadoutTask::nEBDcc = 36 [static, protected] |
Definition at line 61 of file EBSelectiveReadoutTask.h.
Referenced by analyze(), and getEbEventSize().
const int EBSelectiveReadoutTask::nEbEta = 170 [static, protected] |
int EBSelectiveReadoutTask::nEbHI_ [private] |
ECAL barrel high interest read channel count.
Definition at line 217 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
int EBSelectiveReadoutTask::nEbLI_ [private] |
ECAL barrel low interest read channel count.
Definition at line 213 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), and analyze().
const int EBSelectiveReadoutTask::nEbPhi = 360 [static, protected] |
const int EBSelectiveReadoutTask::nEbRus = 36*68 [static, protected] |
const int EBSelectiveReadoutTask::nECALDcc = 54 [static, protected] |
int EBSelectiveReadoutTask::nPerDcc_[nECALDcc] [private] |
ECAL read channel count for each DCC:.
Definition at line 221 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), and anaDigiInit().
int EBSelectiveReadoutTask::nRuPerDcc_[nECALDcc] [private] |
Count for each DCC of RUs with at leat one channel read out:.
Definition at line 225 of file EBSelectiveReadoutTask.h.
Referenced by anaDigi(), anaDigiInit(), getDccEventSize(), and getEbEventSize().
const int EBSelectiveReadoutTask::nTtEta = 56 [static, protected] |
const int EBSelectiveReadoutTask::nTTEta = 34 [static, protected] |
const int EBSelectiveReadoutTask::nTtPhi = 72 [static, protected] |
const int EBSelectiveReadoutTask::nTTPhi = 72 [static, protected] |
Definition at line 59 of file EBSelectiveReadoutTask.h.
std::string EBSelectiveReadoutTask::prefixME_ [private] |
Definition at line 235 of file EBSelectiveReadoutTask.h.
Referenced by beginJob(), cleanup(), EBSelectiveReadoutTask(), and setup().
const int EBSelectiveReadoutTask::scEdge = 5 [static, protected] |
Number of crystals along a supercrystal edge.
Definition at line 77 of file EBSelectiveReadoutTask.h.