Go to the documentation of this file.00001 #ifndef L1Trigger_RPCTrigger_MuonsGrabber_h
00002 #define L1Trigger_RPCTrigger_MuonsGrabber_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "L1Trigger/RPCTrigger/interface/RPCTBMuon.h"
00029 #include "L1Trigger/RPCTrigger/interface/RPCBasicTrigConfig.h"
00030
00031 #include <map>
00032 #include <vector>
00033
00034
00035
00036 #include <xercesc/dom/DOM.hpp>
00037
00038
00039
00040 struct RPCMuonExtraStruct {
00041 RPCMuonExtraStruct(signed char l, signed char r, signed char h, signed char i, RPCTBMuon & mu):
00042 _level(l) , _region(r), _hsHalf(h), _index(i), _mu(mu){};
00043 signed char _level;
00044 signed char _region;
00045 signed char _hsHalf;
00046 signed char _index;
00047 RPCTBMuon _mu;
00048 static bool lvlCompare(const RPCMuonExtraStruct &a, const RPCMuonExtraStruct &b) {
00049 return a._level > b._level;
00050 };
00051 };
00052
00053 class MuonsGrabber
00054 {
00055
00056 MuonsGrabber();
00057 virtual ~MuonsGrabber();
00058 public:
00059 static MuonsGrabber & Instance();
00060
00061 void setRPCBasicTrigConfig(RPCBasicTrigConfig * c) {m_trigConfig = c;};
00062
00063 void startNewEvent(int event, int bx);
00064 void writeDataForRelativeBX(int bx);
00065 void addMuon(RPCTBMuon & mu, int lvl, int region, int hs, int index);
00066
00067 private:
00068 MuonsGrabber(const MuonsGrabber&);
00069
00070 const MuonsGrabber& operator=(const MuonsGrabber&);
00071 std::string IntToString(int i);
00072
00073
00074
00075 std::vector< RPCMuonExtraStruct > m_muons;
00076 RPCBasicTrigConfig* m_trigConfig;
00077
00078 int m_currentEvent;
00079 int m_currentBX;
00080 XERCES_CPP_NAMESPACE::DOMImplementation* m_dom;
00081 XERCES_CPP_NAMESPACE::DOMDocument* m_doc;
00082 XERCES_CPP_NAMESPACE::DOMElement* m_rootElem;
00083 XERCES_CPP_NAMESPACE::DOMElement* m_currEvent;
00084 };
00085
00086
00087 #endif