CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DQMHarvestingMetadata Class Reference
Inheritance diagram for DQMHarvestingMetadata:
DQMEDHarvester edm::one::EDProducer< T > 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< T >
 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
 
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)
 
 ~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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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)
 

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
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< B > consumes (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 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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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
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 ( const edm::ParameterSet ps)

Constructor.

Definition at line 51 of file DQMHarvestingMetadata.cc.

References currentTime_, eventInfoFolder_, printsummarytable::folder, edm::ParameterSet::getUntrackedParameter(), 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 
60  eventInfoFolder_ = subsystemname_ + "/" + folder;
61 }
T getUntrackedParameter(std::string const &, T const &) const
double currentTime_
CMSSW version run for this job.
static double stampToReal(edm::Timestamp time)
Definition: DQMEventInfo.cc:88
DQMHarvestingMetadata::~DQMHarvestingMetadata ( )
overridedefault

Destructor.

Member Function Documentation

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

Implements DQMEDHarvester.

Definition at line 24 of file DQMHarvestingMetadata.cc.

24 {};
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_, dqmdumpme::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 
114  firstLumisecId_->Fill(lumi);
115  }
117  lastLumisecId_->Fill(lumi);
118  }
119 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * lumisecId_
UTC time of the run start.
virtual int64_t getIntValue() const
void Fill(long long x)
list lumi
Definition: dqmdumpme.py:53
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
MonitorElement * firstLumisecId_
MonitorElement * lastLumisecId_
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(), submitPVValidationJobs::run, runId_, runList_, runStartTimeStamp_, dqm::implementation::NavigatorBase::setCurrentFolder(), stampToReal(), AlCaHLTBitMon_QueryRunRegistry::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:32
MonitorElement * runStartTimeStamp_
MonitorElement * cmsswVer_
Current working directory of the job.
MonitorElement * processTimeStamp_
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.
std::string getReleaseVersion()
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
double currentTime_
CMSSW version run for this job.
virtual const std::string & getStringValue() const
static double stampToReal(edm::Timestamp time)
Definition: DQMEventInfo.cc:88

Member Data Documentation

MonitorElement* DQMHarvestingMetadata::cmsswVer_
private

Current working directory of the job.

Definition at line 40 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

double DQMHarvestingMetadata::currentTime_
private

CMSSW version run for this job.

Definition at line 42 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun(), and DQMHarvestingMetadata().

std::string DQMHarvestingMetadata::eventInfoFolder_
private
MonitorElement* DQMHarvestingMetadata::firstLumisecId_
private

Definition at line 34 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndLuminosityBlock().

MonitorElement* DQMHarvestingMetadata::hostName_
private

The UTC time of the job initialization.

Definition at line 38 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

MonitorElement* DQMHarvestingMetadata::lastLumisecId_
private

Definition at line 35 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndLuminosityBlock().

MonitorElement* DQMHarvestingMetadata::lumisecId_
private

UTC time of the run start.

Definition at line 33 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndLuminosityBlock().

MonitorElement* DQMHarvestingMetadata::processTimeStamp_
private

Definition at line 37 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

MonitorElement* DQMHarvestingMetadata::runId_
private

Definition at line 30 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

MonitorElement* DQMHarvestingMetadata::runList_
private

Definition at line 31 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

MonitorElement* DQMHarvestingMetadata::runStartTimeStamp_
private

Definition at line 32 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().

std::string DQMHarvestingMetadata::subsystemname_
private

Definition at line 28 of file DQMHarvestingMetadata.cc.

Referenced by DQMHarvestingMetadata().

MonitorElement* DQMHarvestingMetadata::workingDir_
private

Hostname of the local machine.

Definition at line 39 of file DQMHarvestingMetadata.cc.

Referenced by dqmEndRun().