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 | Static Public Attributes | Protected Member Functions | Protected Attributes
ecaldqm::DQWorker Class Reference

#include <DQWorker.h>

Inheritance diagram for ecaldqm::DQWorker:
ecaldqm::DQWorkerClient ecaldqm::DQWorkerTask ecaldqm::CertificationClient ecaldqm::IntegrityClient ecaldqm::LaserClient ecaldqm::OccupancyClient ecaldqm::PresampleClient ecaldqm::RawDataClient ecaldqm::SelectiveReadoutClient ecaldqm::SummaryClient ecaldqm::TimingClient ecaldqm::TrigPrimClient ecaldqm::ClusterTask ecaldqm::EnergyTask ecaldqm::IntegrityTask ecaldqm::LaserTask ecaldqm::LedTask ecaldqm::OccupancyTask ecaldqm::PedestalTask ecaldqm::PNIntegrityTask ecaldqm::PNPresampleTask ecaldqm::PresampleTask ecaldqm::RawDataTask ecaldqm::SelectiveReadoutTask ecaldqm::TestPulseTask ecaldqm::TimingTask ecaldqm::TowerStatusTask ecaldqm::TrigPrimTask

Public Types

enum  MESets { nMESets }
 

Public Member Functions

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 endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 
const std::vector< MESet * > & getMEs ()
 
virtual std::string const & getName ()
 
virtual bool isInitialized ()
 
virtual void reset ()
 
virtual void setInitialized (bool _init)
 
virtual void setVerbosity (int _verbosity)
 
virtual ~DQWorker ()
 

Static Public Member Functions

static void setMEData (std::vector< MEData > &)
 

Static Public Attributes

static std::map< std::string,
std::vector< MEData > > 
meData
 

Protected Member Functions

MESetcreateMESet_ (std::string const &, MEData const &, bool _readOnly=false) const
 
void meSet_ (unsigned, edm::ParameterSet const &)
 

Protected Attributes

bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Detailed Description

Definition at line 22 of file DQWorker.h.

Member Enumeration Documentation

Enumerator
nMESets 

Definition at line 43 of file DQWorker.h.

43  {
44  nMESets
45  };

Constructor & Destructor Documentation

ecaldqm::DQWorker::DQWorker ( const edm::ParameterSet ,
const edm::ParameterSet _paths,
std::string const &  _name 
)

Definition at line 18 of file DQWorker.cc.

References asciidump::at, createMESet_(), data, edm::ParameterSet::getUntrackedParameter(), meData, MEs_, name_, and ecaldqm::MEData::pathName.

18  :
19  name_(_name),
20  MEs_(0),
21  initialized_(false),
22  verbosity_(0)
23  {
24  using namespace std;
25 
26  map<string, vector<MEData> >::iterator dItr(meData.find(name_));
27  if(dItr == meData.end())
28  throw cms::Exception("InvalidCall") << "MonitorElement setup data not found for " << name_ << std::endl;
29 
30  vector<MEData> const& vData(dItr->second);
31  MEs_.resize(vData.size());
32 
33  for(unsigned iME(0); iME < MEs_.size(); iME++){
34  MEData& data(meData[name_].at(iME));
35  string fullpath(_paths.getUntrackedParameter<string>(data.pathName));
36 
37  MEs_.at(iME) = createMESet_(fullpath, data);
38  }
39  }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
MESet * createMESet_(std::string const &, MEData const &, bool _readOnly=false) const
Definition: DQWorker.cc:70
std::string name_
Definition: DQWorker.h:55
list at
Definition: asciidump.py:428
static std::map< std::string, std::vector< MEData > > meData
Definition: DQWorker.h:47
ecaldqm::DQWorker::~DQWorker ( )
virtual

Definition at line 41 of file DQWorker.cc.

References MEs_.

42  {
43  for(unsigned iME(0); iME < MEs_.size(); iME++)
44  delete MEs_[iME];
45  }
std::vector< MESet * > MEs_
Definition: DQWorker.h:56

Member Function Documentation

virtual void ecaldqm::DQWorker::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
inlinevirtual

Reimplemented in ecaldqm::IntegrityTask, ecaldqm::RawDataTask, and ecaldqm::TowerStatusTask.

Definition at line 30 of file DQWorker.h.

Referenced by EcalDQMonitorTask::beginLuminosityBlock().

