ATLAS Offline Software
HGTD_DetectorElementCollection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // HGTD_DetectorElementCollection.h
8 // (c) ATLAS Detector software
10 
11 #ifndef HGTD_READOUTGEOMETRY_HGTD_DETECTORELEMENTCOLLECTION_H
12 #define HGTD_READOUTGEOMETRY_HGTD_DETECTORELEMENTCOLLECTION_H
13 
16 
17 class IdentifierHash;
18 
19 namespace InDetDD {
21 
22 namespace HGTDDetEl {
23 
24 inline
26  const HGTD_DetectorElementCollection& coll) {
27  const unsigned int value{hash.value()};
28  if (coll.size() <= value){
29  return nullptr;
30  }
31  return coll.at(value);
32 }
33 } // namespace HGTDDetEl
34 } // namespace InDetDD
35 #include "AthenaKernel/CLASS_DEF.h"
37 #include "AthenaKernel/CondCont.h"
39 
40 #endif // HGTD_READOUTGEOMETRY_HGTD_DETECTORELEMENTCOLLECTION_H
InDetDD::HGTD_DetectorElement
Definition: HGTD_DetectorElement.h:40
athena.value
value
Definition: athena.py:124
CONDCONT_MIXED_DEF
CONDCONT_MIXED_DEF(InDetDD::HGTD_DetectorElementCollection, 1258619755)
HGTD_DetectorElement.h
DataVector< HGTD_DetectorElement >
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:108
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDetDD::HGTDDetEl::getDetectorElement
const HGTD_DetectorElement * getDetectorElement(const IdentifierHash &hash, const HGTD_DetectorElementCollection &coll)
Definition: HGTD_DetectorElementCollection.h:25
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
CLASS_DEF.h
macros to associate a CLID to a type