12 int hid =
hwId( endcap, station, sector, subsector, cscid );
14 std::map<int,int>::const_iterator it = hw2sw_.find( hid );
15 if ( it != hw2sw_.end() ) {
17 if (
debugV() )
std::cout << myName_ <<
": for requested hw id = " << hid <<
18 ", found sw id = " << cid << std::endl;
21 std::cout << myName_ <<
": ERROR, cannot find requested hw id = " << hid <<
22 " in mapping." << std::endl;
28 int cid =
chamber( endcap, station, sector, subsector, cscid );
29 int lid = cid + layer;
34 int cendcap,
int cstation,
int csector,
int csubsector,
int ccscid ) {
36 Connection newRecord( rendcap, rstation, rsector, rsubsector, rcscid, cendcap, cstation, csector, csubsector, ccscid );
38 int hid =
hwId( rendcap, rstation, rsector, rsubsector, rcscid );
39 int sid =
swId( cendcap, cstation, csector, csubsector, ccscid );
40 if (
debugV() )
std::cout << myName_ <<
": map hw " << hid <<
" to sw " << sid << std::endl;
41 if ( hw2sw_.insert( std::make_pair( hid, sid) ).second ) {
42 if (
debugV() )
std::cout << myName_ <<
": insert pair succeeded." << std::endl;
45 std::cout << myName_ <<
": ERROR, already have key = " << hid << std::endl;
int chamber(int endcap, int station, int sector, int subsector, int cscid) const
static int rawIdMaker(int iendcap, int istation, int iring, int ichamber, int ilayer)
static int ringFromTriggerLabels(int station, int triggerCSCID)
CSCTriggerMapping()
Default constructor.
void addRecord(int rendcap, int rstation, int rsector, int rsubsector, int rcscid, int cendcap, int cstation, int csector, int csubsector, int ccscid)
std::vector< Connection > mapping_
virtual ~CSCTriggerMapping()
Destructor.
int swId(int endcap, int station, int sector, int subsector, int cscid) const
CSCDetId detId(int endcap, int station, int sector, int subsector, int cscid, int layer=0) const
volatile std::atomic< bool > shutdown_flag false
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
virtual int hwId(int endcap, int station, int sector, int subsector, int cscid) const =0