CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
ecaldqm::SelectiveReadoutClient Class Reference

#include <SelectiveReadoutClient.h>

Inheritance diagram for ecaldqm::SelectiveReadoutClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Member Functions

void producePlots (ProcessType) override
 
 SelectiveReadoutClient ()
 
 ~SelectiveReadoutClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerClient
void bookMEs (DQMStore::IBooker &) override
 
 DQWorkerClient ()
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void releaseMEs () override
 
void releaseSource ()
 
void resetMEs ()
 
bool retrieveSource (DQMStore::IGetter &, ProcessType)
 
bool runsOn (ProcessType _type) const
 
void setStatusManager (StatusManager const &_manager)
 
virtual ~DQWorkerClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQWorker ()
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
std::string const & getName () const
 
bool onlineMode () const
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setTime (time_t _t)
 
virtual ~DQWorker ()
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DQWorkerClient
enum  ProcessType { kLumi, kJob, nProcessType }
 
enum  Quality {
  kBad = 0, kGood = 1, kUnknown = 2, kMBad = 3,
  kMGood = 4, kMUnknown = 5
}
 
- Static Public Member Functions inherited from ecaldqm::DQWorkerClient
static void fillDescriptions (edm::ParameterSetDescription &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void fillDescriptions (edm::ParameterSetDescription &_desc)
 
- Protected Member Functions inherited from ecaldqm::DQWorkerClient
void setME (edm::ParameterSet const &_ps) final
 
void setSource (edm::ParameterSet const &) override
 
void towerAverage_ (MESet &, MESet const &, float)
 
bool using_ (std::string const &_name, ProcessType _type=kJob) const
 
- Protected Member Functions inherited from ecaldqm::DQWorker
void initialize (std::string const &_name, edm::ParameterSet const &)
 
void print_ (std::string const &, int=0) const
 
virtual void setParams (edm::ParameterSet const &)
 
void setVerbosity (int _verbosity)
 
- Protected Attributes inherited from ecaldqm::DQWorkerClient
bool hasLumiPlots_
 
std::set< std::string > qualitySummaries_
 
MESetCollection sources_
 
StatusManager const * statusManager_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Detailed Description

Definition at line 8 of file SelectiveReadoutClient.h.

Constructor & Destructor Documentation

ecaldqm::SelectiveReadoutClient::SelectiveReadoutClient ( )

Definition at line 9 of file SelectiveReadoutClient.cc.

9  :
11  {
12  }
ecaldqm::SelectiveReadoutClient::~SelectiveReadoutClient ( )
inline

Definition at line 11 of file SelectiveReadoutClient.h.

11 {}

Member Function Documentation

void ecaldqm::SelectiveReadoutClient::producePlots ( ProcessType  )
overridevirtual

Implements ecaldqm::DQWorkerClient.

Definition at line 15 of file SelectiveReadoutClient.cc.

References EcalTrigTowerDetId::detIdFromDenseIndex(), ecaldqm::MESet::ConstBin::getBinContent(), EcalTrigTowerDetId::kSizeForDenseIndexing, ecaldqm::DQWorker::MEs_, ecaldqm::MESet::Bin::setBinContent(), ecaldqm::DQWorkerClient::sources_, ecaldqm::MESet::const_iterator::toNextChannel(), and pileupDistInMC::total.

16  {
17  MESet& meFRDropped(MEs_.at("FRDropped"));
18  MESet& meZSReadout(MEs_.at("ZSReadout"));
19  MESet& meFR(MEs_.at("FR"));
20  MESet& meRUForced(MEs_.at("RUForced"));
21  MESet& meZS1(MEs_.at("ZS1"));
22  MESet& meHighInterest(MEs_.at("HighInterest"));
23  MESet& meMedInterest(MEs_.at("MedInterest"));
24  MESet& meLowInterest(MEs_.at("LowInterest"));
25 
26  MESet const& sFlagCounterMap(sources_.at("FlagCounterMap"));
27  MESet const& sRUForcedMap(sources_.at("RUForcedMap"));
28  MESet const& sFullReadoutMap(sources_.at("FullReadoutMap"));
29  MESet const& sZS1Map(sources_.at("ZS1Map"));
30  MESet const& sZSMap(sources_.at("ZSMap"));
31  MESet const& sZSFullReadoutMap(sources_.at("ZSFullReadoutMap"));
32  MESet const& sFRDroppedMap(sources_.at("FRDroppedMap"));
33  MESet const& sHighIntMap(sources_.at("HighIntMap"));
34  MESet const& sMedIntMap(sources_.at("MedIntMap"));
35  MESet const& sLowIntMap(sources_.at("LowIntMap"));
36 
37  MESet::const_iterator ruItr(sRUForcedMap);
38  MESet::const_iterator frItr(sFullReadoutMap);
39  MESet::const_iterator zs1Itr(sZS1Map);
40  MESet::const_iterator zsItr(sZSMap);
41  MESet::const_iterator zsfrItr(sZSFullReadoutMap);
42  MESet::const_iterator frdItr(sFRDroppedMap);
43 
44  MESet::iterator frdRateItr(meFRDropped);
45  MESet::iterator zsrRateItr(meZSReadout);
46  MESet::iterator frRateItr(meFR);
47  MESet::iterator ruRateItr(meRUForced);
48  MESet::iterator zs1RateItr(meZS1);
49 
50  MESet::const_iterator cEnd(sFlagCounterMap.end());
51  for(MESet::const_iterator cItr(sFlagCounterMap.beginChannel()); cItr != cEnd; cItr.toNextChannel()){
52 
53  ruItr = cItr;
54  frItr = cItr;
55  zs1Itr = cItr;
56  zsItr = cItr;
57  zsfrItr = cItr;
58  frdItr = cItr;
59 
60  frdRateItr = cItr;
61  zsrRateItr = cItr;
62  frRateItr = cItr;
63  ruRateItr = cItr;
64  zs1RateItr = cItr;
65 
66  float nFlags(cItr->getBinContent());
67  float nZS12Flags(zsItr->getBinContent());
68  float nFullReadoutFlags(frItr->getBinContent());
69 
70  if(nFlags > 0.){
71  frRateItr->setBinContent(nFullReadoutFlags / nFlags);
72  zs1RateItr->setBinContent(zs1Itr->getBinContent() / nFlags);
73  ruRateItr->setBinContent(ruItr->getBinContent() / nFlags);
74  }
75  if(nZS12Flags > 0.)
76  zsrRateItr->setBinContent(zsfrItr->getBinContent() / nZS12Flags);
77  if(nFullReadoutFlags > 0.)
78  frdRateItr->setBinContent(frdItr->getBinContent() / nFullReadoutFlags);
79 
80  }
81 
82  // iterator not supported for kTriggerTower binning yet
83  for(unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; ++iTT){
85 
86  float nHigh(sHighIntMap.getBinContent(id));
87  float nMed(sMedIntMap.getBinContent(id));
88  float nLow(sLowIntMap.getBinContent(id));
89  float total(nHigh + nMed + nLow);
90 
91  if(total > 0.){
92  meHighInterest.setBinContent(id, nHigh / total);
93  meMedInterest.setBinContent(id, nMed / total);
94  meLowInterest.setBinContent(id, nLow / total);
95  }
96  }
97  }
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
MESetCollection sources_
MESetCollection MEs_
Definition: DQWorker.h:75