30 {};
virtual void ecaldqm::DQWorker::beginRun ( const edm::Run ,
const edm::EventSetup  
)
inlinevirtual
void ecaldqm::DQWorker::bookMEs ( )
virtual
MESet * ecaldqm::DQWorker::createMESet_ ( std::string const &  _fullpath,
MEData const &  _data,
bool  _readOnly = false 
) const
protected

Definition at line 70 of file DQWorker.cc.

References ecaldqm::MEData::btype, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, edm::hlt::Exception, EcalDQMBinningService::kChannel, ecaldqm::MEData::kind, EcalDQMBinningService::kReport, EcalDQMBinningService::kTrend, EcalDQMBinningService::kUser, EcalDQMBinningService::nObjType, ecaldqm::MEData::otype, and ecaldqm::MEData::yaxis.

Referenced by DQWorker(), and ecaldqm::DQWorkerClient::source_().

71  {
72  BinService::ObjectType otype(_data.otype);
73  BinService::BinningType btype(_data.btype);
74  MonitorElement::Kind kind(_data.kind);
75 
76  if(otype == BinService::nObjType)
77  return new MESetNonObject(_fullpath, _data, _readOnly);
78 
79  if(otype == BinService::kChannel)
80  return new MESetChannel(_fullpath, _data, _readOnly);
81 
82  if(btype == BinService::kTrend)
83  return new MESetTrend(_fullpath, _data, _readOnly);
84 
85  unsigned logicalDimensions;
86  switch(kind){
88  logicalDimensions = 0;
89  break;
92  logicalDimensions = 1;
93  break;
96  logicalDimensions = 2;
97  break;
98  default:
99  throw cms::Exception("InvalidCall") << "Histogram type " << kind << " not supported" << std::endl;
100  }
101 
102  // example case: Ecal/TriggerPrimitives/EmulMatching/TrigPrimTask matching index
103  if(logicalDimensions == 2 && _data.yaxis && btype != BinService::kUser) logicalDimensions = 1;
104 
105  // for EventInfo summary contents
106  if(btype == BinService::kReport){
107  if(logicalDimensions != 0)
108  throw cms::Exception("InvalidCall") << "Report can only be a DQM_KIND_REAL" << std::endl;
109  }
110 
111  if(btype == BinService::kUser)
112  return new MESetEcal(_fullpath, _data, logicalDimensions, _readOnly);
113 
114  if(logicalDimensions == 0)
115  return new MESetDet0D(_fullpath, _data, _readOnly);
116 
117  if(logicalDimensions == 1)
118  return new MESetDet1D(_fullpath, _data, _readOnly);
119 
120  if(logicalDimensions == 2)
121  return new MESetDet2D(_fullpath, _data, _readOnly);
122 
123  return 0;
124  }
virtual void ecaldqm::DQWorker::endLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
inlinevirtual

Reimplemented in ecaldqm::TowerStatusTask, and ecaldqm::DQWorkerClient.

Definition at line 31 of file DQWorker.h.

Referenced by EcalDQMonitorTask::endLuminosityBlock().

31 {};
virtual void ecaldqm::DQWorker::endRun ( const edm::Run ,
const edm::EventSetup  
)
inlinevirtual

Reimplemented in ecaldqm::TowerStatusTask.

Definition at line 28 of file DQWorker.h.

Referenced by EcalDQMonitorTask::endRun().

28 {};
const std::vector<MESet*>& ecaldqm::DQWorker::getMEs ( )
inline

Definition at line 41 of file DQWorker.h.

References MEs_.

41 { return MEs_; }
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
virtual std::string const& ecaldqm::DQWorker::getName ( )
inlinevirtual
virtual bool ecaldqm::DQWorker::isInitialized ( )
inlinevirtual
void ecaldqm::DQWorker::meSet_ ( unsigned  ,
edm::ParameterSet const &   
)
protected
void ecaldqm::DQWorker::reset ( void  )
virtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 55 of file DQWorker.cc.

References initialized_, and MEs_.

Referenced by EcalDQMonitorTask::beginRun(), and ecaldqm::DQWorkerClient::reset().

56  {
57  for(unsigned iME(0); iME < MEs_.size(); iME++)
58  if(MEs_[iME]) MEs_[iME]->clear();
59 
60  initialized_ = false;
61  }
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
virtual void ecaldqm::DQWorker::setInitialized ( bool  _init)
inlinevirtual

Definition at line 38 of file DQWorker.h.

References initialized_.

Referenced by EcalDQMonitorTask::analyze().

38 { initialized_ = _init; }
void ecaldqm::DQWorker::setMEData ( std::vector< MEData > &  )
static

