ATLAS Offline Software
Loading...
Searching...
No Matches
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
12class Identifier;
13class 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*/
25public:
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
47
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
64
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
87private:
89 void fillAllRobIds();
90
91private:
96 std::vector<uint32_t> m_robIDs;
97};
98
99#endif
CSC_Hid2RESrcID(CSCcablingSvc *p_cabling, const CscIdHelper *cscId)
the full constructor
std::vector< uint32_t > m_robIDs
uint32_t getRosID(uint32_t rob_id) const
Make a ROS Source ID from a ROB source ID.
CSCcablingSvc * m_cabling
CSC_Hid2RESrcID()
default constrcutor you must then use the set method to set the cabling service and the id helper
const std::vector< uint32_t > & allRobIds() const
return all the ROB IDs
const CscIdHelper * m_cscIdHelper
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
uint32_t getRodID(const CscRawDataCollection *rdo) const
Make a ROD Source ID for CSC RDO.
void set(CSCcablingSvc *p_cabling, const CscIdHelper *cscId)
initialize the identifier helper
~CSC_Hid2RESrcID()=default
destructor
uint32_t getDetID(uint32_t ros_id) const
Make a SubDetector ID from ROS source ID.
void set_isCosmic()
this is cosmic data
void fillAllRobIds()
fill all the ROB ids
void set_isOldCosmic()
to read the old cosmic data before the ROB id = ROD id fix
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.