ATLAS Offline Software
SCT_OnlineId.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 SCT_OnlineId_h
6 #define SCT_OnlineId_h
7 
12 #include <cstdint>
13 
23 public:
24 
26  SCT_OnlineId();
27 
29  SCT_OnlineId(const std::uint32_t onlineId);
30 
32  SCT_OnlineId(const std::uint32_t rodId, const std::uint32_t fibre);
33 
35  std::uint32_t rod() const;
36 
38  std::uint32_t fibre() const;
39 
41  operator unsigned int() const;
42 
44  bool is_valid(const bool usingDbCabling) const;
45 
47  bool is_valid() const;
48 
50  unsigned int index() const;
51 
53  static bool rodIdInRange(std::uint32_t r);
54 
56  enum {
58  };
59 
63 
64 private:
67 
69  bool fibreInRange(std::uint32_t f) const;
70 
73 
75  bool rodIdInRange(std::uint32_t r, const bool usingDbCabling) const;
76 
77 };
78 
79 #endif
beamspotman.r
def r
Definition: beamspotman.py:676
SCT_OnlineId::INVALID_ONLINE_ID
@ INVALID_ONLINE_ID
Definition: SCT_OnlineId.h:57
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
SCT_OnlineId::LAST_FIBRE
@ LAST_FIBRE
Definition: SCT_OnlineId.h:57
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SCT_OnlineId::FIRST_FIBRE
@ FIRST_FIBRE
Definition: SCT_OnlineId.h:57
SCT_OnlineId
Definition: SCT_OnlineId.h:22
SCT_OnlineId::INVALID_INDEX
@ INVALID_INDEX
Definition: SCT_OnlineId.h:57
SCT_OnlineId::MAX_INDEX
@ MAX_INDEX
Definition: SCT_OnlineId.h:57
SCT_OnlineId::INVALID_FIBRE
@ INVALID_FIBRE
Definition: SCT_OnlineId.h:57
SCT_OnlineId::rodIdInRange
static bool rodIdInRange(std::uint32_t r)
Is the rod in range?
Definition: SCT_OnlineId.cxx:93
SCT_OnlineId::couldBeValid
bool couldBeValid(std::uint32_t r)
Rough check on validity.
SCT_OnlineId::INVALID_ROD
@ INVALID_ROD
Definition: SCT_OnlineId.h:57
SCT_OnlineId::SCT_OnlineId
SCT_OnlineId()
Default constructor produces an invalid serial number.
Definition: SCT_OnlineId.cxx:23
SCT_OnlineId::operator++
SCT_OnlineId & operator++()
Implement pre-increment and post-increment for iterating over fibres in a rod.
Definition: SCT_OnlineId.cxx:43
SCT_OnlineId::NUMBER_OF_INDICES
@ NUMBER_OF_INDICES
Definition: SCT_OnlineId.h:57
hist_file_dump.f
f
Definition: hist_file_dump.py:135
SCT_OnlineId::index
unsigned int index() const
Return an index in the range 0-9215, calculated from parts of the onlineId.
Definition: SCT_OnlineId.cxx:112
SCT_OnlineId::NUM_FIBRES
@ NUM_FIBRES
Definition: SCT_OnlineId.h:57
SCT_OnlineId::m_onlineId
std::uint32_t m_onlineId
The underlying number.
Definition: SCT_OnlineId.h:66
SCT_OnlineId::fibre
std::uint32_t fibre() const
Return the fibre.
Definition: SCT_OnlineId.cxx:65
SCT_OnlineId::fibreInRange
bool fibreInRange(std::uint32_t f) const
Simple range check.
Definition: SCT_OnlineId.cxx:88
SCT_OnlineId::rod
std::uint32_t rod() const
Return the rod/rob Id.
Definition: SCT_OnlineId.cxx:59
SCT_OnlineId::is_valid
bool is_valid() const
Check whether the onlineId is valid, without knowing the data source; this is a rough check.
Definition: SCT_OnlineId.cxx:82