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

#include <IntegrityTask.h>

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

Public Member Functions

bool analyze (void const *, Collections) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 IntegrityTask ()
 
template<typename IDCollection >
void runOnDetIdCollection (IDCollection const &_ids, Collections _collection)
 
template<class C >
void runOnDetIdCollection (C const &, Collections)
 
void runOnElectronicsIdCollection (EcalElectronicsIdCollection const &, Collections)
 
 ~IntegrityTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorkerTask
virtual void addDependencies (DependencySet &)
 
virtual void beginEvent (edm::Event const &, edm::EventSetup const &)
 
 DQWorkerTask ()
 
virtual void endEvent (edm::Event const &, edm::EventSetup const &)
 
virtual bool filterRunType (short const *)
 
virtual bool filterTrigger (edm::TriggerResultsByName const &)
 
void recoverStats ()
 
virtual void setTokens (edm::ConsumesCollector &)
 
void softReset ()
 
virtual ~DQWorkerTask ()
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void bookMEs (DQMStore::IBooker &)
 
 DQWorker ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
std::string const & getName () const
 
bool onlineMode () const
 
virtual void releaseMEs ()
 
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::DQWorkerTask
typedef
EcalDCCHeaderBlock::EcalDCCEventSettings 
EventSettings
 
- Static Public Member Functions inherited from ecaldqm::DQWorkerTask
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::DQWorkerTask
void setME (edm::ParameterSet const &) final
 
- 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 &)
 
virtual void setSource (edm::ParameterSet const &)
 
void setVerbosity (int _verbosity)
 
- Protected Attributes inherited from ecaldqm::DQWorkerTask
std::set< std::string > resettable_
 
- 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 14 of file IntegrityTask.h.

Constructor & Destructor Documentation

ecaldqm::IntegrityTask::IntegrityTask ( )

Definition at line 8 of file IntegrityTask.cc.

8  :
10  {
11  }
ecaldqm::IntegrityTask::~IntegrityTask ( )
inline

Definition at line 17 of file IntegrityTask.h.

17 {}

Member Function Documentation

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

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 27 of file IntegrityTask.h.

References ecaldqm::kBlockSizeErrors, ecaldqm::kEBChIdErrors, ecaldqm::kEBGainErrors, ecaldqm::kEBGainSwitchErrors, ecaldqm::kEEChIdErrors, ecaldqm::kEEGainErrors, ecaldqm::kEEGainSwitchErrors, ecaldqm::kTowerIdErrors, runOnDetIdCollection(), and runOnElectronicsIdCollection().

27  {
28  switch(_collection){
29  case kEBGainErrors:
30  case kEBChIdErrors:
32  if(_p) runOnDetIdCollection(*static_cast<EBDetIdCollection const*>(_p), _collection);
33  return true;
34  case kEEGainErrors:
35  case kEEChIdErrors:
37  if(_p) runOnDetIdCollection(*static_cast<EEDetIdCollection const*>(_p), _collection);
38  return true;
39  break;
40  case kTowerIdErrors:
41  case kBlockSizeErrors:
42  if(_p) runOnElectronicsIdCollection(*static_cast<EcalElectronicsIdCollection const*>(_p), _collection);
43  return true;
44  break;
45  default:
46  break;
47  }
48 
49  return false;
50  }
void runOnDetIdCollection(C const &, Collections)
void runOnElectronicsIdCollection(EcalElectronicsIdCollection const &, Collections)
void ecaldqm::IntegrityTask::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from ecaldqm::DQWorker.

Definition at line 14 of file IntegrityTask.cc.

References ecaldqm::DQWorker::MEs_.

15  {
16  MEs_.at("ByLumi").reset();
17  }
MESetCollection MEs_
Definition: DQWorker.h:75
template<typename IDCollection >
void ecaldqm::IntegrityTask::runOnDetIdCollection ( IDCollection const &  _ids,
Collections  _collection 
)

Definition at line 21 of file IntegrityTask.cc.

