test
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  gtEvmDigisLabelToken_=consumes<L1GlobalTriggerEvmReadoutRecord>(gtEvmDigisLabel_);
30 }
31 
32 
34 {
35 }
36 
37 
38 //
39 // member functions
40 //
42  std::auto_ptr<edm::ConditionsInLumiBlock> lumiOut( new edm::ConditionsInLumiBlock(lumiBlock_));
43  lumi.put( lumiOut );
44 }
45 
47  //dump of RunInfo
48  {
50  setup.get<RunInfoRcd>().get(sum);
51  runBlock_.BStartCurrent=sum->m_start_current;
52  runBlock_.BStopCurrent=sum->m_stop_current;
53  runBlock_.BAvgCurrent=sum->m_avg_current;
54  }
55 
56  std::auto_ptr<edm::ConditionsInRunBlock> outBlock(new edm::ConditionsInRunBlock(runBlock_));
57  run.put(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::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
76  iEvent.put( 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::auto_ptr<edm::ConditionsInEventBlock> eventOut( new edm::ConditionsInEventBlock(eventBlock_));
99  iEvent.put( eventOut );
100 }
101 
102 
#define LogDebug(id)
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmDigisLabelToken_
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:230
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
boost::uint32_t totalIntensityBeam2
edm::ConditionsInLumiBlock lumiBlock_
ConditionDumperInEdm(const edm::ParameterSet &)
bool isValid() const
Definition: HandleBase.h:75
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:56
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:112
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:43
void put(std::auto_ptr< PROD > product)
Put a new product.