CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ConditionDumperInEdm Class Reference

#include <FWCore/ConditionDumperInEdm/src/ConditionDumperInEdm.cc>

Inheritance diagram for ConditionDumperInEdm:
edm::one::EDProducer< edm::RunCache< edm::ConditionsInRunBlock >, edm::LuminosityBlockCache< edm::ConditionsInLumiBlock >, edm::EndRunProducer, edm::EndLuminosityBlockProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 ConditionDumperInEdm (const edm::ParameterSet &)
 
 ~ConditionDumperInEdm () override
 
- Public Member Functions inherited from edm::one::EDProducer< edm::RunCache< edm::ConditionsInRunBlock >, edm::LuminosityBlockCache< edm::ConditionsInLumiBlock >, edm::EndRunProducer, edm::EndLuminosityBlockProducer >
 EDProducer ()=default
 
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
 
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 &&)=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
 
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 endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &, const edm::EventSetup &) final
 
template<typename R , typename T >
const Tget (const edm::EventSetup &setup)
 
std::shared_ptr< edm::ConditionsInLumiBlockglobalBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) const final
 
std::shared_ptr< edm::ConditionsInRunBlockglobalBeginRun (edm::Run const &, const edm::EventSetup &) const final
 
void globalEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void globalEndRun (edm::Run const &, const edm::EventSetup &) final
 
void produce (edm::Event &, const edm::EventSetup &) final
 

Private Attributes

edm::ConditionsInEventBlock eventBlock_
 
const edm::EDPutTokenT< edm::ConditionsInEventBlockeventToken_
 
const edm::InputTag gtEvmDigisLabel_
 
const edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecordgtEvmDigisLabelToken_
 
const edm::EDPutTokenT< edm::ConditionsInLumiBlocklumiToken_
 
const edm::EDPutTokenT< edm::ConditionsInRunBlockrunToken_
 

Additional Inherited Members

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

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 47 of file ConditionDumperInEdm.h.

Constructor & Destructor Documentation

◆ ConditionDumperInEdm()

ConditionDumperInEdm::ConditionDumperInEdm ( const edm::ParameterSet iConfig)
explicit

Definition at line 15 of file ConditionDumperInEdm.cc.

16  : gtEvmDigisLabel_{iConfig.getParameter<edm::InputTag>("gtEvmDigisLabel")},
17  gtEvmDigisLabelToken_{consumes<L1GlobalTriggerEvmReadoutRecord>(gtEvmDigisLabel_)},
18  //per LUMI products
19  lumiToken_{produces<edm::ConditionsInLumiBlock, edm::Transition::EndLuminosityBlock>()},
20  //per RUN products
21  runToken_{produces<edm::ConditionsInRunBlock, edm::Transition::EndRun>()},
22  //per EVENT products
23  eventToken_{produces<edm::ConditionsInEventBlock>()} {}

References edm::ParameterSet::getParameter().

◆ ~ConditionDumperInEdm()

ConditionDumperInEdm::~ConditionDumperInEdm ( )
override

Definition at line 25 of file ConditionDumperInEdm.cc.

25 {}

Member Function Documentation

◆ endLuminosityBlockProduce()

void ConditionDumperInEdm::endLuminosityBlockProduce ( edm::LuminosityBlock lumi,
edm::EventSetup const &  setup 
)
finalprivate

Definition at line 35 of file ConditionDumperInEdm.cc.

35  {
36  lumi.emplace(lumiToken_, *luminosityBlockCache(lumi.index()));
37 }

References lumiToken_.

◆ endRunProduce()

void ConditionDumperInEdm::endRunProduce ( edm::Run run,
const edm::EventSetup setup 
)
finalprivate

Definition at line 44 of file ConditionDumperInEdm.cc.

44  {
45  //dump of RunInfo
46  auto& runBlock = *(runCache(run.index()));
47  {
49  setup.get<RunInfoRcd>().get(sum);
50  runBlock.BStartCurrent = sum->m_start_current;
51  runBlock.BStopCurrent = sum->m_stop_current;
52  runBlock.BAvgCurrent = sum->m_avg_current;
53  }
54 
55  run.emplace(runToken_, runBlock);
56 }

