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 | Private Attributes
ecaldqm::IntegrityTask Class Reference

#include <IntegrityTask.h>

Inheritance diagram for ecaldqm::IntegrityTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

Public Types

enum  MESets {
  kByLumi, kTotal, kGain, kChId,
  kGainSwitch, kBlockSize, kTowerId, kFEDNonFatal,
  nMESets
}
 
- Public Types inherited from ecaldqm::DQWorker
enum  MESets { nMESets }
 

Public Member Functions

void analyze (const void *, Collections) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void bookMEs () override
 
 IntegrityTask (const edm::ParameterSet &, const edm::ParameterSet &)
 
void runOnErrors (const DetIdCollection &, Collections)
 
void runOnErrors (const EcalElectronicsIdCollection &, Collections)
 
 ~IntegrityTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
virtual void beginEvent (const edm::Event &, const edm::EventSetup &)
 
 DQWorkerTask (const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
 
virtual void endEvent (const edm::Event &, const edm::EventSetup &)
 
virtual bool filterRunType (const std::vector< short > &)
 
virtual bool filterTrigger (const edm::TriggerResultsByName &)
 
virtual const std::vector
< std::pair< Collections,
Collections > > & 
getDependencies ()
 
virtual bool runsOn (unsigned)
 
virtual ~DQWorkerTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
 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 Member Functions inherited from ecaldqm::DQWorker
static void setMEData (std::vector< MEData > &)
 

Private Attributes

std::string hltTaskFolder_
 
int hltTaskMode_
 

Additional Inherited Members

- Static Public Attributes inherited from ecaldqm::DQWorker
static std::map< std::string,
std::vector< MEData > > 
meData
 
- 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::DQWorkerTask
uint32_t collectionMask_
 
std::vector< std::pair
< Collections, Collections > > 
dependencies_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool initialized_
 
std::vector< MESet * > MEs_
 
std::string name_
 
int verbosity_
 

Detailed Description

Definition at line 11 of file IntegrityTask.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 7 of file IntegrityTask.cc.

References ecaldqm::DQWorkerTask::collectionMask_, edm::ParameterSet::getUntrackedParameterSet(), hltTaskFolder_, hltTaskMode_, ecaldqm::kBlockSizeErrors, ecaldqm::kChIdErrors, kFEDNonFatal, ecaldqm::kGainErrors, ecaldqm::kGainSwitchErrors, ecaldqm::kLumiSection, ecaldqm::kTowerIdErrors, ecaldqm::DQWorker::MEs_, getHLTPrescaleColumns::path, and AlCaHLTBitMon_QueryRunRegistry::string.

7  :
8  DQWorkerTask(_params, _paths, "IntegrityTask"),
9  hltTaskMode_(0),
10  hltTaskFolder_("")
11  {
13  (0x1 << kLumiSection) |
14  (0x1 << kGainErrors) |
15  (0x1 << kChIdErrors) |
16  (0x1 << kGainSwitchErrors) |
17  (0x1 << kTowerIdErrors) |
18  (0x1 << kBlockSizeErrors);
19 
20  edm::ParameterSet const& commonParams(_params.getUntrackedParameterSet("Common"));
21 
22  hltTaskMode_ = commonParams.getUntrackedParameter<int>("hltTaskMode");
23  hltTaskFolder_ = commonParams.getUntrackedParameter<std::string>("hltTaskFolder");
24 
25  if(hltTaskMode_ != 0 && hltTaskFolder_.size() == 0)
26  throw cms::Exception("InvalidConfiguration") << "HLTTask mode needs a folder name";
27 
28  if(hltTaskMode_ != 0){
30  std::map<std::string, std::string> replacements;
31  replacements["hlttask"] = hltTaskFolder_;
32 
33  MEs_[kFEDNonFatal]->name(replacements);
34  }
35  }
DQWorkerTask(const edm::ParameterSet &, const edm::ParameterSet &, std::string const &)
Definition: DQWorkerTask.cc:5
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
std::string hltTaskFolder_
Definition: IntegrityTask.h:41
ecaldqm::IntegrityTask::~IntegrityTask ( )

Definition at line 37 of file IntegrityTask.cc.

38  {
39  }

Member Function Documentation

void ecaldqm::IntegrityTask::analyze ( const void *  _p,
Collections  _collection 
)
inlineoverridevirtual

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 44 of file IntegrityTask.h.

References ecaldqm::kBlockSizeErrors, ecaldqm::kChIdErrors, ecaldqm::kGainErrors, ecaldqm::kGainSwitchErrors, ecaldqm::kTowerIdErrors, and runOnErrors().

44  {
45  switch(_collection){
46  case kGainErrors:
47  case kChIdErrors:
48  case kGainSwitchErrors:
49  runOnErrors(*static_cast<const DetIdCollection*>(_p), _collection);
50  break;
51  case kTowerIdErrors:
52  case kBlockSizeErrors:
53  runOnErrors(*static_cast<const EcalElectronicsIdCollection*>(_p), _collection);
54  break;
55  default:
56  break;
57  }
58  }
void runOnErrors(const DetIdCollection &, Collections)
void ecaldqm::IntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 53 of file IntegrityTask.cc.

References kByLumi, and ecaldqm::DQWorker::MEs_.

54  {
55  if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->reset();
56  }
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
void ecaldqm::IntegrityTask::bookMEs ( )
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 42 of file IntegrityTask.cc.

References hltTaskMode_, kByLumi, kFEDNonFatal, and ecaldqm::DQWorker::MEs_.

43  {
44  if(hltTaskMode_ != 1){
45  for(unsigned iME(kByLumi); iME < kFEDNonFatal; iME++)
46  MEs_[iME]->book();
47  }
48  if(hltTaskMode_ != 0)
49  MEs_[kFEDNonFatal]->book();
50  }
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
void ecaldqm::IntegrityTask::runOnErrors ( const DetIdCollection _ids,
Collections  _collection 
)

Definition at line 59 of file IntegrityTask.cc.

References edm::EDCollection< T >::begin(), edm::EDCollection< T >::end(), lumiContext::fill, kByLumi, kChId, ecaldqm::kChIdErrors, kFEDNonFatal, kGain, ecaldqm::kGainErrors, kGainSwitch, ecaldqm::kGainSwitchErrors, kTotal, ecaldqm::DQWorker::MEs_, and nMESets.

Referenced by analyze().

60  {
61  MESets set(nMESets);
62  switch(_collection){
63  case kGainErrors:
64  set = kGain;
65  break;
66  case kChIdErrors:
67  set = kChId;
68  break;
69  case kGainSwitchErrors:
70  set = kGainSwitch;
71  break;
72  default:
73  return;
74  }
75 
76  for(DetIdCollection::const_iterator idItr(_ids.begin()); idItr != _ids.end(); ++idItr){
77  if(MEs_[set]->isActive()) MEs_[set]->fill(*idItr);
78  if(MEs_[kFEDNonFatal]->isActive()) MEs_[kFEDNonFatal]->fill(*idItr);
79  if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->fill(*idItr);
80  if(MEs_[kTotal]->isActive()) MEs_[kTotal]->fill(*idItr);
81  }
82  }
string fill
Definition: lumiContext.py:319
const_iterator end() const
Definition: EDCollection.h:153
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
const_iterator begin() const
Definition: EDCollection.h:146
std::vector< DetId >::const_iterator const_iterator
Definition: EDCollection.h:19
void ecaldqm::IntegrityTask::runOnErrors ( const EcalElectronicsIdCollection _ids,
Collections  _collection 
)

Definition at line 85 of file IntegrityTask.cc.

References edm::EDCollection< T >::begin(), edm::EDCollection< T >::end(), lumiContext::fill, kBlockSize, ecaldqm::kBlockSizeErrors, kByLumi, kFEDNonFatal, kTotal, kTowerId, ecaldqm::kTowerIdErrors, ecaldqm::DQWorker::MEs_, and nMESets.

86  {
87  MESets set(nMESets);
88 
89  switch(_collection){
90  case kTowerIdErrors:
91  set = kTowerId;
92  break;
93  case kBlockSizeErrors:
94  set = kBlockSize;
95  break;
96  default:
97  return;
98  }
99 
100  // 25 is not correct
101 
102  for(EcalElectronicsIdCollection::const_iterator idItr(_ids.begin()); idItr != _ids.end(); ++idItr){
103  if(MEs_[set]->isActive()) MEs_[set]->fill(*idItr, 25.);
104  if(MEs_[kFEDNonFatal]->isActive()) MEs_[kFEDNonFatal]->fill(*idItr, 25.);
105  if(MEs_[kByLumi]->isActive()) MEs_[kByLumi]->fill(*idItr, 25.);
106  if(MEs_[kTotal]->isActive()) MEs_[kTotal]->fill(*idItr, 25.);
107  }
108  }
string fill
Definition: lumiContext.py:319
const_iterator end() const
Definition: EDCollection.h:153
std::vector< MESet * > MEs_
Definition: DQWorker.h:56
const_iterator begin() const
Definition: EDCollection.h:146
std::vector< EcalElectronicsId >::const_iterator const_iterator
Definition: EDCollection.h:19
void ecaldqm::IntegrityTask::setMEData ( std::vector< MEData > &  _data)
static

Definition at line 112 of file IntegrityTask.cc.

References MonitorElement::DQM_KIND_TH1F, kBlockSize, kByLumi, EcalDQMBinningService::kChannel, kChId, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kDCC, EcalDQMBinningService::kEcal2P, kFEDNonFatal, kGain, kGainSwitch, EcalDQMBinningService::kSuperCrystal, kTotal, and kTowerId.

113  {
122  }

Member Data Documentation

std::string ecaldqm::IntegrityTask::hltTaskFolder_
private

Definition at line 41 of file IntegrityTask.h.

Referenced by IntegrityTask().

int ecaldqm::IntegrityTask::hltTaskMode_
private

Definition at line 40 of file IntegrityTask.h.

Referenced by bookMEs(), and IntegrityTask().