CMS 3D CMS Logo

ConditionDumperInEdm.cc
Go to the documentation of this file.
2 #include <memory>
3 
5 
8 
11 
12 
13 //
14 // constructors and destructor
15 //
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 }
31 
32 
34 {
35 }
36 
37 
38 //
39 // member functions
40 //
42  std::unique_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_));
43  lumi.put(std::move(lumiOut));
44 }
45 
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 }
59 
60 // ------------ method called to produce the data ------------
61 void
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 }
101 
102 
#define LogDebug(id)
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmDigisLabelToken_
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
boost::uint32_t lhcFillNumber
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
boost::uint32_t totalIntensityBeam1
const cms_uint16_t bstMasterStatus() const
const cms_uint16_t beamMomentum() const
int iEvent
Definition: GenABIO.cc:230
void put(std::unique_ptr< PROD > product)
Put a new product.
boost::uint32_t totalIntensityBeam2
void endRunProduce(edm::Run &, const edm::EventSetup &) final
edm::ConditionsInLumiBlock lumiBlock_
ConditionDumperInEdm(const edm::ParameterSet &)
bool isValid() const
Definition: HandleBase.h:74
float m_stop_current
Definition: RunInfo.h:28
const cms_uint32_t totalIntensityBeam2() const
const cms_uint32_t totalIntensityBeam1() const
edm::ConditionsInEventBlock eventBlock_
const cms_uint32_t lhcFillNumber() const
edm::ConditionsInRunBlock runBlock_
void put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Run.h:115
float m_avg_current
Definition: RunInfo.h:29
edm::InputTag gtEvmDigisLabel_
boost::uint32_t turnCountNumber
float m_start_current
Definition: RunInfo.h:27
T get() const
Definition: EventSetup.h:62
void produce(edm::Event &, const edm::EventSetup &) final
boost::uint16_t beamMomentum
void endLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) final
const cms_uint32_t turnCountNumber() const
const cms_uint16_t beamMode() const
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:44