CMS 3D CMS Logo

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

#include <DBReaderWorkers.h>

Inheritance diagram for ecaldqm::OccupancyReader:
ecaldqm::DBReaderWorker

Public Member Functions

 OccupancyReader (edm::ParameterSet const &_ps)
 
std::map< DetId, double > run (EcalCondDBInterface *, MonRunIOV &, std::string const &) override
 
 ~OccupancyReader () override
 
- Public Member Functions inherited from ecaldqm::DBReaderWorker
 DBReaderWorker (std::string const &_name, edm::ParameterSet const &)
 
std::string const & getName () const
 
void setVerbosity (int _v)
 
virtual ~DBReaderWorker ()
 

Additional Inherited Members

- Protected Attributes inherited from ecaldqm::DBReaderWorker
std::string const name_
 
int verbosity_
 

Detailed Description

Definition at line 247 of file DBReaderWorkers.h.

Constructor & Destructor Documentation

ecaldqm::OccupancyReader::OccupancyReader ( edm::ParameterSet const &  _ps)
inline

Definition at line 249 of file DBReaderWorkers.h.

249 : DBReaderWorker("OccupancyReader", _ps) {}
DBReaderWorker(std::string const &_name, edm::ParameterSet const &)
ecaldqm::OccupancyReader::~OccupancyReader ( )
inlineoverride

Definition at line 250 of file DBReaderWorkers.h.

250 {}

Member Function Documentation

ReturnType ecaldqm::OccupancyReader::run ( EcalCondDBInterface _db,
MonRunIOV _iov,
std::string const &  _formula 
)
overridevirtual

Implements ecaldqm::DBReaderWorker.

Definition at line 414 of file DBReaderWorkers.cc.

References dat, and ecaldqm::fetchAndFill().

Referenced by Types.EventID::cppID(), and Types.LuminosityBlockID::cppID().

414  {
415  std::map<std::string, double (*)(MonOccupancyDat const &)> extList;
416 
417  extList["events_over_low_threshold"] = [](MonOccupancyDat const &dat) {
418  return double(dat.getEventsOverLowThreshold());
419  };
420  extList["events_over_high_threshold"] = [](MonOccupancyDat const &dat) {
421  return double(dat.getEventsOverHighThreshold());
422  };
423  extList["avg_energy"] = [](MonOccupancyDat const &dat) { return double(dat.getAvgEnergy()); };
424 
425  return fetchAndFill(extList, _db, _iov, _formula);
426  }
ReturnType fetchAndFill(std::map< std::string, double(*)(DataType const &)> const &_extractors, EcalCondDBInterface *_db, MonRunIOV &_iov, std::string const &_formula)
static std::vector< std::string > checklist dat