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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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::EDGetTokenT
< L1GlobalTriggerEvmReadoutRecord
gtEvmDigisLabelToken_
 
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 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::InLumi>();
24  //per RUN products
25  produces<edm::ConditionsInRunBlock,edm::InRun>();
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_, and edm::LuminosityBlock::put().

41  {
42  std::auto_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_));
43  lumi.put( lumiOut );
44 }
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 46 of file ConditionDumperInEdm.cc.

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

46  {
47  //dump of RunInfo
48  {
50  setup.get<RunInfoRcd>().get(sum);
51  runBlock_.BStartCurrent=sum->m_start_current;
52  runBlock_.BStopCurrent=sum->m_stop_current;
53  runBlock_.BAvgCurrent=sum->m_avg_current;
54  }
55 
56  std::auto_ptr<edm::ConditionsInRunBlock> outBlock(new edm::ConditionsInRunBlock(runBlock_));
57  run.put(outBlock);
58 }
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 62 of file ConditionDumperInEdm.cc.

References edm::ConditionsInRunBlock::beamMode, L1GtfeExtWord::beamMode(), edm::ConditionsInRunBlock::beamMomentum, L1GtfeExtWord::beamMomentum(), L1GtfeExtWord::bstMasterStatus(), eventBlock_, edm::Event::getByToken(), gtEvmDigisLabel_, gtEvmDigisLabelToken_, 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().

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::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
76  iEvent.put( 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::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
99  iEvent.put( eventOut );
100 }
#define LogDebug(id)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmDigisLabelToken_
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
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 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().