CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalDQMStatusWriter Class Reference

#include <EcalDQMStatusWriter.h>

Inheritance diagram for EcalDQMStatusWriter:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EcalDQMStatusWriter (edm::ParameterSet const &)
 
 ~EcalDQMStatusWriter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 

Private Attributes

EcalDQMChannelStatus channelStatus_
 
unsigned firstRun_
 
EcalDQMTowerStatus towerStatus_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 9 of file EcalDQMStatusWriter.h.

Constructor & Destructor Documentation

EcalDQMStatusWriter::EcalDQMStatusWriter ( edm::ParameterSet const &  _ps)

Definition at line 14 of file EcalDQMStatusWriter.cc.

References channelStatus_, edm::ParameterSet::getUntrackedParameter(), analyzePatCleaning_cfg::inputFile, ecaldqm::StatusManager::readFromStream(), AlCaHLTBitMon_QueryRunRegistry::string, towerStatus_, and ecaldqm::StatusManager::writeToObj().

14  :
16  towerStatus_(),
17  firstRun_(_ps.getUntrackedParameter<unsigned>("firstRun"))
18 {
19  std::ifstream inputFile(_ps.getUntrackedParameter<std::string>("inputFile"));
20  if(!inputFile.is_open())
21  throw cms::Exception("Invalid input for EcalDQMStatusWriter");
22 
23  ecaldqm::StatusManager statusManager;
24 
25  statusManager.readFromStream(inputFile);
26  statusManager.writeToObj(channelStatus_, towerStatus_);
27 }
EcalDQMChannelStatus channelStatus_
void readFromStream(std::istream &)
EcalDQMTowerStatus towerStatus_
void writeToObj(EcalDQMChannelStatus &, EcalDQMTowerStatus &) const
EcalDQMStatusWriter::~EcalDQMStatusWriter ( )
inline

Definition at line 12 of file EcalDQMStatusWriter.h.

References analyze().

12 {}

Member Function Documentation

void EcalDQMStatusWriter::analyze ( edm::Event const &  ,
edm::EventSetup const &  _es 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 30 of file EcalDQMStatusWriter.cc.

References channelStatus_, DEFINE_FWK_MODULE, cond::service::PoolDBOutputService::endOfTime(), firstRun_, towerStatus_, and cond::service::PoolDBOutputService::writeOne().

Referenced by ~EcalDQMStatusWriter().

31 {
33  if(firstRun_ == dbOutput.endOfTime()) return;
34 
35  dbOutput.writeOne(&channelStatus_, firstRun_, "EcalDQMChannelStatusRcd");
36  dbOutput.writeOne(&towerStatus_, firstRun_, "EcalDQMTowerStatusRcd");
37 
38  firstRun_ = dbOutput.endOfTime(); // avoid accidentally re-writing the conditions
39 }
EcalDQMChannelStatus channelStatus_
EcalDQMTowerStatus towerStatus_

Member Data Documentation

EcalDQMChannelStatus EcalDQMStatusWriter::channelStatus_
private

Definition at line 17 of file EcalDQMStatusWriter.h.

Referenced by analyze(), and EcalDQMStatusWriter().

unsigned EcalDQMStatusWriter::firstRun_
private

Definition at line 19 of file EcalDQMStatusWriter.h.

Referenced by analyze().

EcalDQMTowerStatus EcalDQMStatusWriter::towerStatus_
private

Definition at line 18 of file EcalDQMStatusWriter.h.

Referenced by analyze(), and EcalDQMStatusWriter().