Definition at line 65 of file DQWorker.cc.

66  {
67  }
virtual void ecaldqm::DQWorker::setVerbosity ( int  _verbosity)
inlinevirtual

Definition at line 39 of file DQWorker.h.

References verbosity_.

Referenced by EcalDQMonitorClient::EcalDQMonitorClient(), and EcalDQMonitorTask::EcalDQMonitorTask().

39 { verbosity_ = _verbosity; }

Member Data Documentation

bool ecaldqm::DQWorker::initialized_
protected
std::map< std::string, std::vector< MEData > > ecaldqm::DQWorker::meData
static
std::vector<MESet*> ecaldqm::DQWorker::MEs_
protected

Definition at line 56 of file DQWorker.h.

Referenced by ecaldqm::IntegrityTask::beginLuminosityBlock(), ecaldqm::RawDataTask::beginLuminosityBlock(), ecaldqm::TowerStatusTask::beginRun(), ecaldqm::CertificationClient::beginRun(), ecaldqm::SummaryClient::beginRun(), ecaldqm::LaserClient::beginRun(), ecaldqm::CertificationClient::bookMEs(), ecaldqm::IntegrityClient::bookMEs(), ecaldqm::TimingClient::bookMEs(), ecaldqm::TrigPrimClient::bookMEs(), ecaldqm::PresampleClient::bookMEs(), ecaldqm::RawDataClient::bookMEs(), ecaldqm::PedestalTask::bookMEs(), ecaldqm::LaserClient::bookMEs(), ecaldqm::RawDataTask::bookMEs(), ecaldqm::IntegrityTask::bookMEs(), ecaldqm::TestPulseTask::bookMEs(), ecaldqm::TrigPrimTask::bookMEs(), ecaldqm::OccupancyClient::bookMEs(), ecaldqm::LedTask::bookMEs(), ecaldqm::LaserTask::bookMEs(), ecaldqm::ClusterTask::bookMEs(), bookMEs(), DQWorker(), ecaldqm::EnergyTask::EnergyTask(), ecaldqm::DQWorkerClient::fillQuality_(), getMEs(), ecaldqm::IntegrityTask::IntegrityTask(), ecaldqm::LaserClient::LaserClient(), ecaldqm::LaserTask::LaserTask(), ecaldqm::LedTask::LedTask(), ecaldqm::PedestalTask::PedestalTask(), ecaldqm::SelectiveReadoutClient::producePlots(), ecaldqm::TrigPrimClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::PresampleClient::producePlots(), ecaldqm::SummaryClient::producePlots(), ecaldqm::CertificationClient::producePlots(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::LaserClient::producePlots(), ecaldqm::RawDataTask::RawDataTask(), reset(), ecaldqm::ClusterTask::runOnBasicClusters(), ecaldqm::PresampleTask::runOnDigis(), ecaldqm::OccupancyTask::runOnDigis(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnEBSrFlags(), ecaldqm::SelectiveReadoutTask::runOnEESrFlags(), ecaldqm::TrigPrimTask::runOnEmulTPs(), ecaldqm::PNIntegrityTask::runOnErrors(), ecaldqm::IntegrityTask::runOnErrors(), ecaldqm::PedestalTask::runOnPnDigis(), ecaldqm::PNPresampleTask::runOnPnDigis(), ecaldqm::TestPulseTask::runOnPnDigis(), ecaldqm::LedTask::runOnPnDigis(), ecaldqm::LaserTask::runOnPnDigis(), ecaldqm::RawDataTask::runOnRawData(), ecaldqm::TrigPrimTask::runOnRealTPs(), ecaldqm::TimingTask::runOnRecHits(), ecaldqm::OccupancyTask::runOnRecHits(), ecaldqm::EnergyTask::runOnRecHits(), ecaldqm::RawDataTask::runOnSource(), ecaldqm::SelectiveReadoutTask::runOnSource(), ecaldqm::SelectiveReadoutTask::runOnSrFlag_(), ecaldqm::ClusterTask::runOnSuperClusters(), ecaldqm::TowerStatusTask::runOnTowerStatus(), ecaldqm::OccupancyTask::runOnTPDigis(), ecaldqm::TestPulseTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::TestPulseTask::TestPulseTask(), and ~DQWorker().

std::string ecaldqm::DQWorker::name_
protected
int ecaldqm::DQWorker::verbosity_
protected

Definition at line 59 of file DQWorker.h.

Referenced by setVerbosity().