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 }
43  std::auto_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_));
44  lumi.put( lumiOut );
45 }
46 
48 }
49 
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 }
63 
64 // ------------ method called to produce the data ------------
65 void
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 }
105 
106 
#define LogDebug(id)
T getParameter(std::string const &) const
virtual void endRun(edm::Run &, const edm::EventSetup &)
tuple lumi
Definition: fjr2json.py:35
boost::uint32_t lhcFillNumber
boost::uint32_t totalIntensityBeam1
const cms_uint16_t bstMasterStatus() const
virtual void endLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
const cms_uint16_t beamMomentum() const
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
virtual void produce(edm::Event &, const edm::EventSetup &)
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:356
const cms_uint32_t totalIntensityBeam2() const
const cms_uint32_t totalIntensityBeam1() const
virtual void beginRun(edm::Run &, const edm::EventSetup &)
edm::ConditionsInEventBlock eventBlock_
const cms_uint32_t lhcFillNumber() const
edm::ConditionsInRunBlock runBlock_
const T & get() const
Definition: EventSetup.h:55
virtual void beginLuminosityBlock(edm::LuminosityBlock &, edm::EventSetup const &)
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:81
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:33
void put(std::auto_ptr< PROD > product)
Put a new product.