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 () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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().

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

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 26 of file EcalDQMStatusWriter.cc.

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

Referenced by ~EcalDQMStatusWriter().

26  {
28  if (firstRun_ == dbOutput.endOfTime())
29  return;
30 
31  dbOutput.writeOne(&channelStatus_, firstRun_, "EcalDQMChannelStatusRcd");
32  dbOutput.writeOne(&towerStatus_, firstRun_, "EcalDQMTowerStatusRcd");
33 
34  firstRun_ = dbOutput.endOfTime(); // avoid accidentally re-writing the conditions
35 }
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().