ATLAS Offline Software
IDC_OverlayCommon.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 // Dear emacs, this is -*-c++-*-
6 
19 #ifndef IDC_OVERLAYCOMMON_H
20 #define IDC_OVERLAYCOMMON_H
21 
22 #include <memory>
23 
25 #include "AthAllocators/DataPool.h"
26 
27 namespace Overlay
28 {
29 
30 /*
31  * We do not have implementations for these.
32  * A concrete algorithm inheriting from
33  * IDC_OverlayBase will have to specialize
34  * one of the two based on if uses
35  * DataPool or not
36  */
37 template <class Collection>
38 std::unique_ptr<Collection> copyCollection(const IdentifierHash &hashId,
39  const Collection *collection);
40 
41 template <typename Collection, typename Type>
42 std::unique_ptr<Collection> copyCollection(const IdentifierHash &hashId,
43  const Collection *collection,
44  DataPool<Type>& dataItems);
45 /*
46  * We have implementations for these.
47  * A concrete algorithm inheriting from
48  * IDC_OverlayBase could potentially specialize
49  * one of the two based on if uses
50  * DataPool or not
51  */
52 template <typename Collection, typename Alg>
53 void mergeCollections(Collection *bkgCollection,
54  Collection *signalCollection,
56  const Alg *algorithm);
57 
58 template <typename Type, typename Collection, typename Alg>
59 void mergeCollections(Collection *bkgCollection,
60  Collection *signalCollection,
62  const Alg *algorithm,
63  DataPool<Type>& dataItems);
64 
65 /*
66  * We have a dummy implementation of this.
67  * Algorithms have to specialize this.
68  */
69 template<class Datum, class Alg>
70 void mergeChannelData(Datum &baseDatum,
71  const Datum &additionalDatum,
72  const Alg *algorithm);
73 
74 
75 } // namespace Overlay
76 
78 
79 #endif
algorithm
std::string algorithm
Definition: hcg.cxx:82
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
IDC_OverlayCommon.icc
Overlay::mergeChannelData
void mergeChannelData(HGTD_RDO &, const HGTD_RDO &, const IDC_OverlayBase *algorithm)
Definition: HGTD_Overlay.cxx:14
Overlay::copyCollection
std::unique_ptr< HGTD_RDO_Collection > copyCollection(const IdentifierHash &hashId, const HGTD_RDO_Collection *collection)
Definition: HGTD_Overlay.cxx:24
DataPool.h
postInclude.outputCollection
outputCollection
Definition: postInclude.SortInput.py:27
IdentifierHash.h
Overlay::mergeCollections
void mergeCollections(SCT_RDO_Collection *bkgCollection, SCT_RDO_Collection *signalCollection, SCT_RDO_Collection *outputCollection, const IDC_OverlayBase *algorithm, DataPool< SCT3_RawData > &dataItems)
Definition: SCTOverlay.cxx:48
Overlay
Helpers for overlaying Identifiable Containers.
Definition: HGTD_Overlay.cxx:11
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:47
IdentifierHash
Definition: IdentifierHash.h:38