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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
const EcalElectronicsMappingGetElectronicsMap ()
 
void setElectronicsMap (edm::EventSetup const &)
 

Private Attributes

EcalDQMChannelStatus channelStatus_
 
const EcalElectronicsMappingelectronicsMap
 
unsigned firstRun_
 
std::ifstream inputFile_
 
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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 14 of file EcalDQMStatusWriter.h.

Constructor & Destructor Documentation

◆ EcalDQMStatusWriter()

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

Definition at line 14 of file EcalDQMStatusWriter.cc.

15  : channelStatus_(),
16  towerStatus_(),
17  firstRun_(_ps.getUntrackedParameter<unsigned>("firstRun")),
18  inputFile_(_ps.getUntrackedParameter<std::string>("inputFile")) {
19  if (!inputFile_.is_open())
20  throw cms::Exception("Invalid input for EcalDQMStatusWriter");
21 }

References inputFile_.

◆ ~EcalDQMStatusWriter()

EcalDQMStatusWriter::~EcalDQMStatusWriter ( )
inlineoverride

Definition at line 17 of file EcalDQMStatusWriter.h.

17 {}

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 32 of file EcalDQMStatusWriter.cc.

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

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

◆ beginRun()

void EcalDQMStatusWriter::beginRun ( edm::Run const &  _run,
edm::EventSetup const &  _es 
)
overrideprivatevirtual

◆ GetElectronicsMap()

const EcalElectronicsMapping * EcalDQMStatusWriter::GetElectronicsMap ( )
private

Definition at line 49 of file EcalDQMStatusWriter.cc.

49  {
50  if (!electronicsMap)
51  throw cms::Exception("InvalidCall") << "Electronics Mapping not initialized";
52  return electronicsMap;
53 }

References electronicsMap, and Exception.

Referenced by beginRun().

◆ setElectronicsMap()

void EcalDQMStatusWriter::setElectronicsMap ( edm::EventSetup const &  _es)
private

Definition at line 43 of file EcalDQMStatusWriter.cc.

43  {
45  _es.get<EcalMappingRcd>().get(elecMapHandle);
46  electronicsMap = elecMapHandle.product();
47 }

References electronicsMap, edm::EventSetup::get(), get, and edm::ESHandle< T >::product().

Referenced by beginRun().

Member Data Documentation

◆ channelStatus_

EcalDQMChannelStatus EcalDQMStatusWriter::channelStatus_
private

Definition at line 23 of file EcalDQMStatusWriter.h.

Referenced by analyze(), and beginRun().

◆ electronicsMap

const EcalElectronicsMapping* EcalDQMStatusWriter::electronicsMap
private

Definition at line 28 of file EcalDQMStatusWriter.h.

Referenced by GetElectronicsMap(), and setElectronicsMap().

◆ firstRun_

unsigned EcalDQMStatusWriter::firstRun_
private

Definition at line 25 of file EcalDQMStatusWriter.h.

Referenced by analyze().

◆ inputFile_

std::ifstream EcalDQMStatusWriter::inputFile_
private

Definition at line 26 of file EcalDQMStatusWriter.h.

Referenced by beginRun(), and EcalDQMStatusWriter().

◆ towerStatus_

EcalDQMTowerStatus EcalDQMStatusWriter::towerStatus_
private

Definition at line 24 of file EcalDQMStatusWriter.h.

Referenced by analyze(), and beginRun().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalDQMStatusWriter::GetElectronicsMap
const EcalElectronicsMapping * GetElectronicsMap()
Definition: EcalDQMStatusWriter.cc:49
EcalDQMStatusWriter::setElectronicsMap
void setElectronicsMap(edm::EventSetup const &)
Definition: EcalDQMStatusWriter.cc:43
EcalDQMStatusWriter::electronicsMap
const EcalElectronicsMapping * electronicsMap
Definition: EcalDQMStatusWriter.h:28
cond::service::PoolDBOutputService
Definition: PoolDBOutputService.h:33
EcalDQMStatusWriter::towerStatus_
EcalDQMTowerStatus towerStatus_
Definition: EcalDQMStatusWriter.h:24
EcalDQMStatusWriter::inputFile_
std::ifstream inputFile_
Definition: EcalDQMStatusWriter.h:26
edm::ESHandle< EcalElectronicsMapping >
ecaldqm::StatusManager::readFromStream
void readFromStream(std::istream &, EcalElectronicsMapping const *)
Definition: StatusManager.cc:124
edm::Service< cond::service::PoolDBOutputService >
get
#define get
ecaldqm::StatusManager::writeToObj
void writeToObj(EcalDQMChannelStatus &, EcalDQMTowerStatus &) const
Definition: StatusManager.cc:224
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalDQMStatusWriter::firstRun_
unsigned firstRun_
Definition: EcalDQMStatusWriter.h:25
ecaldqm::StatusManager
Definition: StatusManager.h:16
EcalMappingRcd
Definition: EcalMappingRcd.h:15
Exception
Definition: hltDiff.cc:245
EcalDQMStatusWriter::channelStatus_
EcalDQMChannelStatus channelStatus_
Definition: EcalDQMStatusWriter.h:23
cms::Exception
Definition: Exception.h:70