References get(), RunInfo::m_avg_current, RunInfo::m_start_current, RunInfo::m_stop_current, writedatasetfile::run, runToken_, and singleTopDQM_cfi::setup.

◆ get()

template<typename R , typename T >
const T* ConditionDumperInEdm::get ( const edm::EventSetup setup)
inlineprivate

◆ globalBeginLuminosityBlock()

std::shared_ptr< edm::ConditionsInLumiBlock > ConditionDumperInEdm::globalBeginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
) const
finalprivate

Definition at line 30 of file ConditionDumperInEdm.cc.

31  {
32  return std::make_shared<edm::ConditionsInLumiBlock>();
33 }

◆ globalBeginRun()

std::shared_ptr< edm::ConditionsInRunBlock > ConditionDumperInEdm::globalBeginRun ( edm::Run const &  ,
const edm::EventSetup  
) const
finalprivate

Definition at line 39 of file ConditionDumperInEdm.cc.

40  {
41  return std::make_shared<edm::ConditionsInRunBlock>();
42 }

◆ globalEndLuminosityBlock()

void ConditionDumperInEdm::globalEndLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlinefinalprivate

Definition at line 58 of file ConditionDumperInEdm.h.

58 {}

◆ globalEndRun()

void ConditionDumperInEdm::globalEndRun ( edm::Run const &  ,
const edm::EventSetup  
)
inlinefinalprivate

Definition at line 61 of file ConditionDumperInEdm.h.

61 {}

◆ produce()

void ConditionDumperInEdm::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
finalprivatevirtual

Implements edm::one::EDProducerBase.

Definition at line 59 of file ConditionDumperInEdm.cc.

59  {
60  //get the L1 object
62  iEvent.getByToken(gtEvmDigisLabelToken_, gtReadoutRecordData);
63 
64  if (!gtReadoutRecordData.isValid()) {
65  LogDebug("ConditionDumperInEdm") << "\nWarning: L1GlobalTriggerEvmReadoutRecord with input tag " << gtEvmDigisLabel_
66  << "\nrequested in configuration, but not found in the event."
67  << "\nNo BST quantities retrieved." << std::endl;
68 
69  iEvent.emplace(eventToken_, eventBlock_);
70 
71  return;
72  }
73 
74  const L1GtfeExtWord& gtfeBlockData = gtReadoutRecordData->gtfeWord();
75 
76  //lumi info
77  auto& lumiBlock = *luminosityBlockCache(iEvent.getLuminosityBlock().index());
78  lumiBlock.totalIntensityBeam1 = gtfeBlockData.totalIntensityBeam1();
79  lumiBlock.totalIntensityBeam2 = gtfeBlockData.totalIntensityBeam2();
80 
81  //run info
82  auto& runBlock = *runCache(iEvent.getRun().index());
83  runBlock.beamMomentum = gtfeBlockData.beamMomentum();
84  runBlock.beamMode = gtfeBlockData.beamMode();
85  runBlock.lhcFillNumber = gtfeBlockData.lhcFillNumber();
86 
87  //event info
90 
91  iEvent.emplace(eventToken_, eventBlock_);
92 }

References L1GtfeExtWord::beamMode(), L1GtfeExtWord::beamMomentum(), edm::ConditionsInEventBlock::bstMasterStatus, L1GtfeExtWord::bstMasterStatus(), eventBlock_, eventToken_, gtEvmDigisLabel_, gtEvmDigisLabelToken_, L1GlobalTriggerEvmReadoutRecord::gtfeWord(), iEvent, edm::HandleBase::isValid(), L1GtfeExtWord::lhcFillNumber(), LogDebug, L1GtfeExtWord::totalIntensityBeam1(), L1GtfeExtWord::totalIntensityBeam2(), edm::ConditionsInEventBlock::turnCountNumber, and L1GtfeExtWord::turnCountNumber().

Member Data Documentation

◆ eventBlock_

edm::ConditionsInEventBlock ConditionDumperInEdm::eventBlock_
private

Definition at line 76 of file ConditionDumperInEdm.h.

Referenced by produce().

◆ eventToken_

const edm::EDPutTokenT<edm::ConditionsInEventBlock> ConditionDumperInEdm::eventToken_
private

Definition at line 81 of file ConditionDumperInEdm.h.

Referenced by produce().

◆ gtEvmDigisLabel_

