ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
12#include <cstdint>
13
21
23public:
24
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
64private:
66 std::uint32_t m_onlineId;
67
69 bool fibreInRange(std::uint32_t f) const;
70
72 bool couldBeValid(std::uint32_t r);
73
75 bool rodIdInRange(std::uint32_t r, const bool usingDbCabling) const;
76
77};
78
79#endif
SCT_OnlineId is a class to hold an online id number and provide check on validity,...
std::uint32_t fibre() const
Return the fibre.
bool couldBeValid(std::uint32_t r)
Rough check on validity.
bool fibreInRange(std::uint32_t f) const
Simple range check.
bool is_valid() const
Check whether the onlineId is valid, without knowing the data source; this is a rough check.
std::uint32_t m_onlineId
The underlying number.
std::uint32_t rod() const
Return the rod/rob Id.
SCT_OnlineId & operator++()
Implement pre-increment and post-increment for iterating over fibres in a rod.
static bool rodIdInRange(std::uint32_t r)
Is the rod in range?
unsigned int index() const
Return an index in the range 0-9215, calculated from parts of the onlineId.
SCT_OnlineId()
Default constructor produces an invalid serial number.
int r
Definition globals.cxx:22