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  void setRPCBasicTrigConfig(RPCBasicTrigConfig* c) { m_trigConfig = c; };
58 
59  void startNewEvent(int event, int bx);
60  void writeDataForRelativeBX(int bx);
61  void addMuon(RPCTBMuon& mu, int lvl, int region, int hs, int index);
62 
63 private:
64  MuonsGrabber(const MuonsGrabber&) = delete; // stop default
65 
66  const MuonsGrabber& operator=(const MuonsGrabber&) = delete; // stop default
67  std::string IntToString(int i);
68 
69  // ---------- member data --------------------------------
70  //std::map<int, std::vector< RPCTBMuon > > m_muons;
71  std::vector<RPCMuonExtraStruct> m_muons;
73 
76  XERCES_CPP_NAMESPACE::DOMImplementation* m_dom;
77  XERCES_CPP_NAMESPACE::DOMDocument* m_doc;
78  XERCES_CPP_NAMESPACE::DOMElement* m_rootElem;
79  XERCES_CPP_NAMESPACE::DOMElement* m_currEvent;
80 };
81 
82 #endif
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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:76
std::vector< RPCMuonExtraStruct > m_muons
Definition: MuonsGrabber.h:71
signed char _index
Definition: MuonsGrabber.h:45
void setRPCBasicTrigConfig(RPCBasicTrigConfig *c)
Definition: MuonsGrabber.h:57
static bool lvlCompare(const RPCMuonExtraStruct &a, const RPCMuonExtraStruct &b)
Definition: MuonsGrabber.h:47
RPCBasicTrigConfig * m_trigConfig
Definition: MuonsGrabber.h:72
signed char _hsHalf
Definition: MuonsGrabber.h:44
XERCES_CPP_NAMESPACE::DOMElement * m_rootElem
Definition: MuonsGrabber.h:78
XERCES_CPP_NAMESPACE::DOMDocument * m_doc
Definition: MuonsGrabber.h:77
XERCES_CPP_NAMESPACE::DOMElement * m_currEvent
Definition: MuonsGrabber.h:79
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
int m_currentEvent
Definition: MuonsGrabber.h:74
signed char _level
Definition: MuonsGrabber.h:41
Definition: event.py:1