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::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 ConditionDumperInEdm (const edm::ParameterSet &)
 
 ~ConditionDumperInEdm ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Member Functions

virtual void beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run &, const edm::EventSetup &)
 
virtual void endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &)
 
virtual void endRun (edm::Run &, const edm::EventSetup &)
 
template<typename R , typename T >
const Tget (const edm::EventSetup &setup)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

edm::ConditionsInEventBlock eventBlock_
 
edm::InputTag gtEvmDigisLabel_
 
edm::ConditionsInLumiBlock lumiBlock_
 
edm::ConditionsInRunBlock runBlock_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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(), 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::beginLuminosityBlock ( edm::LuminosityBlock lumi,
edm::EventSetup const &  setup 
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 40 of file ConditionDumperInEdm.cc.

40  {
41 }
void ConditionDumperInEdm::beginRun ( edm::Run run,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 47 of file ConditionDumperInEdm.cc.

47  {
48 }
void ConditionDumperInEdm::endLuminosityBlock ( edm::LuminosityBlock lumi,
edm::EventSetup const &  setup 
)
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 42 of file ConditionDumperInEdm.cc.

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

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

Reimplemented from edm::EDProducer.

Definition at line 50 of file ConditionDumperInEdm.cc.

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

50  {
51  //dump of RunInfo
52  {
54  setup.get<RunInfoRcd>().get(sum);
55  runBlock_.BStartCurrent=sum->m_start_current;
56  runBlock_.BStopCurrent=sum->m_stop_current;
57  runBlock_.BAvgCurrent=sum->m_avg_current;
58  }
59 
60  std::auto_ptr<edm::ConditionsInRunBlock> outBlock(new edm::ConditionsInRunBlock(runBlock_));
61  run.put(outBlock);
62 }
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:81
template<typename R , typename T >
const T* ConditionDumperInEdm::get ( const edm::EventSetup setup)
inlineprivate
void ConditionDumperInEdm::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 66 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().

67 {
68 
69  //get the L1 object
71  iEvent.getByLabel(gtEvmDigisLabel_, gtReadoutRecordData);
72 
73  if (!gtReadoutRecordData.isValid()) {
74  LogDebug("ConditionDumperInEdm")
75  << "\nWarning: L1GlobalTriggerEvmReadoutRecord with input tag " << gtEvmDigisLabel_
76  << "\nrequested in configuration, but not found in the event."
77  << "\nNo BST quantities retrieved." << std::endl;
78 
79  std::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
80  iEvent.put( eventOut );
81 
82  return;
83  }
84 
85  const L1GtfeExtWord& gtfeBlockData = gtReadoutRecordData->gtfeWord();
86 
87  //lumi info
90 
91  //run info
92  runBlock_.beamMomentum=gtfeBlockData.beamMomentum();
93  runBlock_.beamMode=gtfeBlockData.beamMode();
94  // runBlock_.particleTypeBeam1=gtfeBlockData.particleTypeBeam1();
95  // runBlock_.particleTypeBeam2=gtfeBlockData.particleTypeBeam2();
96  runBlock_.lhcFillNumber=gtfeBlockData.lhcFillNumber();
97 
98  //event info
99  eventBlock_. bstMasterStatus= gtfeBlockData.bstMasterStatus() ;
100  eventBlock_.turnCountNumber = gtfeBlockData.turnCountNumber();
101 
102  std::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
103  iEvent.put( eventOut );
104 }
#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:85
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:356
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 73 of file ConditionDumperInEdm.h.

Referenced by produce().

edm::InputTag ConditionDumperInEdm::gtEvmDigisLabel_
private

Definition at line 69 of file ConditionDumperInEdm.h.

Referenced by ConditionDumperInEdm(), and produce().

edm::ConditionsInLumiBlock ConditionDumperInEdm::lumiBlock_
private

Definition at line 71 of file ConditionDumperInEdm.h.

Referenced by endLuminosityBlock(), and produce().

edm::ConditionsInRunBlock ConditionDumperInEdm::runBlock_
private

Definition at line 72 of file ConditionDumperInEdm.h.

Referenced by endRun(), and produce().