#include <FWCore/ConditionDumperInEdm/src/ConditionDumperInEdm.cc>
Public Member Functions | |
ConditionDumperInEdm (const edm::ParameterSet &) | |
~ConditionDumperInEdm () | |
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 T * | get (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_ |
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 48 of file ConditionDumperInEdm.h.
ConditionDumperInEdm::ConditionDumperInEdm | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 16 of file ConditionDumperInEdm.cc.
References edm::ParameterSet::getParameter(), and gtEvmDigisLabel_.
{ gtEvmDigisLabel_ = iConfig.getParameter<edm::InputTag>("gtEvmDigisLabel"); //per LUMI products produces<edm::ConditionsInLumiBlock,edm::InLumi>(); //per RUN products produces<edm::ConditionsInRunBlock,edm::InRun>(); //per EVENT products produces<edm::ConditionsInEventBlock>(); }
ConditionDumperInEdm::~ConditionDumperInEdm | ( | ) |
Definition at line 32 of file ConditionDumperInEdm.cc.
{ }
void ConditionDumperInEdm::beginLuminosityBlock | ( | edm::LuminosityBlock & | lumi, |
edm::EventSetup const & | setup | ||
) | [private, virtual] |
void ConditionDumperInEdm::beginRun | ( | edm::Run & | run, |
const edm::EventSetup & | setup | ||
) | [private, virtual] |
void ConditionDumperInEdm::endLuminosityBlock | ( | edm::LuminosityBlock & | lumi, |
edm::EventSetup const & | setup | ||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 42 of file ConditionDumperInEdm.cc.
References lumiBlock_, and edm::LuminosityBlock::put().
{ std::auto_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_)); lumi.put( lumiOut ); }
void ConditionDumperInEdm::endRun | ( | edm::Run & | run, |
const edm::EventSetup & | setup | ||
) | [private, virtual] |
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_.
{ //dump of RunInfo { edm::ESHandle<RunInfo> sum; setup.get<RunInfoRcd>().get(sum); runBlock_.BStartCurrent=sum->m_start_current; runBlock_.BStopCurrent=sum->m_stop_current; runBlock_.BAvgCurrent=sum->m_avg_current; } std::auto_ptr<edm::ConditionsInRunBlock> outBlock(new edm::ConditionsInRunBlock(runBlock_)); run.put(outBlock); }
const T* ConditionDumperInEdm::get | ( | const edm::EventSetup & | setup | ) | [inline, private] |
Definition at line 61 of file ConditionDumperInEdm.h.
References patZpeak::handle, edm::ESHandle< T >::product(), dttmaxenums::R, and HcalObjRepresent::setup().
{ edm::ESHandle<T> handle; setup.get<R>().get(handle); return handle.product(); }
void ConditionDumperInEdm::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 66 of file ConditionDumperInEdm.cc.
References L1GtfeExtWord::beamMode(), edm::ConditionsInRunBlock::beamMode, L1GtfeExtWord::beamMomentum(), edm::ConditionsInRunBlock::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(), L1GtfeExtWord::turnCountNumber(), and edm::ConditionsInEventBlock::turnCountNumber.
{ //get the L1 object edm::Handle<L1GlobalTriggerEvmReadoutRecord> gtReadoutRecordData; iEvent.getByLabel(gtEvmDigisLabel_, gtReadoutRecordData); if (!gtReadoutRecordData.isValid()) { LogDebug("ConditionDumperInEdm") << "\nWarning: L1GlobalTriggerEvmReadoutRecord with input tag " << gtEvmDigisLabel_ << "\nrequested in configuration, but not found in the event." << "\nNo BST quantities retrieved." << std::endl; std::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_)); iEvent.put( eventOut ); return; } const L1GtfeExtWord& gtfeBlockData = gtReadoutRecordData->gtfeWord(); //lumi info lumiBlock_.totalIntensityBeam1=gtfeBlockData.totalIntensityBeam1(); lumiBlock_.totalIntensityBeam2=gtfeBlockData.totalIntensityBeam2(); //run info runBlock_.beamMomentum=gtfeBlockData.beamMomentum(); runBlock_.beamMode=gtfeBlockData.beamMode(); // runBlock_.particleTypeBeam1=gtfeBlockData.particleTypeBeam1(); // runBlock_.particleTypeBeam2=gtfeBlockData.particleTypeBeam2(); runBlock_.lhcFillNumber=gtfeBlockData.lhcFillNumber(); //event info eventBlock_. bstMasterStatus= gtfeBlockData.bstMasterStatus() ; eventBlock_.turnCountNumber = gtfeBlockData.turnCountNumber(); std::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_)); iEvent.put( eventOut ); }
Definition at line 73 of file ConditionDumperInEdm.h.
Referenced by produce().
Definition at line 69 of file ConditionDumperInEdm.h.
Referenced by ConditionDumperInEdm(), and produce().
Definition at line 71 of file ConditionDumperInEdm.h.
Referenced by endLuminosityBlock(), and produce().
Definition at line 72 of file ConditionDumperInEdm.h.