References ecaldqm::dccId(), ecaldqm::MESet::fill(), ecaldqm::DQWorker::Timestamp::iLumi, ecaldqm::kEBChIdErrors, ecaldqm::kEBGainErrors, ecaldqm::kEBGainSwitchErrors, ecaldqm::kEEChIdErrors, ecaldqm::kEEGainErrors, ecaldqm::kEEGainSwitchErrors, ecaldqm::DQWorker::MEs_, and ecaldqm::DQWorker::timestamp_.

22  {
23  if(_ids.size() == 0) return;
24 
25  MESet* set(0);
26  switch(_collection){
27  case kEBGainErrors:
28  case kEEGainErrors:
29  set = &MEs_.at("Gain");
30  break;
31  case kEBChIdErrors:
32  case kEEChIdErrors:
33  set = &MEs_.at("ChId");
34  break;
37  set = &MEs_.at("GainSwitch");
38  break;
39  default:
40  return;
41  }
42 
43  MESet& meByLumi(MEs_.at("ByLumi"));
44  MESet& meTotal(MEs_.at("Total"));
45  MESet& meTrendNErrors(MEs_.at("TrendNErrors"));
46 
47  std::for_each(_ids.begin(), _ids.end(),
48  [&](typename IDCollection::value_type const& id){
49  set->fill(id);
50  int dccid(dccId(id));
51  meByLumi.fill(dccid);
52  meTotal.fill(dccid);
53 
54  meTrendNErrors.fill(double(timestamp_.iLumi), 1.);
55  });
56  }
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:35
Container::value_type value_type
Timestamp timestamp_
Definition: DQWorker.h:78
MESetCollection MEs_
Definition: DQWorker.h:75
unsigned dccId(DetId const &)
template<class C >
void ecaldqm::IntegrityTask::runOnDetIdCollection ( C const &  ,
Collections   
)

Referenced by analyze().

void ecaldqm::IntegrityTask::runOnElectronicsIdCollection ( EcalElectronicsIdCollection const &  _ids,
Collections  _collection 
)

Definition at line 59 of file IntegrityTask.cc.

References edm::EDCollection< T >::begin(), ecaldqm::dccId(), EcalElectronicsMapping::dccTowerConstituents(), edm::EDCollection< T >::end(), ecaldqm::MESet::fill(), ecaldqm::getElectronicsMap(), ecaldqm::DQWorker::Timestamp::iLumi, ecaldqm::kBlockSizeErrors, ecaldqm::kEEpLow, ecaldqm::kTowerIdErrors, ecaldqm::DQWorker::MEs_, ecaldqm::nCrystals(), edm::EDCollection< T >::size(), ecaldqm::DQWorker::timestamp_, and ecaldqm::towerId().

Referenced by analyze().

60  {
61  if(_ids.size() == 0) return;
62 
63  MESet* set(0);
64  switch(_collection){
65  case kTowerIdErrors:
66  set = &MEs_.at("TowerId");
67  break;
68  case kBlockSizeErrors:
69  set = &MEs_.at("BlockSize");
70  break;
71  default:
72  return;
73  }
74 
75  MESet& meByLumi(MEs_.at("ByLumi"));
76  MESet& meTotal(MEs_.at("Total"));
77  MESet& meTrendNErrors(MEs_.at("TrendNErrors"));
78 
79  std::for_each(_ids.begin(), _ids.end(),
81  set->fill(id);
82  int dccid(id.dccId());
83  double nCrystals(0.);
84  if(dccid <= kEEmHigh + 1 || dccid >= kEEpLow + 1)
86  else
87  nCrystals = 25.;
88  meByLumi.fill(dccid, nCrystals);
89  meTotal.fill(dccid, nCrystals);
90 
91  meTrendNErrors.fill(double(timestamp_.iLumi), nCrystals);
92  });
93  }
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:35
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
EcalElectronicsMapping const * getElectronicsMap()
unsigned nCrystals(unsigned)
unsigned towerId(DetId const &)
Timestamp timestamp_
Definition: DQWorker.h:78
MESetCollection MEs_
Definition: DQWorker.h:75
unsigned dccId(DetId const &)
std::vector< DetId > dccTowerConstituents(int dccId, int tower) const
Get the constituent detids for this dccId.