CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DQMHarvestingMetadata Class Reference
Inheritance diagram for DQMHarvestingMetadata:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DQMHarvestingMetadata (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DQMHarvestingMetadata () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, 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::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, edm::LuminosityBlock const &iLumi, edm::EventSetup const &) override
 
void dqmEndRun (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, edm::Run const &iRun, edm::EventSetup const &) override
 Analyze. More...
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Attributes

MonitorElementcmsswVer_
 Current working directory of the job. More...
 
double currentTime_
 CMSSW version run for this job. More...
 
std::string eventInfoFolder_
 
MonitorElementfirstLumisecId_
 
MonitorElementhostName_
 The UTC time of the job initialization. More...
 
MonitorElementlastLumisecId_
 
MonitorElementlumisecId_
 UTC time of the run start. More...
 
MonitorElementprocessTimeStamp_
 
MonitorElementrunId_
 
MonitorElementrunList_
 
MonitorElementrunStartTimeStamp_
 
std::string subsystemname_
 
MonitorElementworkingDir_
 Hostname of the local machine. More...
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 5 of file DQMHarvestingMetadata.cc.

Constructor & Destructor Documentation

◆ DQMHarvestingMetadata()

DQMHarvestingMetadata::DQMHarvestingMetadata ( const edm::ParameterSet ps)

Constructor.

Definition at line 51 of file DQMHarvestingMetadata.cc.

References currentTime_, eventInfoFolder_, printsummarytable::folder, edm::ParameterSet::getUntrackedParameter(), submitPVValidationJobs::now, stampToReal(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

51  {
52  struct timeval now;
53  gettimeofday(&now, nullptr);
55 
56  // read config parms
57  std::string folder = ps.getUntrackedParameter<std::string>("eventInfoFolder", "EventInfo");
58  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "YourSubsystem");
59 
61 }
T getUntrackedParameter(std::string const &, T const &) const
static double stampToReal(edm::Timestamp time)
double currentTime_
CMSSW version run for this job.

◆ ~DQMHarvestingMetadata()

DQMHarvestingMetadata::~DQMHarvestingMetadata ( )
overridedefault

Destructor.

Member Function Documentation

◆ dqmEndJob()

void DQMHarvestingMetadata::dqmEndJob ( DQMStore::IBooker ,
DQMStore::IGetter  
)
inlineoverrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 24 of file DQMHarvestingMetadata.cc.

24 {};

◆ dqmEndLuminosityBlock()

void DQMHarvestingMetadata::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  iLumi,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 101 of file DQMHarvestingMetadata.cc.

References dqm::implementation::IBooker::bookInt(), eventInfoFolder_, dqm::impl::MonitorElement::Fill(), firstLumisecId_, dqm::impl::MonitorElement::getIntValue(), lastLumisecId_, BXlumiParameters_cfi::lumi, edm::LuminosityBlockBase::luminosityBlock(), lumisecId_, and dqm::implementation::NavigatorBase::setCurrentFolder().

104  {
105  int lumi = iLumi.luminosityBlock();
106 
108  firstLumisecId_ = ibooker.bookInt("firstLumiSection");
109  lastLumisecId_ = ibooker.bookInt("lastLumiSection");
110  lumisecId_ = ibooker.bookInt("iLumiSection");
111  lumisecId_->Fill(lumi);
112 
115  }
118  }
119 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * lumisecId_
UTC time of the run start.
void Fill(long long x)
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
MonitorElement * firstLumisecId_
MonitorElement * lastLumisecId_
virtual int64_t getIntValue() const

◆ dqmEndRun()

void DQMHarvestingMetadata::dqmEndRun ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprotectedvirtual

Analyze.

Reimplemented from DQMEDHarvester.

Definition at line 65 of file DQMHarvestingMetadata.cc.

References edm::RunBase::beginTime(), dqm::implementation::IBooker::bookFloat(), dqm::implementation::IBooker::bookInt(), dqm::implementation::IBooker::bookString(), cmsswVer_, currentTime_, eventInfoFolder_, dqm::impl::MonitorElement::Fill(), edm::getReleaseVersion(), dqm::impl::MonitorElement::getStringValue(), hostName_, edm::RunBase::id(), processTimeStamp_, alignCSCRings::pwd, edm::RunID::run(), writedatasetfile::run, runId_, runList_, runStartTimeStamp_, dqm::implementation::NavigatorBase::setCurrentFolder(), stampToReal(), AlCaHLTBitMon_QueryRunRegistry::string, to_string(), and workingDir_.

