ATLAS Offline Software
IdContext.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  Identifier package
7  -----------------------------------------
8  ***************************************************************************/
9 
10 
11 #ifndef IDENTIFIER_IDCONTEXT_H
12 # define IDENTIFIER_IDCONTEXT_H
13 
15 
16 
33 class IdContext
34 {
35 public:
36 
37  //
38  // Define public typedefs
39  //
41 
42  // default constructor
44  // with no prefix
47  // constructor with full initialization
54 
55  //
56  // accessors
57  //
58  const ExpandedIdentifier& prefix_id (void) const;
59 
60  // indices of the first/last identifier fields
61  size_type begin_index (void) const;
62  size_type end_index (void) const;
63 
64  //
65  // modifiers
66  //
67  void set (const ExpandedIdentifier& prefix,
70 
71 private:
72 
76 };
77 
78 
79 
81  :
82  m_begin_index(0),
83  m_end_index(0)
84 {}
85 
86 inline IdContext::IdContext(size_type begin_index,
87  size_type end_index)
88  :
89  m_begin_index(begin_index),
90  m_end_index(end_index)
91 {}
92 
93 inline const ExpandedIdentifier&
95 {
96  return (m_prefix);
97 }
98 
101 {
102  return (m_begin_index);
103 }
104 
105 inline IdContext::size_type
107 {
108  return (m_end_index);
109 }
110 
111 inline void
113  size_type begin_index,
114  size_type end_index)
115 {
116  m_prefix = prefix;
119 }
120 
121 #endif // IDENTIFIER_IDCONTEXT_H
IdContext::IdContext
IdContext()
Definition: IdContext.h:80
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:108
IdContext::end_index
size_type end_index(void) const
Definition: IdContext.h:106
IdContext::m_end_index
size_type m_end_index
Definition: IdContext.h:78
ExpandedIdentifier.h
IdContext::m_begin_index
size_type m_begin_index
Definition: IdContext.h:77
IdContext::set
void set(const ExpandedIdentifier &prefix, size_type begin_index, size_type end_index)
Definition: IdContext.h:112
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
IdContext::m_prefix
ExpandedIdentifier m_prefix
Definition: IdContext.h:76
IdContext::begin_index
size_type begin_index(void) const
Definition: IdContext.h:100
IdContext::size_type
ExpandedIdentifier::size_type size_type
Definition: IdContext.h:43
ExpandedIdentifier::size_type
boost::container::small_vector< element_type, 12 >::size_type size_type
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:122
IdContext::prefix_id
const ExpandedIdentifier & prefix_id(void) const
Definition: IdContext.h:94
IdContext
class IdContext
Definition: IdContext.h:34