ATLAS Offline Software
Loading...
Searching...
No Matches
DataPreparationAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRK_DATA_PREPARATION_ALG_H
6#define ACTSTRK_DATA_PREPARATION_ALG_H
7
10#include "GaudiKernel/ToolHandle.h"
18
19#include <set>
20
21// Cache
24#include "src/Cache.h"
25
26namespace ActsTrk {
27
28 template <typename external_collection_t,
29 typename external_detector_element_collection_t,
30 bool useCache>
32 : public AthReentrantAlgorithm {
33 public:
34 using object_t = typename external_collection_t::base_value_type;
35 using input_collection_t = external_collection_t;
37
40
41 DataPreparationAlg(const std::string& name, ISvcLocator* pSvcLocator);
42 virtual ~DataPreparationAlg() override = default;
43
44 virtual StatusCode initialize() override;
45 virtual StatusCode execute(const EventContext& ctx) const override;
46 virtual StatusCode finalize() override;
47
48 protected:
50
51 // Common way of fetching the hash ids from the RoI(s)
52 virtual StatusCode fetchIdHashes(const EventContext& ctx,
53 std::set<IdentifierHash>& hashes) const;
54
55 private:
56 // Different ways of filling the output collection
57 StatusCode fill(const EventContext& ctx,
58 output_collection_t& outputCollection) const;
59
60 StatusCode fill(const EventContext& ctx,
61 output_collection_t& outputCollection) const
62 requires (useCache == true);
63
64 protected:
65 ToolHandle< GenericMonitoringTool > m_monTool {this, "MonTool", "",
66 "Monitoring tool"};
67
68 ToolHandle<IRegSelTool> m_regionSelector {this, "RegSelTool", "",
69 "Region selector tool"};
70
72 "Key of input DetectorElementCollection"};
73
75 "Input Collection that will go throug selection process"};
76
79
81 "Map of used measurements from previous tracking pass"};
82
84 "Output Collection - result of the selection process"};
85
87 "The input IDC container"};
88
89 private:
95
96 mutable std::array<std::atomic<unsigned int>, kNStat> m_stat ATLAS_THREAD_SAFE {};
97 };
98
99} // namespace
100
101#include "DataPreparationAlg.icc"
102
103#endif
This class is a general container which can hold objects of accessed by an IdentifierHash For more in...
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
SG::ReadHandleKey< IDC > ReadHandleKey
Definition Cache.h:49
SG::ReadHandle< IDC > ReadHandle
Definition Cache.h:50
ConstDataVector< input_collection_t > output_collection_t
SG::ReadHandleKey< input_collection_t > m_inputCollectionKey
StatusCode fill(const EventContext &ctx, output_collection_t &outputCollection) const
ToolHandle< IRegSelTool > m_regionSelector
cache_read_handle_key_t m_inputIdentifiableContainer
StatusCode fill(const EventContext &ctx, output_collection_t &outputCollection) const
std::array< std::atomic< unsigned int >, kNStat > m_stat ATLAS_THREAD_SAFE
virtual StatusCode execute(const EventContext &ctx) const override
typename external_collection_t::base_value_type object_t
typename ActsTrk::Cache::Handles< object_t >::ReadHandle cache_read_handle_t
SG::ReadCondHandleKey< external_detector_element_collection_t > m_detEleCollKey
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
virtual StatusCode finalize() override
typename ActsTrk::Cache::Handles< object_t >::ReadHandleKey cache_read_handle_key_t
virtual xAOD::DetectorIDHashType retrieveDetectorIDHash(const object_t &obj) const
SG::ReadHandleKey< ActsTrk::PrepRawDataAssociation > m_inputPrdMap
SG::WriteHandleKey< output_collection_t > m_outputCollectionKey
DataPreparationAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode fetchIdHashes(const EventContext &ctx, std::set< IdentifierHash > &hashes) const
external_collection_t input_collection_t
ToolHandle< GenericMonitoringTool > m_monTool
virtual StatusCode initialize() override
virtual ~DataPreparationAlg() override=default
An algorithm that can be simultaneously executed in multiple threads.
DataVector adapter that acts like it holds const pointers.
Property holding a SG store/key/clid from which a WriteHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
unsigned int DetectorIDHashType
@ detector ID element hash