CMS 3D CMS Logo

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

#include <SelectiveReadoutClient.h>

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

Public Types

enum  MESets {
  kFRDropped, kZSReadout, kFR, kRUForced,
  kZS1, nMESets
}
 
enum  Sources {
  sFlagCounterMap, sRUForcedMap, sFullReadoutMap, sZS1Map,
  sZSMap, sZSFullReadoutMap, sFRDroppedMap, nSources
}
 
- Public Types inherited from ecaldqm::DQWorkerClient
enum  Sources { nSources }
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

void producePlots ()
 
 SelectiveReadoutClient (const edm::ParameterSet &, const edm::ParameterSet &)
 
 ~SelectiveReadoutClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerClient
 DQWorkerClient (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void initialize ()
 
void reset ()
 
virtual ~DQWorkerClient ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void bookMEs ()
 
 DQWorker (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
const std::vector< MESet * > & getMEs ()
 
virtual std::string const & getName ()
 
virtual bool isInitialized ()
 
virtual void setInitialized (bool _init)
 
virtual void setVerbosity (int _verbosity)
 
virtual ~DQWorker ()
 

Static Public Member Functions

static void setMEData (std::vector< MEData > &)
 
- Static Public Member Functions inherited from ecaldqm::DQWorker
static void setMEData (std::vector< MEData > &)
 

Additional Inherited Members

- Static Public Attributes inherited from ecaldqm::DQWorkerClient
static EcalDQMChannelStatus const * channelStatus
 
static EcalDQMTowerStatus const * towerStatus
 
- Static Public Attributes inherited from ecaldqm::DQWorker
static std::map< std::string,
std::vector< MEData > > 
meData
 
- Protected Member Functions inherited from ecaldqm::DQWorkerClient
void fillQuality_ (unsigned, DetId const &, uint32_t, float)
 
void source_ (unsigned, std::string const &, unsigned, edm::ParameterSet const &)
 
- Protected Member Functions inherited from ecaldqm::DQWorker
MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
 
void meSet_ (unsigned, edm::ParameterSet const &)
 
- Protected Attributes inherited from ecaldqm::DQWorkerClient
std::vector< MESet const * > sources_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Detailed Description

Definition at line 8 of file SelectiveReadoutClient.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

ecaldqm::SelectiveReadoutClient::SelectiveReadoutClient ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 11 of file SelectiveReadoutClient.cc.

References edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::SelectiveReadoutTask::kFlagCounterMap, ecaldqm::SelectiveReadoutTask::kFRDroppedMap, ecaldqm::SelectiveReadoutTask::kFullReadoutMap, ecaldqm::SelectiveReadoutTask::kRUForcedMap, ecaldqm::SelectiveReadoutTask::kZS1Map, ecaldqm::SelectiveReadoutTask::kZSFullReadoutMap, ecaldqm::SelectiveReadoutTask::kZSMap, sFlagCounterMap, sFRDroppedMap, sFullReadoutMap, ecaldqm::DQWorkerClient::source_(), sRUForcedMap, sZS1Map, sZSFullReadoutMap, and sZSMap.

11  :
12  DQWorkerClient(_params, _paths, "SelectiveReadoutClient")
13  {
14  edm::ParameterSet const& sources(_params.getUntrackedParameterSet("sources"));
15  source_(sFlagCounterMap, "SelectiveReadoutTask", SelectiveReadoutTask::kFlagCounterMap, sources);
16  source_(sRUForcedMap, "SelectiveReadoutTask", SelectiveReadoutTask::kRUForcedMap, sources);
17  source_(sFullReadoutMap, "SelectiveReadoutTask", SelectiveReadoutTask::kFullReadoutMap, sources);
18  source_(sZS1Map, "SelectiveReadoutTask", SelectiveReadoutTask::kZS1Map, sources);
19  source_(sZSMap, "SelectiveReadoutTask", SelectiveReadoutTask::kZSMap, sources);
20  source_(sZSFullReadoutMap, "SelectiveReadoutTask", SelectiveReadoutTask::kZSFullReadoutMap, sources);
21  source_(sFRDroppedMap, "SelectiveReadoutTask", SelectiveReadoutTask::kFRDroppedMap, sources);
22  }
void source_(unsigned, std::string const &, unsigned, edm::ParameterSet const &)
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
DQWorkerClient(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
ecaldqm::SelectiveReadoutClient::~SelectiveReadoutClient ( )
inline

Definition at line 11 of file SelectiveReadoutClient.h.

11 {}

Member Function Documentation

void ecaldqm::SelectiveReadoutClient::producePlots ( )
virtual

Implements ecaldqm::DQWorkerClient.

Definition at line 25 of file SelectiveReadoutClient.cc.

References ecaldqm::getElectronicsMap(), ecaldqm::getNSuperCrystals(), kFR, kFRDropped, kRUForced, kZS1, kZSReadout, ecaldqm::DQWorker::MEs_, sFlagCounterMap, sFRDroppedMap, sFullReadoutMap, ecaldqm::DQWorkerClient::sources_, sRUForcedMap, sZS1Map, sZSFullReadoutMap, and sZSMap.

26  {
27  using namespace std;
28 
29  MEs_[kFRDropped]->reset();
30  MEs_[kZSReadout]->reset();
31  MEs_[kFR]->reset();
32  MEs_[kRUForced]->reset();
33  MEs_[kZS1]->reset();
34 
35  for(unsigned dccid(1); dccid <= 54; dccid++){
36 
37  for(unsigned tower(1); tower <= getNSuperCrystals(dccid); tower++){
38  vector<DetId> ids(getElectronicsMap()->dccTowerConstituents(dccid, tower));
39 
40  if(ids.size() == 0) continue;
41 
42  float nFlags(0.);
43  float nRUForced(0.);
44  float nFullReadoutFlags(0.);
45  float nZS1Flags(0.);
46  float nZS12Flags(0.);
47  float nZSFullReadout(0.);
48  float nFRDropped(0.);
49  if(dccid <= 9 || dccid >= 46){
50  vector<EcalScDetId> scids(getElectronicsMap()->getEcalScDetId(dccid, tower));
51  for(vector<EcalScDetId>::iterator scItr(scids.begin()); scItr != scids.end(); ++scItr){
52  nFlags += sources_[sFlagCounterMap]->getBinContent(*scItr);
53  nRUForced += sources_[sRUForcedMap]->getBinContent(*scItr);
54  nFullReadoutFlags += sources_[sFullReadoutMap]->getBinContent(*scItr);
55  nZS1Flags += sources_[sZS1Map]->getBinContent(*scItr);
56  nZS12Flags += sources_[sZSMap]->getBinContent(*scItr);
57  nZSFullReadout += sources_[sZSFullReadoutMap]->getBinContent(*scItr);
58  nFRDropped += sources_[sFRDroppedMap]->getBinContent(*scItr);
59  }
60 
61  for(vector<EcalScDetId>::iterator scItr(scids.begin()); scItr != scids.end(); ++scItr){
62  if(nFlags > 0.) MEs_[kFR]->setBinContent(*scItr, nFullReadoutFlags / nFlags);
63  if(nFlags > 0.) MEs_[kZS1]->setBinContent(*scItr, nZS1Flags / nFlags);
64  if(nFlags > 0.) MEs_[kRUForced]->setBinContent(*scItr, nRUForced / nFlags);
65  if(nZS12Flags > 0.) MEs_[kZSReadout]->setBinContent(*scItr, nZSFullReadout / nZS12Flags);
66  if(nFullReadoutFlags > 0.) MEs_[kFRDropped]->setBinContent(*scItr, nFRDropped / nFullReadoutFlags);
67  }
68  }
69  else{
70  nFlags = sources_[sFlagCounterMap]->getBinContent(ids[0]);
71  nRUForced = sources_[sRUForcedMap]->getBinContent(ids[0]);
72  nFullReadoutFlags = sources_[sFullReadoutMap]->getBinContent(ids[0]);
73  nZS1Flags = sources_[sZS1Map]->getBinContent(ids[0]);
74  nZS12Flags = sources_[sZSMap]->getBinContent(ids[0]);
75  nZSFullReadout = sources_[sZSFullReadoutMap]->getBinContent(ids[0]);
76  nFRDropped = sources_[sFRDroppedMap]->getBinContent(ids[0]);
77 
78 
79  if(nFlags > 0.) MEs_[kFR]->setBinContent(ids[0], nFullReadoutFlags / nFlags);
80  if(nFlags > 0.) MEs_[kZS1]->setBinContent(ids[0], nZS1Flags / nFlags);
81  if(nFlags > 0.) MEs_[kRUForced]->setBinContent(ids[0], nRUForced / nFlags);
82  if(nZS12Flags > 0.) MEs_[kZSReadout]->setBinContent(ids[0], nZSFullReadout / nZS12Flags);
83  if(nFullReadoutFlags > 0.) MEs_[kFRDropped]->setBinContent(ids[0], nFRDropped / nFullReadoutFlags);
84  }
85  }
86  }
87  }
const EcalElectronicsMapping * getElectronicsMap()
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
unsigned getNSuperCrystals(unsigned)
std::vector< MESet const * > sources_
void ecaldqm::SelectiveReadoutClient::setMEData ( std::vector< MEData > &  _data)
static