ATLAS Offline Software
CollectionDataPreparationAlg.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 namespace ActsTrk {
6 
7  // Pixel Clusters
8  inline
9  xAOD::DetectorIDHashType PixelClusterDataPreparationAlg::retrieveDetectorIDHash(const xAOD::PixelCluster& obj) const
10  { return obj.identifierHash(); }
11 
12  // Strip Clusters
13  inline
14  xAOD::DetectorIDHashType StripClusterDataPreparationAlg::retrieveDetectorIDHash(const xAOD::StripCluster& obj) const
15  { return obj.identifierHash(); }
16 
17  // Hgtd Clusters
18  inline
19  xAOD::DetectorIDHashType HgtdClusterDataPreparationAlg::retrieveDetectorIDHash(const xAOD::HGTDCluster& obj) const
20  { return obj.identifierHash(); }
21 
22  inline
23  StatusCode HgtdClusterDataPreparationAlg::fetchIdHashes(const EventContext& ctx,
24  std::set<IdentifierHash>& hashes) const
25  {
26  ATH_MSG_DEBUG("Retrieving Input Collection with key `" << m_inputCollectionKey.key() << "` for retrieving all idHashes");
27  SG::ReadHandle< input_collection_t > inputHandle = SG::makeHandle( m_inputCollectionKey, ctx );
28  ATH_CHECK(inputHandle.isValid());
29  const input_collection_t* inputCollection = inputHandle.cptr();
30 
31  for (const xAOD::HGTDCluster* cluster : *inputCollection) {
32  hashes.insert( retrieveDetectorIDHash(*cluster) );
33  }
34 
35  return StatusCode::SUCCESS;
36  }
37 
38  // SpacePoints
39  inline
40  xAOD::DetectorIDHashType SpacePointDataPreparationAlg::retrieveDetectorIDHash(const xAOD::SpacePoint& obj) const
41  { return obj.elementIdList()[0]; }
42 
43 } // namespace
44 
45 
46