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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 9 of file EcalDQMStatusWriter.h.

Constructor & Destructor Documentation

◆ EcalDQMStatusWriter()

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

Definition at line 14 of file EcalDQMStatusWriter.cc.

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 }

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

◆ ~EcalDQMStatusWriter()

EcalDQMStatusWriter::~EcalDQMStatusWriter ( )
inlineoverride

Definition at line 12 of file EcalDQMStatusWriter.h.

12 {}

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 26 of file EcalDQMStatusWriter.cc.

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 }

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

Member Data Documentation

◆ channelStatus_

EcalDQMChannelStatus EcalDQMStatusWriter::channelStatus_
private

Definition at line 17 of file EcalDQMStatusWriter.h.

Referenced by analyze(), and EcalDQMStatusWriter().

◆ firstRun_

unsigned EcalDQMStatusWriter::firstRun_
private

Definition at line 19 of file EcalDQMStatusWriter.h.

Referenced by analyze().

◆ towerStatus_

EcalDQMTowerStatus EcalDQMStatusWriter::towerStatus_
private

Definition at line 18 of file EcalDQMStatusWriter.h.

Referenced by analyze(), and EcalDQMStatusWriter().

cond::service::PoolDBOutputService
Definition: PoolDBOutputService.h:33
EcalDQMStatusWriter::towerStatus_
EcalDQMTowerStatus towerStatus_
Definition: EcalDQMStatusWriter.h:18
ecaldqm::StatusManager::readFromStream
void readFromStream(std::istream &)
Definition: StatusManager.cc:124
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::Service< cond::service::PoolDBOutputService >
dtResolutionTest_cfi.inputFile
inputFile
Definition: dtResolutionTest_cfi.py:14
ecaldqm::StatusManager::writeToObj
void writeToObj(EcalDQMChannelStatus &, EcalDQMTowerStatus &) const
Definition: StatusManager.cc:224
EcalDQMStatusWriter::firstRun_
unsigned firstRun_
Definition: EcalDQMStatusWriter.h:19
ecaldqm::StatusManager
Definition: StatusManager.h:14
EcalDQMStatusWriter::channelStatus_
EcalDQMChannelStatus channelStatus_
Definition: EcalDQMStatusWriter.h:17
cms::Exception
Definition: Exception.h:70