File indexing completed on 2024-04-06 12:21:38
0001 #ifndef RPCWHEEL_H
0002 #define RPCWHEEL_H 1
0003
0004
0005 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCEmulator.h"
0006 #include "L1Trigger/RPCTechnicalTrigger/interface/TTUInput.h"
0007 #include "CondFormats/RPCObjects/interface/RBCBoardSpecs.h"
0008
0009 #include <vector>
0010 #include <map>
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 void print_wheel(const TTUInput&);
0022
0023 class RPCWheel {
0024 public:
0025
0026 RPCWheel();
0027 RPCWheel(RPCWheel&&) = default;
0028 RPCWheel& operator=(RPCWheel&&) = default;
0029
0030 void setProperties(int);
0031
0032 void setProperties(int, const char*);
0033
0034 void setProperties(int, const char*, const char*);
0035
0036 void setSpecifications(const RBCBoardSpecs*);
0037
0038 bool initialise();
0039
0040 void emulate();
0041
0042 bool process(int, const std::map<int, RBCInput*>&);
0043
0044 bool process(int, const std::map<int, TTUInput*>&);
0045
0046 void createWheelMap();
0047
0048 void retrieveWheelMap(TTUInput&);
0049
0050 int getid() const { return m_id; };
0051
0052 void printinfo() const;
0053
0054 void print_wheel(const TTUInput&) const;
0055
0056 protected:
0057 private:
0058 std::vector<std::unique_ptr<RBCEmulator>> m_RBCE;
0059
0060 int m_id;
0061 static constexpr int m_maxrbc = 6;
0062 static constexpr int m_maxlayers = 6;
0063 static constexpr int m_maxsectors = 12;
0064
0065
0066
0067 std::bitset<12> m_rbcDecision;
0068 std::array<std::bitset<6>, 12> m_wheelmap;
0069
0070 bool m_debug;
0071 };
0072
0073 #endif