CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::InLumi>();
24  //per RUN products
25  produces<edm::ConditionsInRunBlock,edm::InRun>();
26  //per EVENT products
27  produces<edm::ConditionsInEventBlock>();
28 
29 }
30 
31 
33 {
34 }
35 
36 
37 //
38 // member functions
39 //
41  std::auto_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_));
42  lumi.put( lumiOut );
43 }
44 
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 }
58 
59 // ------------ method called to produce the data ------------
60 void
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 }
100 
101 
#define LogDebug(id)
T getParameter(std::string const &) const
tuple lumi
Definition: fjr2json.py:35
boost::uint32_t lhcFillNumber
boost::uint32_t totalIntensityBeam1
virtual void endLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) overridefinal
const cms_uint16_t bstMasterStatus() const
const cms_uint16_t beamMomentum() const
virtual void produce(edm::Event &, const edm::EventSetup &) overridefinal
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
boost::uint32_t totalIntensityBeam2
edm::ConditionsInLumiBlock lumiBlock_
ConditionDumperInEdm(const edm::ParameterSet &)
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
const cms_uint32_t totalIntensityBeam2() const
const cms_uint32_t totalIntensityBeam1() const
virtual void endRunProduce(edm::Run &, const edm::EventSetup &) overridefinal
edm::ConditionsInEventBlock eventBlock_
const cms_uint32_t lhcFillNumber() const
edm::ConditionsInRunBlock runBlock_
const T & get() const
Definition: EventSetup.h:55
edm::InputTag gtEvmDigisLabel_
boost::uint32_t turnCountNumber
boost::uint16_t beamMomentum
void put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Run.h:86
const cms_uint32_t turnCountNumber() const
const cms_uint16_t beamMode() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:36
void put(std::auto_ptr< PROD > product)
Put a new product.