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::EndRunProducer, edm::EndLuminosityBlockProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 ConditionDumperInEdm (const edm::ParameterSet &)
 
 ~ConditionDumperInEdm ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::EndLuminosityBlockProducer >
 EDProducer ()=default
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

virtual void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) override final
 
virtual void endRunProduce (edm::Run &, const edm::EventSetup &) override final
 
template<typename R , typename T >
const Tget (const edm::EventSetup &setup)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override final
 

Private Attributes

edm::ConditionsInEventBlock eventBlock_
 
edm::InputTag gtEvmDigisLabel_
 
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecordgtEvmDigisLabelToken_
 
edm::ConditionsInLumiBlock lumiBlock_
 
edm::ConditionsInRunBlock runBlock_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 48 of file ConditionDumperInEdm.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file ConditionDumperInEdm.cc.

References edm::ParameterSet::getParameter(), gtEvmDigisLabel_, and gtEvmDigisLabelToken_.

17 {
18 
19  gtEvmDigisLabel_ = iConfig.getParameter<edm::InputTag>("gtEvmDigisLabel");
20 
21 
22  //per LUMI products
23  produces<edm::ConditionsInLumiBlock,edm::Transition::EndLuminosityBlock>();
24  //per RUN products
25  produces<edm::ConditionsInRunBlock,edm::Transition::EndRun>();
26  //per EVENT products
27  produces<edm::ConditionsInEventBlock>();
28 
29  gtEvmDigisLabelToken_=consumes<L1GlobalTriggerEvmReadoutRecord>(gtEvmDigisLabel_);
30 }
T getParameter(std::string const &) const
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmDigisLabelToken_
edm::InputTag gtEvmDigisLabel_
ConditionDumperInEdm::~ConditionDumperInEdm ( )

Definition at line 33 of file ConditionDumperInEdm.cc.

34 {
35 }

Member Function Documentation

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

Definition at line 41 of file ConditionDumperInEdm.cc.

References lumiBlock_, eostools::move(), and edm::LuminosityBlock::put().

41  {
42  std::unique_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_));
43  lumi.put(std::move(lumiOut));
44 }
void put(std::unique_ptr< PROD > product)
Put a new product.
edm::ConditionsInLumiBlock lumiBlock_
def move(src, dest)
Definition: eostools.py:510
void ConditionDumperInEdm::endRunProduce ( edm::Run run,
const edm::EventSetup setup 
)
finaloverrideprivatevirtual

Definition at line 46 of file ConditionDumperInEdm.cc.

References edm::ConditionsInRunBlock::BAvgCurrent, edm::ConditionsInRunBlock::BStartCurrent, edm::ConditionsInRunBlock::BStopCurrent, edm::EventSetup::get(), RunInfo::m_avg_current, RunInfo::m_start_current, RunInfo::m_stop_current, eostools::move(), edm::Run::put(), and runBlock_.

46  {
47  //dump of RunInfo
48  {
50  setup.get<RunInfoRcd>().get(sum);
54  }
55 
56  std::unique_ptr<edm::ConditionsInRunBlock> outBlock(new edm::ConditionsInRunBlock(runBlock_));
57  run.put(std::move(outBlock));
58 }
float m_stop_current
Definition: RunInfo.h:28
edm::ConditionsInRunBlock runBlock_
const T & get() const
Definition: EventSetup.h:55
void put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Run.h:111
float m_avg_current
Definition: RunInfo.h:29
float m_start_current
Definition: RunInfo.h:27
def move(src, dest)
Definition: eostools.py:510
template<typename R , typename T >
const T* ConditionDumperInEdm::get ( const edm::EventSetup setup)
inlineprivate
void ConditionDumperInEdm::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
finaloverrideprivatevirtual

Definition at line 62 of file ConditionDumperInEdm.cc.

