CMS 3D CMS Logo

MuonsGrabber.h
Go to the documentation of this file.
1 #ifndef L1Trigger_RPCTrigger_MuonsGrabber_h
2 #define L1Trigger_RPCTrigger_MuonsGrabber_h
3 // -*- C++ -*-
4 //
5 // Package: RPCTrigger
6 // Class : MuonsGrabber
7 //
16 //
17 // Original Author:
18 // Created: Thu Sep 17 14:20:56 CEST 2009
19 // $Id$
20 //
21 
22 // system include files
23 
24 // user include files
25 
26 // forward declarations
27 
30 
31 #include <map>
32 #include <vector>
33 
34 //#include "FWCore/Concurrency/interface/Xerces.h"
35 //#include <xercesc/util/XMLString.hpp>
36 #include <xercesc/dom/DOM.hpp>
37 //#include <xercesc/framework/LocalFileFormatTarget.hpp>
38 
39 
41  RPCMuonExtraStruct(signed char l, signed char r, signed char h, signed char i, RPCTBMuon & mu):
42  _level(l) , _region(r), _hsHalf(h), _index(i), _mu(mu){};
43  signed char _level;
44  signed char _region; // brl/endcap
45  signed char _hsHalf; // Determines which halfsorter
46  signed char _index;
48  static bool lvlCompare(const RPCMuonExtraStruct &a, const RPCMuonExtraStruct &b) {
49  return a._level > b._level;
50  };
51 };
52 
54 {
55 
56  MuonsGrabber();
57  virtual ~MuonsGrabber();
58  public:
59  static MuonsGrabber & Instance();
60 
61  void setRPCBasicTrigConfig(RPCBasicTrigConfig * c) {m_trigConfig = c;};
62 
63  void startNewEvent(int event, int bx);
64  void writeDataForRelativeBX(int bx);
65  void addMuon(RPCTBMuon & mu, int lvl, int region, int hs, int index);
66 
67  private:
68  MuonsGrabber(const MuonsGrabber&) = delete; // stop default
69 
70  const MuonsGrabber& operator=(const MuonsGrabber&) = delete; // stop default
71  std::string IntToString(int i);
72 
73  // ---------- member data --------------------------------
74  //std::map<int, std::vector< RPCTBMuon > > m_muons;
75  std::vector< RPCMuonExtraStruct > m_muons;
77 
80  XERCES_CPP_NAMESPACE::DOMImplementation* m_dom;
81  XERCES_CPP_NAMESPACE::DOMDocument* m_doc;
82  XERCES_CPP_NAMESPACE::DOMElement* m_rootElem;
83  XERCES_CPP_NAMESPACE::DOMElement* m_currEvent;
84 };
85 
86 
87 #endif
signed char _region
Definition: MuonsGrabber.h:44
RPCMuonExtraStruct(signed char l, signed char r, signed char h, signed char i, RPCTBMuon &mu)
Definition: MuonsGrabber.h:41
XERCES_CPP_NAMESPACE::DOMImplementation * m_dom
Definition: MuonsGrabber.h:80
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
signed char _index
Definition: MuonsGrabber.h:46
void setRPCBasicTrigConfig(RPCBasicTrigConfig *c)
Definition: MuonsGrabber.h:61
static bool lvlCompare(const RPCMuonExtraStruct &a, const RPCMuonExtraStruct &b)
Definition: MuonsGrabber.h:48
RPCBasicTrigConfig * m_trigConfig
Definition: MuonsGrabber.h:76
signed char _hsHalf
Definition: MuonsGrabber.h:45
XERCES_CPP_NAMESPACE::DOMElement * m_rootElem
Definition: MuonsGrabber.h:82
const int mu
Definition: Constants.h:22
XERCES_CPP_NAMESPACE::DOMDocument * m_doc
Definition: MuonsGrabber.h:81
std::vector< RPCMuonExtraStruct > m_muons
Definition: MuonsGrabber.h:75
XERCES_CPP_NAMESPACE::DOMElement * m_currEvent
Definition: MuonsGrabber.h:83
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
int m_currentEvent
Definition: MuonsGrabber.h:78
signed char _level
Definition: MuonsGrabber.h:42
Definition: event.py:1