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::TrigPrimClient Class Reference

#include <TrigPrimClient.h>

Inheritance diagram for ecaldqm::TrigPrimClient:
ecaldqm::DQWorkerClient ecaldqm::DQWorker

Public Types

enum  MESets { kTimingSummary, kNonSingleSummary, kEmulQualitySummary, nMESets }
 
enum  Sources {
  sEtRealMap, sEtEmulError, sTimingError, sMatchedIndex,
  nSources
}
 
- Public Types inherited from ecaldqm::DQWorkerClient
enum  Sources { nSources }
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

void bookMEs () override
 
void producePlots () override
 
 TrigPrimClient (const edm::ParameterSet &, const edm::ParameterSet &)
 
 ~TrigPrimClient ()
 
- 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 &)
 
 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 TrigPrimClient.h.

Member Enumeration Documentation

Enumerator
kTimingSummary 
kNonSingleSummary 
kEmulQualitySummary 
nMESets 

Definition at line 17 of file TrigPrimClient.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file TrigPrimClient.cc.

References edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::TrigPrimTask::kEtEmulError, ecaldqm::TrigPrimTask::kEtRealMap, ecaldqm::TrigPrimTask::kMatchedIndex, ecaldqm::TrigPrimTask::kTimingError, sEtEmulError, sEtRealMap, sMatchedIndex, ecaldqm::DQWorkerClient::source_(), and sTimingError.

11  :
12  DQWorkerClient(_params, _paths, "TrigPrimClient")
13  {
14  edm::ParameterSet const& sources(_params.getUntrackedParameterSet("sources"));
15  source_(sEtRealMap, "TrigPrimTask", TrigPrimTask::kEtRealMap, sources);
16  source_(sEtEmulError, "TrigPrimTask", TrigPrimTask::kEtEmulError, sources);
17  source_(sTimingError, "TrigPrimTask", TrigPrimTask::kTimingError, sources);
18  source_(sMatchedIndex, "TrigPrimTask", TrigPrimTask::kMatchedIndex, sources);
19  }
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
void source_(unsigned, std::string const &, unsigned, edm::ParameterSet const &)
DQWorkerClient(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
ecaldqm::TrigPrimClient::~TrigPrimClient ( )
inline

Definition at line 11 of file TrigPrimClient.h.

11 {}

Member Function Documentation

void ecaldqm::TrigPrimClient::bookMEs ( )
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 22 of file TrigPrimClient.cc.

References ecaldqm::DQWorker::bookMEs(), kEmulQualitySummary, and ecaldqm::DQWorker::MEs_.

23  {
25 
26  MEs_[kEmulQualitySummary]->resetAll(-1.);
27  }
virtual void bookMEs()
Definition: DQWorker.cc:48
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
void ecaldqm::TrigPrimClient::producePlots ( )
overridevirtual

Implements ecaldqm::DQWorkerClient.

Definition at line 30 of file TrigPrimClient.cc.

References EcalTrigTowerDetId::detIdFromDenseIndex(), python.tagInventory::entries, ecaldqm::DQWorkerClient::fillQuality_(), kEmulQualitySummary, kNonSingleSummary, EcalTrigTowerDetId::kSizeForDenseIndexing, kTimingSummary, ecaldqm::DQWorker::MEs_, EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING, sEtEmulError, sMatchedIndex, ecaldqm::DQWorkerClient::sources_, and sTimingError.

31  {
32  // MEs_[kTiming]->reset();
33  MEs_[kTimingSummary]->reset();
34  MEs_[kNonSingleSummary]->reset();
35 
37 
38  for(unsigned iTT(0); iTT < EcalTrigTowerDetId::kSizeForDenseIndexing; iTT++){
40 
41  float towerEntries(0.);
42  float tMax(0.5);
43  float nMax(0.);
44  for(int iBin(0); iBin < 6; iBin++){
45  float entries(sources_[sMatchedIndex]->getBinEntries(ttid, iBin + 1));
46  towerEntries += entries;
47 
48  if(entries > nMax){
49  nMax = entries;
50  tMax = iBin == 0 ? -0.5 : iBin + 0.5; // historical reasons.. much clearer to say "no entry = -0.5"
51  }
52  }
53 
54  // MEs_[kTiming]->setBinContent(ttid, tMax);
55  MEs_[kTimingSummary]->setBinContent(ttid, tMax);
56 
57  if(towerEntries < 1.){
58  fillQuality_(kEmulQualitySummary, ttid, mask, 2.);
59  continue;
60  }
61 
62  float nonsingleFraction(1. - nMax / towerEntries);
63 
64  if(nonsingleFraction > 0.)
65  MEs_[kNonSingleSummary]->setBinContent(ttid, nonsingleFraction);
66 
67  float quality(sources_[sEtEmulError]->getBinContent(ttid) > 0. || sources_[sTimingError]->getBinContent(ttid) > 0. ? 0. : 1.);
68  fillQuality_(kEmulQualitySummary, ttid, mask, quality);
69  }
70  }
static EcalTrigTowerDetId detIdFromDenseIndex(uint32_t di)
static const int PHYSICS_BAD_CHANNEL_WARNING
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
std::vector< MESet const * > sources_
void fillQuality_(unsigned, DetId const &, uint32_t, float)
void ecaldqm::TrigPrimClient::setMEData ( std::vector< MEData > &  _data)
static