ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/interface/L1ObjMaker.h
Revision: 1.7
Committed: Thu Jul 11 11:25:21 2013 UTC (11 years, 9 months ago) by akalinow
Content type: text/plain
Branch: MAIN
CVS Tags: Artur_11_07_2013_B, Artur_11_07_2013_A, Artur_11_07_2013, HEAD
Changes since 1.6: +1 -0 lines
Log Message:
*last commit before migration to Git.

File Contents

# Content
1 #ifndef L1ObjMaker_H
2 #define L1ObjMaker_H
3
4 #include <vector>
5 #include "UserCode/L1RpcTriggerAnalysis/interface/L1Obj.h"
6 #include "FWCore/ParameterSet/interface/ParameterSet.h"
7 #include "DataFormats/Provenance/interface/RunID.h"
8 #include "DataFormats/Provenance/interface/EventID.h"
9
10
11 namespace edm {class Event; }
12
13 class L1ObjMaker {
14 public:
15 L1ObjMaker(const edm::ParameterSet & cfg);
16 const std::vector<L1Obj> & operator()(const edm::Event &ev) { run(ev); return theL1Objs; }
17
18 private:
19 void run(const edm::Event &ev);
20 bool getGMTReadout(const edm::Event &ev, std::vector<L1Obj> & result, const edm::InputTag &readout, L1Obj::TYPE t);
21 bool getRpcRegional(const edm::Event &ev, std::vector<L1Obj> & result, const edm::InputTag &l1RpcDigis);
22
23 private:
24 template <class T> L1Obj makeL1Obj( T& t, L1Obj::TYPE type) {
25 L1Obj obj;
26 obj.bx = t.bx();
27 obj.q = t.quality();
28 obj.pt = t.ptValue();
29 obj.eta = t.etaValue();
30 obj.phi = t.phiValue();
31 //obj.charge = t.charge();
32 obj.type = type;
33 return obj;
34 }
35 private:
36 edm::ParameterSet theConfig;
37 std::vector<L1Obj> theL1Objs;
38 edm::EventNumber_t lastEvent;
39 edm::RunNumber_t lastRun;
40
41 };
42 #endif