CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

edm::ConditionsInEventBlock eventBlock_
 
edm::InputTag gtEvmDigisLabel_
 
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
 
- 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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 47 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(), and gtEvmDigisLabel_.

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

Definition at line 32 of file ConditionDumperInEdm.cc.

33 {
34 }

Member Function Documentation

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

Definition at line 40 of file ConditionDumperInEdm.cc.

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

40  {
41  std::auto_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_));
42  lumi.put( lumiOut );
43 }
edm::ConditionsInLumiBlock lumiBlock_
void put(std::auto_ptr< PROD > product)
Put a new product.
void ConditionDumperInEdm::endRunProduce ( edm::Run run,
const edm::EventSetup setup 
)
finaloverrideprivatevirtual

Definition at line 45 of file ConditionDumperInEdm.cc.

References edm::ConditionsInRunBlock::BAvgCurrent, edm::ConditionsInRunBlock::BStartCurrent, edm::ConditionsInRunBlock::BStopCurrent, edm::EventSetup::get(), edm::Run::put(), and runBlock_.

45  {
46  //dump of RunInfo
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  std::auto_ptr<edm::ConditionsInRunBlock> outBlock(new edm::ConditionsInRunBlock(runBlock_));
56  run.put(outBlock);
57 }
edm::ConditionsInRunBlock runBlock_
const T & get() const
Definition: EventSetup.h:55
void put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Run.h:107
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

Implements edm::one::EDProducerBase.

Definition at line 61 of file ConditionDumperInEdm.cc.

References edm::ConditionsInRunBlock::beamMode, L1GtfeExtWord::beamMode(), edm::ConditionsInRunBlock::beamMomentum, L1GtfeExtWord::beamMomentum(), L1GtfeExtWord::bstMasterStatus(), eventBlock_, edm::Event::getByLabel(), gtEvmDigisLabel_, edm::HandleBase::isValid(), edm::ConditionsInRunBlock::lhcFillNumber, L1GtfeExtWord::lhcFillNumber(), LogDebug, lumiBlock_, 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().

62 {
63 
64  //get the L1 object
66  iEvent.getByLabel(gtEvmDigisLabel_, gtReadoutRecordData);
67 
68  if (!gtReadoutRecordData.isValid()) {
69  LogDebug("ConditionDumperInEdm")
70  << "\nWarning: L1GlobalTriggerEvmReadoutRecord with input tag " << gtEvmDigisLabel_
71  << "\nrequested in configuration, but not found in the event."
72  << "\nNo BST quantities retrieved." << std::endl;
73 
74  std::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
75  iEvent.put( eventOut );
76 
77  return;
78  }
79 
80  const L1GtfeExtWord& gtfeBlockData = gtReadoutRecordData->gtfeWord();
81 
82  //lumi info
85 
86  //run info
87  runBlock_.beamMomentum=gtfeBlockData.beamMomentum();
88  runBlock_.beamMode=gtfeBlockData.beamMode();
89  // runBlock_.particleTypeBeam1=gtfeBlockData.particleTypeBeam1();
90  // runBlock_.particleTypeBeam2=gtfeBlockData.particleTypeBeam2();
91  runBlock_.lhcFillNumber=gtfeBlockData.lhcFillNumber();
92 
93  //event info
94  eventBlock_. bstMasterStatus= gtfeBlockData.bstMasterStatus() ;
96 
97  std::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
98  iEvent.put( eventOut );
99 }
#define LogDebug(id)
boost::uint32_t lhcFillNumber
boost::uint32_t totalIntensityBeam1
const cms_uint16_t bstMasterStatus() const
const cms_uint16_t beamMomentum() const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
boost::uint32_t totalIntensityBeam2
edm::ConditionsInLumiBlock lumiBlock_
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
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

Member Data Documentation

edm::ConditionsInEventBlock ConditionDumperInEdm::eventBlock_
private

Definition at line 71 of file ConditionDumperInEdm.h.

Referenced by produce().

edm::InputTag ConditionDumperInEdm::gtEvmDigisLabel_
private

Definition at line 67 of file ConditionDumperInEdm.h.

Referenced by ConditionDumperInEdm(), and produce().

edm::ConditionsInLumiBlock ConditionDumperInEdm::lumiBlock_
private

Definition at line 69 of file ConditionDumperInEdm.h.

Referenced by endLuminosityBlockProduce(), and produce().

edm::ConditionsInRunBlock ConditionDumperInEdm::runBlock_
private

Definition at line 70 of file ConditionDumperInEdm.h.

Referenced by endRunProduce(), and produce().