ATLAS Offline Software
Loading...
Searching...
No Matches
IDC_OverlayCommon.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Dear emacs, this is -*-c++-*-
6
18
19#ifndef IDC_OVERLAYCOMMON_H
20#define IDC_OVERLAYCOMMON_H
21
22#include <memory>
23
26
27namespace 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 */
37template <class Collection>
38std::unique_ptr<Collection> copyCollection(const IdentifierHash &hashId,
39 const Collection *collection);
40
41template <typename Collection, typename Type>
42std::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 */
52template <typename Collection, typename Alg>
53void mergeCollections(Collection *bkgCollection,
54 Collection *signalCollection,
55 Collection *outputCollection,
56 const Alg *algorithm);
57
58template <typename Type, typename Collection, typename Alg>
59void mergeCollections(Collection *bkgCollection,
60 Collection *signalCollection,
61 Collection *outputCollection,
62 const Alg *algorithm,
63 DataPool<Type>& dataItems);
64
65template <typename Type, typename Collection, typename Alg>
66void mergeSortedCollections(Collection *bkgCollection,
67 Collection *signalCollection,
68 Collection *outputCollection,
69 const Alg *algorithm,
70 DataPool<Type>& dataItems);
71
72/*
73 * We have a dummy implementation of this.
74 * Algorithms have to specialize this.
75 */
76template<class Datum, class Alg>
77void mergeChannelData(Datum &baseDatum,
78 const Datum &additionalDatum,
79 const Alg *algorithm);
80
81/*
82 * Algorithms have to specialize this if used.
83 */
84template <typename Collection>
85void sortCollection(Collection *collection);
86
87} // namespace Overlay
88
90
91#endif
a typed memory pool that saves time spent allocation small object.
Definition DataPool.h:63
This is a "hash" representation of an Identifier.
std::string algorithm
Definition hcg.cxx:85
Helpers for overlaying Identifiable Containers.
void mergeChannelData(HGTD_RDO &, const HGTD_RDO &, const IDC_OverlayBase *algorithm)
void sortCollection(PixelRDO_Collection *collection)
void mergeSortedCollections(Collection *bkgCollection, Collection *signalCollection, Collection *outputCollection, const Alg *algorithm, DataPool< Type > &dataItems)
std::unique_ptr< HGTD_RDO_Collection > copyCollection(const IdentifierHash &hashId, const HGTD_RDO_Collection *collection)
void mergeCollections(SCT_RDO_Collection *bkgCollection, SCT_RDO_Collection *signalCollection, SCT_RDO_Collection *outputCollection, const IDC_OverlayBase *algorithm, DataPool< SCT3_RawData > &dataItems)