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 "Utilities/Xerces/interface/Xerces.h"
35 //#include <xercesc/util/XMLString.hpp>
36 #include <xercesc/dom/DOM.hpp>
37 //#include <xercesc/framework/LocalFileFormatTarget.hpp>
38 
40  RPCMuonExtraStruct(signed char l, signed char r, signed char h, signed char i, RPCTBMuon& mu)
41  : _level(l), _region(r), _hsHalf(h), _index(i), _mu(mu){};
42  signed char _level;
43  signed char _region; // brl/endcap
44  signed char _hsHalf; // Determines which halfsorter
45  signed char _index;
47  static bool lvlCompare(const RPCMuonExtraStruct& a, const RPCMuonExtraStruct& b) { return a._level > b._level; };
48 };
49 
50 class MuonsGrabber {
51  MuonsGrabber();
52  virtual ~MuonsGrabber();
53 
54 public:
55  static MuonsGrabber& Instance();
56 
57  MuonsGrabber(const MuonsGrabber&) = delete; // stop default
58 
59  const MuonsGrabber& operator=(const MuonsGrabber&) = delete; // stop default
60 
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:
69 
70  // ---------- member data --------------------------------
71  //std::map<int, std::vector< RPCTBMuon > > m_muons;
72  std::vector<RPCMuonExtraStruct> m_muons;
74 
77  XERCES_CPP_NAMESPACE::DOMImplementation* m_dom;
78  XERCES_CPP_NAMESPACE::DOMDocument* m_doc;
79  XERCES_CPP_NAMESPACE::DOMElement* m_rootElem;
80  XERCES_CPP_NAMESPACE::DOMElement* m_currEvent;
81 };
82 
83 #endif
signed char _region
Definition: MuonsGrabber.h:43
RPCMuonExtraStruct(signed char l, signed char r, signed char h, signed char i, RPCTBMuon &mu)
Definition: MuonsGrabber.h:40
XERCES_CPP_NAMESPACE::DOMImplementation * m_dom
Definition: MuonsGrabber.h:77
std::vector< RPCMuonExtraStruct > m_muons
Definition: MuonsGrabber.h:72
std::string IntToString(int i)
const MuonsGrabber & operator=(const MuonsGrabber &)=delete
signed char _index
Definition: MuonsGrabber.h:45
static MuonsGrabber & Instance()
Definition: MuonsGrabber.cc:48
void setRPCBasicTrigConfig(RPCBasicTrigConfig *c)
Definition: MuonsGrabber.h:61
static bool lvlCompare(const RPCMuonExtraStruct &a, const RPCMuonExtraStruct &b)
Definition: MuonsGrabber.h:47
void startNewEvent(int event, int bx)
RPCBasicTrigConfig * m_trigConfig
Definition: MuonsGrabber.h:73
signed char _hsHalf
Definition: MuonsGrabber.h:44
XERCES_CPP_NAMESPACE::DOMElement * m_rootElem
Definition: MuonsGrabber.h:79
XERCES_CPP_NAMESPACE::DOMDocument * m_doc
Definition: MuonsGrabber.h:78
XERCES_CPP_NAMESPACE::DOMElement * m_currEvent
Definition: MuonsGrabber.h:80
double b
Definition: hdecay.h:118
void addMuon(RPCTBMuon &mu, int lvl, int region, int hs, int index)
double a
Definition: hdecay.h:119
virtual ~MuonsGrabber()
Definition: MuonsGrabber.cc:82
int m_currentEvent
Definition: MuonsGrabber.h:75
signed char _level
Definition: MuonsGrabber.h:41
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void writeDataForRelativeBX(int bx)
Definition: event.py:1