68  {
70 
71  runList_ = ibooker.bookString("Run", "");
72  runId_ = ibooker.bookInt("iRun");
73  runStartTimeStamp_ = ibooker.bookFloat("runStartTimeStamp");
74 
75  if (runList_->getStringValue().empty()) {
76  std::string run = std::to_string(iRun.id().run());
77  runList_->Fill(run);
78  runId_->Fill(iRun.id().run());
79  // in case of multiple runs, record start time of the first.
80  runStartTimeStamp_->Fill(stampToReal(iRun.beginTime()));
81  } else {
82  std::string run = runList_->getStringValue() + "," + std::to_string(iRun.id().run());
83  runList_->Fill(run);
84  // this is the agreed-upon pseudo-runnumber for multi-run harvesting.
85  runId_->Fill(999999);
86  }
87 
88  processTimeStamp_ = ibooker.bookFloat("processTimeStamp");
90 
91  char hostname[65];
92  gethostname(hostname, 64);
93  hostname[64] = 0;
94  hostName_ = ibooker.bookString("hostName", hostname);
95  char* pwd = getcwd(nullptr, 0);
96  workingDir_ = ibooker.bookString("workingDir", pwd);
97  free(pwd);
98  cmsswVer_ = ibooker.bookString("CMSSW_Version", edm::getReleaseVersion());
99 }
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * runStartTimeStamp_
MonitorElement * cmsswVer_
Current working directory of the job.
MonitorElement * processTimeStamp_
static std::string to_string(const XMLCh *ch)
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
MonitorElement * hostName_
The UTC time of the job initialization.
void Fill(long long x)
MonitorElement * workingDir_
Hostname of the local machine.
static double stampToReal(edm::Timestamp time)
std::string getReleaseVersion()
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
virtual const std::string & getStringValue() const
double currentTime_
CMSSW version run for this job.

Member Data Documentation

◆ cmsswVer_

MonitorElement* DQMHarvestingMetadata::cmsswVer_
private

Current working directory of the job.

Definition at line 40 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

◆ currentTime_

double DQMHarvestingMetadata::currentTime_
private

CMSSW version run for this job.

Definition at line 42 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun(), and DQMHarvestingMetadata().

◆ eventInfoFolder_

std::string DQMHarvestingMetadata::eventInfoFolder_
private

◆ firstLumisecId_

MonitorElement* DQMHarvestingMetadata::firstLumisecId_
private

Definition at line 34 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndLuminosityBlock().

◆ hostName_

MonitorElement* DQMHarvestingMetadata::hostName_
private

The UTC time of the job initialization.

Definition at line 38 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

◆ lastLumisecId_

MonitorElement* DQMHarvestingMetadata::lastLumisecId_
private

Definition at line 35 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndLuminosityBlock().

◆ lumisecId_

MonitorElement* DQMHarvestingMetadata::lumisecId_
private

UTC time of the run start.

Definition at line 33 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndLuminosityBlock().

◆ processTimeStamp_

MonitorElement* DQMHarvestingMetadata::processTimeStamp_
private

Definition at line 37 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

◆ runId_

MonitorElement* DQMHarvestingMetadata::runId_
private

Definition at line 30 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

◆ runList_

MonitorElement* DQMHarvestingMetadata::runList_
private

Definition at line 31 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

◆ runStartTimeStamp_

MonitorElement* DQMHarvestingMetadata::runStartTimeStamp_
private

Definition at line 32 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

◆ subsystemname_

std::string DQMHarvestingMetadata::subsystemname_
private

Definition at line 28 of file DQMHarvestingMetadata.cc.

Referenced by DQMHarvestingMetadata().

◆ workingDir_

MonitorElement* DQMHarvestingMetadata::workingDir_
private

Hostname of the local machine.

Definition at line 39 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().