CMS 3D CMS Logo

CSCTriggerMapping.h
Go to the documentation of this file.
1 #ifndef CondFormats_CSCTriggerMapping_h
2 #define CondFormats_CSCTriggerMapping_h
3 
15 //@@ FIXME This whole design would better suit a Factory/Builder pattern
16 
18 
20 #include <vector>
21 #include <map>
22 
24 public:
27 
29  virtual ~CSCTriggerMapping();
30 
42  typedef struct CSCTriggerConnection {
44  CSCTriggerConnection(int rendcap,
45  int rstation,
46  int rsector,
47  int rsubsector,
48  int rcscid,
49  int cendcap,
50  int cstation,
51  int csector,
52  int csubsector,
53  int ccscid)
54  : rendcap_(rendcap),
55  rstation_(rstation),
56  rsector_(rsector),
57  rsubsector_(rsubsector),
58  rcscid_(rcscid),
59  cendcap_(cendcap),
60  cstation_(cstation),
61  csector_(csector),
62  csubsector_(csubsector),
63  ccscid_(ccscid) {}
65 
66  int rendcap_;
67  int rstation_;
68  int rsector_;
70  int rcscid_;
71  int cendcap_;
72  int cstation_;
73  int csector_;
75  int ccscid_;
76 
78  } Connection;
79 
85  // layer at end so it can have default arg
86  CSCDetId detId(int endcap, int station, int sector, int subsector, int cscid, int layer = 0) const;
87 
92  int chamber(int endcap, int station, int sector, int subsector, int cscid) const;
93 
97  virtual void fill(void) = 0;
98 
102  void addRecord(int rendcap,
103  int rstation,
104  int rsector,
105  int rsubsector,
106  int rcscid,
107  int cendcap,
108  int cstation,
109  int csector,
110  int csubsector,
111  int ccscid);
112 
116  void setDebugV(bool dbg) { debugV_ = dbg; }
117 
121  bool debugV(void) const { return debugV_; }
122 
126  const std::string& myName(void) const { return myName_; }
127 
128 private:
133  virtual int hwId(int endcap, int station, int sector, int subsector, int cscid) const = 0;
134 
140  int swId(int endcap, int station, int sector, int subsector, int cscid) const;
141 
144  std::vector<Connection> mapping_;
145  std::map<int, int> hw2sw_ COND_TRANSIENT;
146 
148 };
149 
150 #endif
CSCTriggerMapping::Connection
struct CSCTriggerMapping::CSCTriggerConnection Connection
CSCTriggerMapping::detId
CSCDetId detId(int endcap, int station, int sector, int subsector, int cscid, int layer=0) const
Definition: CSCTriggerMapping.cc:25
CSCTriggerMapping::hwId
virtual int hwId(int endcap, int station, int sector, int subsector, int cscid) const =0
CSCTriggerMapping::CSCTriggerConnection::rstation_
int rstation_
Definition: CSCTriggerMapping.h:67
CSCTriggerMapping::myName_
std::string myName_
Definition: CSCTriggerMapping.h:142
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCTriggerMapping::myName
const std::string & myName(void) const
Definition: CSCTriggerMapping.h:126
CSCTriggerMapping
Definition: CSCTriggerMapping.h:23
CSCTriggerMapping::CSCTriggerConnection::rcscid_
int rcscid_
Definition: CSCTriggerMapping.h:70
CSCTriggerMapping::CSCTriggerMapping
CSCTriggerMapping()
Default constructor.
Definition: CSCTriggerMapping.cc:5
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
COND_TRANSIENT
#define COND_TRANSIENT
Definition: Serializable.h:63
CSCTriggerMapping::CSCTriggerConnection::rsubsector_
int rsubsector_
Definition: CSCTriggerMapping.h:69
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCTriggerMapping::CSCTriggerConnection::cstation_
int cstation_
Definition: CSCTriggerMapping.h:72
CSCDetId.h
CSCTriggerMapping::CSCTriggerConnection::rsector_
int rsector_
Definition: CSCTriggerMapping.h:68
CSCTriggerMapping::setDebugV
void setDebugV(bool dbg)
Definition: CSCTriggerMapping.h:116
CSCTriggerMapping::swId
int swId(int endcap, int station, int sector, int subsector, int cscid) const
Definition: CSCTriggerMapping.cc:55
CSCTriggerMapping::CSCTriggerConnection::~CSCTriggerConnection
~CSCTriggerConnection()
Definition: CSCTriggerMapping.h:64
CSCTriggerMapping::CSCTriggerConnection::csubsector_
int csubsector_
Definition: CSCTriggerMapping.h:74
CSCTriggerMapping::addRecord
void addRecord(int rendcap, int rstation, int rsector, int rsubsector, int rcscid, int cendcap, int cstation, int csector, int csubsector, int ccscid)
Definition: CSCTriggerMapping.cc:31
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCTriggerMapping::hw2sw_
std::map< int, int > hw2sw_
Definition: CSCTriggerMapping.h:145
CSCTriggerMapping::CSCTriggerConnection::rendcap_
int rendcap_
Definition: CSCTriggerMapping.h:66
CSCTriggerMapping::CSCTriggerConnection::cendcap_
int cendcap_
Definition: CSCTriggerMapping.h:71
CSCDetId
Definition: CSCDetId.h:26
CSCTriggerMapping::~CSCTriggerMapping
virtual ~CSCTriggerMapping()
Destructor.
Definition: CSCTriggerMapping.cc:7
Serializable.h
CSCTriggerMapping::CSCTriggerConnection::ccscid_
int ccscid_
Definition: CSCTriggerMapping.h:75
CSCTriggerMapping::CSCTriggerConnection
Definition: CSCTriggerMapping.h:42
CSCTriggerMapping::chamber
int chamber(int endcap, int station, int sector, int subsector, int cscid) const
Definition: CSCTriggerMapping.cc:9
CSCTriggerMapping::debugV
bool debugV(void) const
Definition: CSCTriggerMapping.h:121
CSCTriggerMapping::CSCTriggerConnection::CSCTriggerConnection
CSCTriggerConnection()
Definition: CSCTriggerMapping.h:43
CSCTriggerMapping::debugV_
bool debugV_
Definition: CSCTriggerMapping.h:143
CSCTriggerMapping::CSCTriggerConnection::csector_
int csector_
Definition: CSCTriggerMapping.h:73
CSCTriggerMapping::CSCTriggerConnection::CSCTriggerConnection
CSCTriggerConnection(int rendcap, int rstation, int rsector, int rsubsector, int rcscid, int cendcap, int cstation, int csector, int csubsector, int ccscid)
Definition: CSCTriggerMapping.h:44
CSCTriggerMapping::mapping_
std::vector< Connection > mapping_
Definition: CSCTriggerMapping.h:144
CSCTriggerMapping::fill
virtual void fill(void)=0