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::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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) 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::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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 &&)=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)
 

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<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- 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)
 

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
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< 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.

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 }

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

◆ ~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.

104  {
105  int lumi = iLumi.luminosityBlock();
106 
107  ibooker.setCurrentFolder(eventInfoFolder_);
108  firstLumisecId_ = ibooker.bookInt("firstLumiSection");
109  lastLumisecId_ = ibooker.bookInt("lastLumiSection");
110  lumisecId_ = ibooker.bookInt("iLumiSection");
111  lumisecId_->Fill(lumi);
112 
115  }
118  }
119 }

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().

◆ 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.

68  {
69  ibooker.setCurrentFolder(eventInfoFolder_);
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 }

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, writedatasetfile::run, edm::RunID::run(), runId_, runList_, runStartTimeStamp_, dqm::implementation::NavigatorBase::setCurrentFolder(), stampToReal(), AlCaHLTBitMon_QueryRunRegistry::string, and workingDir_.

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().

alignCSCRings.pwd
pwd
Definition: alignCSCRings.py:57
DQMHarvestingMetadata::workingDir_
MonitorElement * workingDir_
Hostname of the local machine.
Definition: DQMHarvestingMetadata.cc:39
printsummarytable.folder
folder
Definition: printsummarytable.py:7
stampToReal
static double stampToReal(edm::Timestamp time)
Definition: DQMHarvestingMetadata.cc:45
DQMHarvestingMetadata::runId_
MonitorElement * runId_
Definition: DQMHarvestingMetadata.cc:30
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
fileCollector.now
now
Definition: fileCollector.py:207
BXlumiParameters_cfi.lumi
lumi
Definition: BXlumiParameters_cfi.py:6
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DQMHarvestingMetadata::runStartTimeStamp_
MonitorElement * runStartTimeStamp_
Definition: DQMHarvestingMetadata.cc:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMHarvestingMetadata::runList_
MonitorElement * runList_
Definition: DQMHarvestingMetadata.cc:31
DQMHarvestingMetadata::lastLumisecId_
MonitorElement * lastLumisecId_
Definition: DQMHarvestingMetadata.cc:35
DQMHarvestingMetadata::cmsswVer_
MonitorElement * cmsswVer_
Current working directory of the job.
Definition: DQMHarvestingMetadata.cc:40
DQMHarvestingMetadata::currentTime_
double currentTime_
CMSSW version run for this job.
Definition: DQMHarvestingMetadata.cc:42
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::getReleaseVersion
std::string getReleaseVersion()
Definition: GetReleaseVersion.cc:7
dqm::impl::MonitorElement::getStringValue
virtual const std::string & getStringValue() const
Definition: MonitorElement.cc:922
DQMHarvestingMetadata::eventInfoFolder_
std::string eventInfoFolder_
Definition: DQMHarvestingMetadata.cc:24
DQMHarvestingMetadata::lumisecId_
MonitorElement * lumisecId_
UTC time of the run start.
Definition: DQMHarvestingMetadata.cc:33
DQMHarvestingMetadata::subsystemname_
std::string subsystemname_
Definition: DQMHarvestingMetadata.cc:28
DQMHarvestingMetadata::firstLumisecId_
MonitorElement * firstLumisecId_
Definition: DQMHarvestingMetadata.cc:34
lumi
Definition: LumiSectionData.h:20
DQMHarvestingMetadata::hostName_
MonitorElement * hostName_
The UTC time of the job initialization.
Definition: DQMHarvestingMetadata.cc:38
DQMHarvestingMetadata::processTimeStamp_
MonitorElement * processTimeStamp_
Definition: DQMHarvestingMetadata.cc:37
dqm::impl::MonitorElement::getIntValue
virtual int64_t getIntValue() const
Definition: MonitorElement.cc:912