References edm::ConditionsInRunBlock::beamMode, L1GtfeExtWord::beamMode(), edm::ConditionsInRunBlock::beamMomentum, L1GtfeExtWord::beamMomentum(), L1GtfeExtWord::bstMasterStatus(), eventBlock_, edm::Event::getByToken(), gtEvmDigisLabel_, gtEvmDigisLabelToken_, L1GlobalTriggerEvmReadoutRecord::gtfeWord(), edm::HandleBase::isValid(), edm::ConditionsInRunBlock::lhcFillNumber, L1GtfeExtWord::lhcFillNumber(), LogDebug, lumiBlock_, eostools::move(), edm::Event::put(), runBlock_, edm::ConditionsInLumiBlock::totalIntensityBeam1, L1GtfeExtWord::totalIntensityBeam1(), edm::ConditionsInLumiBlock::totalIntensityBeam2, L1GtfeExtWord::totalIntensityBeam2(), edm::ConditionsInEventBlock::turnCountNumber, and L1GtfeExtWord::turnCountNumber().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

63 {
64 
65  //get the L1 object
67  iEvent.getByToken(gtEvmDigisLabelToken_, gtReadoutRecordData);
68 
69  if (!gtReadoutRecordData.isValid()) {
70  LogDebug("ConditionDumperInEdm")
71  << "\nWarning: L1GlobalTriggerEvmReadoutRecord with input tag " << gtEvmDigisLabel_
72  << "\nrequested in configuration, but not found in the event."
73  << "\nNo BST quantities retrieved." << std::endl;
74 
75  std::unique_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
76  iEvent.put(std::move(eventOut));
77 
78  return;
79  }
80 
81  const L1GtfeExtWord& gtfeBlockData = gtReadoutRecordData->gtfeWord();
82 
83  //lumi info
86 
87  //run info
88  runBlock_.beamMomentum=gtfeBlockData.beamMomentum();
89  runBlock_.beamMode=gtfeBlockData.beamMode();
90  // runBlock_.particleTypeBeam1=gtfeBlockData.particleTypeBeam1();
91  // runBlock_.particleTypeBeam2=gtfeBlockData.particleTypeBeam2();
92  runBlock_.lhcFillNumber=gtfeBlockData.lhcFillNumber();
93 
94  //event info
95  eventBlock_. bstMasterStatus= gtfeBlockData.bstMasterStatus() ;
97 
98  std::unique_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
99  iEvent.put(std::move(eventOut));
100 }
#define LogDebug(id)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmDigisLabelToken_
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
boost::uint32_t lhcFillNumber
boost::uint32_t totalIntensityBeam1
const cms_uint16_t bstMasterStatus() const
const cms_uint16_t beamMomentum() const
boost::uint32_t totalIntensityBeam2
edm::ConditionsInLumiBlock lumiBlock_
bool isValid() const
Definition: HandleBase.h:74
const cms_uint32_t totalIntensityBeam2() const
const cms_uint32_t totalIntensityBeam1() const
edm::ConditionsInEventBlock eventBlock_
const cms_uint32_t lhcFillNumber() const
edm::ConditionsInRunBlock runBlock_
edm::InputTag gtEvmDigisLabel_
boost::uint32_t turnCountNumber
boost::uint16_t beamMomentum
const cms_uint32_t turnCountNumber() const
const cms_uint16_t beamMode() const
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

edm::ConditionsInEventBlock ConditionDumperInEdm::eventBlock_
private

Definition at line 72 of file ConditionDumperInEdm.h.

Referenced by produce().

edm::InputTag ConditionDumperInEdm::gtEvmDigisLabel_
private

Definition at line 68 of file ConditionDumperInEdm.h.

Referenced by ConditionDumperInEdm(), and produce().

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

Definition at line 74 of file ConditionDumperInEdm.h.

Referenced by ConditionDumperInEdm(), and produce().

edm::ConditionsInLumiBlock ConditionDumperInEdm::lumiBlock_
private

Definition at line 70 of file ConditionDumperInEdm.h.

Referenced by endLuminosityBlockProduce(), and produce().

edm::ConditionsInRunBlock ConditionDumperInEdm::runBlock_
private

Definition at line 71 of file ConditionDumperInEdm.h.

Referenced by endRunProduce(), and produce().