const edm::InputTag ConditionDumperInEdm::gtEvmDigisLabel_
private

Definition at line 74 of file ConditionDumperInEdm.h.

Referenced by produce().

◆ gtEvmDigisLabelToken_

const edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> ConditionDumperInEdm::gtEvmDigisLabelToken_
private

Definition at line 78 of file ConditionDumperInEdm.h.

Referenced by produce().

◆ lumiToken_

const edm::EDPutTokenT<edm::ConditionsInLumiBlock> ConditionDumperInEdm::lumiToken_
private

Definition at line 79 of file ConditionDumperInEdm.h.

Referenced by endLuminosityBlockProduce().

◆ runToken_

const edm::EDPutTokenT<edm::ConditionsInRunBlock> ConditionDumperInEdm::runToken_
private

Definition at line 80 of file ConditionDumperInEdm.h.

Referenced by endRunProduce().

edm::ConditionsInEventBlock::turnCountNumber
uint32_t turnCountNumber
Definition: ConditionsInEdm.h:36
patZpeak.handle
handle
Definition: patZpeak.py:23
L1GtfeExtWord::turnCountNumber
const cms_uint32_t turnCountNumber() const
Definition: L1GtfeExtWord.cc:175
L1GlobalTriggerEvmReadoutRecord::gtfeWord
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
Definition: L1GlobalTriggerEvmReadoutRecord.cc:249
ConditionDumperInEdm::gtEvmDigisLabel_
const edm::InputTag gtEvmDigisLabel_
Definition: ConditionDumperInEdm.h:74
L1GtfeExtWord::totalIntensityBeam1
const cms_uint32_t totalIntensityBeam1() const
Definition: L1GtfeExtWord.cc:295
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
L1GtfeExtWord::bstMasterStatus
const cms_uint16_t bstMasterStatus() const
Definition: L1GtfeExtWord.cc:155
RunInfo::m_stop_current
float m_stop_current
Definition: RunInfo.h:27
edm::ESHandle
Definition: DTSurvey.h:22
ConditionDumperInEdm::eventToken_
const edm::EDPutTokenT< edm::ConditionsInEventBlock > eventToken_
Definition: ConditionDumperInEdm.h:81
L1GtfeExtWord::beamMomentum
const cms_uint16_t beamMomentum() const
Definition: L1GtfeExtWord.cc:275
RunInfoRcd
Definition: RunSummaryRcd.h:26
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
L1GtfeExtWord::lhcFillNumber
const cms_uint32_t lhcFillNumber() const
Definition: L1GtfeExtWord.cc:195
RunInfo::m_start_current
float m_start_current
Definition: RunInfo.h:26
ConditionDumperInEdm::eventBlock_
edm::ConditionsInEventBlock eventBlock_
Definition: ConditionDumperInEdm.h:76
iEvent
int iEvent
Definition: GenABIO.cc:224
ConditionDumperInEdm::gtEvmDigisLabelToken_
const edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmDigisLabelToken_
Definition: ConditionDumperInEdm.h:78
L1GtfeExtWord
Definition: L1GtfeExtWord.h:31
edm::ConditionsInEventBlock::bstMasterStatus
uint16_t bstMasterStatus
Definition: ConditionsInEdm.h:35
L1GtfeExtWord::totalIntensityBeam2
const cms_uint32_t totalIntensityBeam2() const
Definition: L1GtfeExtWord.cc:315
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ConditionDumperInEdm::runToken_
const edm::EDPutTokenT< edm::ConditionsInRunBlock > runToken_
Definition: ConditionDumperInEdm.h:80
ConditionDumperInEdm::get
const T * get(const edm::EventSetup &setup)
Definition: ConditionDumperInEdm.h:66
ConditionDumperInEdm::lumiToken_
const edm::EDPutTokenT< edm::ConditionsInLumiBlock > lumiToken_
Definition: ConditionDumperInEdm.h:79
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
RunInfo::m_avg_current
float m_avg_current
Definition: RunInfo.h:28
lumi
Definition: LumiSectionData.h:20
dttmaxenums::R
Definition: DTTMax.h:29
L1GtfeExtWord::beamMode
const cms_uint16_t beamMode() const
Definition: L1GtfeExtWord.cc:215
edm::InputTag
Definition: InputTag.h:15