ATLAS Offline Software
CSC_Hid2RESrcID.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCSC_CNVTOOLS_CSC_HID2RESRCID
6 #define MUONCSC_CNVTOOLS_CSC_HID2RESRCID
7 
8 #include <inttypes.h>
9 
11 
12 class Identifier;
13 class CscIdHelper;
15 
16 /* this class provides conversion between CSC RDO Id and RESrcID.
17  RESrcID is used for identifying each ROD.
18 
19  Author: Ketevi A. Assamagan
20  BNL December 27 2003
21  Following Tadashi's example for TGC
22 
23 */
25 public:
30  m_cabling = nullptr;
31  m_cscIdHelper = nullptr;
32  m_isCosmic = false;
33  m_isOldCosmic = false;
34  m_robIDs.clear();
35  }
36 
39  CSC_Hid2RESrcID(CSCcablingSvc* p_cabling, const CscIdHelper* cscId) { this->set(p_cabling, cscId); }
40 
43  ~CSC_Hid2RESrcID() = default;
44 
48  void set(CSCcablingSvc* p_cabling, const CscIdHelper* cscId) {
49  m_cabling = p_cabling;
50  m_cscIdHelper = cscId;
51  m_isCosmic = false;
52  m_isOldCosmic = false;
53  this->fillAllRobIds();
54  }
55 
57  void set_isCosmic() { m_isCosmic = true; }
58 
60  void set_isOldCosmic() { m_isOldCosmic = true; }
61 
65  uint32_t getRodID(const CscRawDataCollection* rdo) const;
66  uint32_t getRodID(uint16_t subId, uint16_t rodId) const;
67 
70  uint32_t getRodID(const Identifier& offlineId) const;
71 
74  uint32_t getRobID(uint32_t rod_id) const;
75 
78  uint32_t getRosID(uint32_t rob_id) const;
79 
82  uint32_t getDetID(uint32_t ros_id) const;
83 
85  const std::vector<uint32_t>& allRobIds() const { return m_robIDs; }
86 
87 private:
89  void fillAllRobIds();
90 
91 private:
92  bool m_isCosmic;
96  std::vector<uint32_t> m_robIDs;
97 };
98 
99 #endif
CSC_Hid2RESrcID::m_robIDs
std::vector< uint32_t > m_robIDs
Definition: CSC_Hid2RESrcID.h:96
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CSC_Hid2RESrcID::getRosID
uint32_t getRosID(uint32_t rob_id) const
Make a ROS Source ID from a ROB source ID.
Definition: CSC_Hid2RESrcID.cxx:95
CSC_Hid2RESrcID::getRodID
uint32_t getRodID(const CscRawDataCollection *rdo) const
Make a ROD Source ID for CSC RDO.
Definition: CSC_Hid2RESrcID.cxx:16
CSC_Hid2RESrcID::getRobID
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
Definition: CSC_Hid2RESrcID.cxx:49
CSC_Hid2RESrcID::CSC_Hid2RESrcID
CSC_Hid2RESrcID(CSCcablingSvc *p_cabling, const CscIdHelper *cscId)
the full constructor
Definition: CSC_Hid2RESrcID.h:39
CSC_Hid2RESrcID
Definition: CSC_Hid2RESrcID.h:24
CSC_Hid2RESrcID::allRobIds
const std::vector< uint32_t > & allRobIds() const
return all the ROB IDs
Definition: CSC_Hid2RESrcID.h:85
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
CSC_Hid2RESrcID::getDetID
uint32_t getDetID(uint32_t ros_id) const
Make a SubDetector ID from ROS source ID.
Definition: CSC_Hid2RESrcID.cxx:105
CSC_Hid2RESrcID::m_isOldCosmic
bool m_isOldCosmic
Definition: CSC_Hid2RESrcID.h:93
CSCcablingSvc
Definition: CSCcablingSvc.h:23
CSC_Hid2RESrcID::m_cscIdHelper
const CscIdHelper * m_cscIdHelper
Definition: CSC_Hid2RESrcID.h:95
CSC_Hid2RESrcID::m_isCosmic
bool m_isCosmic
Definition: CSC_Hid2RESrcID.h:92
CscRawDataCollection
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.
Definition: CscRawDataCollection.h:24
CSC_Hid2RESrcID::set_isCosmic
void set_isCosmic()
this is cosmic data
Definition: CSC_Hid2RESrcID.h:57
CSC_Hid2RESrcID::fillAllRobIds
void fillAllRobIds()
fill all the ROB ids
Definition: CSC_Hid2RESrcID.cxx:63
CSC_Hid2RESrcID::set
void set(CSCcablingSvc *p_cabling, const CscIdHelper *cscId)
initialize the identifier helper
Definition: CSC_Hid2RESrcID.h:48
CscIdHelper
Definition: CscIdHelper.h:52
CSC_Hid2RESrcID::set_isOldCosmic
void set_isOldCosmic()
to read the old cosmic data before the ROB id = ROD id fix
Definition: CSC_Hid2RESrcID.h:60
CSC_Hid2RESrcID::~CSC_Hid2RESrcID
~CSC_Hid2RESrcID()=default
destructor
CSC_Hid2RESrcID::CSC_Hid2RESrcID
CSC_Hid2RESrcID()
default constrcutor you must then use the set method to set the cabling service and the id helper
Definition: CSC_Hid2RESrcID.h:29
CSC_Hid2RESrcID::m_cabling
CSCcablingSvc * m_cabling
Definition: CSC_Hid2RESrcID.h:94
CSCcablingSvc.h
Identifier
Definition: IdentifierFieldParser.cxx:14