ATLAS Offline Software
Loading...
Searching...
No Matches
RingerProcedureWrapper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id: RingerProcedureWrapper.h 704615 2015-10-29 18:50:12Z wsfreund $
6#ifndef RINGERSELECTORTOOLS_PROCEDURES_RINGERPROCEDUREWRAPPER_H
7#define RINGERSELECTORTOOLS_PROCEDURES_RINGERPROCEDUREWRAPPER_H
8
9// STL includes:
10#include <vector>
11
12#ifndef RINGER_STANDALONE
13// xAOD includes:
17#endif
18
19// Local includes:
23#include "RingerSelectorTools/tools/TrackPatternsHolder.h"
24#include "RingerSelectorTools/tools/RedirectMsgStream.h"
25
26#ifndef INCLUDE_HEADER_ONLY // Avoid circular includes
27#define INCLUDE_HEADER_ONLY
28#endif // INCLUDE_HEADER_ONLY
29#include "RingerSelectorTools/procedures/Types.h"
30#undef INCLUDE_HEADER_ONLY
31
32/*
33 * TODO List
34 *
35 * - Maybe we want to put PreProcessor Wrapper into the RingerCommonSelector
36 * and add to the Discriminator Wrapper a post-processing wrapper. This would
37 * make implementation much more flexible.
38 *
39 * - We also need to deal with the pattern space segmentation being different
40 * from input space, previous topic would help this to be implemented, but we
41 * also would need to add the segmentation representation into the Discrimators.
42 * This means that we might want to change the configuration classes into
43 * segmentation representation, which is what really we need.
44 *
45 * - The PreProcessings can be propagated into a Processing space, to merge it
46 * with the PostProcessings. They might be applied as both, that is, they
47 * will inherit from both interfaces, and we might want to apply the direct
48 * transformation, but also the inverse transformation (if it exists), that
49 * would lead the transform space into the original space.
50 *
51 * - Check why decoration cannot be read within root file using kBranchAccess.
52 *
53 * - The RingerProcedureWrapper can be divided into base templates to have its
54 * members created only for those cases where it is dependent. For instance,
55 * the collection shouldn't be dependent on seg, eta and et, but only on
56 * procedure_t template. This is also true for some methods, that shouldn't
57 * be created dependent on segment information, or even eta/et dependency.
58 */
59
60/*
61 * FIXME List:
62 *
63 * - Can't apply more than one PreProcessing Wrapper when on the first
64 * discrimination layer.
65 *
66 */
67
68namespace Ringer {
69
75 public:
79 virtual bool empty() const = 0;
80
84 virtual void write(TDirectory *baseDir, const char *idxStr = "") const = 0;
85
89 virtual const char* name() const = 0;
90
94 virtual EtaDependency etaDep() const = 0;
95
99 virtual EtDependency etDep() const = 0;
100
104 virtual void releaseMemory() = 0;
105
109 virtual std::string fullName() const = 0;
110
114 virtual void print(MSG::Level lvl = MSG::DEBUG) const = 0;
115
120
121};
122
127
131typedef std::vector<IProcWrapperBase> IProcWrapperBaseCollection;
132
139template< typename procedure_t >
141
148//template<typename procedure_t>
149//class ProcedureHolder;
150
151
161template <
162 class procedure_t,
163 /*EtaDependency*/int etaDependency = EtaIndependent,
164 /*EtDependency*/int etDependency = EtIndependent,
165 /*SegmentationType*/int segType = NoSegmentation,
166 // Below template parameters are not supposed to be set directly by user:
170>
172
173} // namespace Ringer
174
175#endif // RINGERSELECTORTOOLS_PROCEDURES_RINGERPROCEDUREWRAPPER_H
176
177#ifndef INCLUDE_HEADER_ONLY // Use to avoid circular includes
178#ifndef RINGER_PROCEDURE_INCLUDE // When included a specialized procedure type
179// in place of RingerProcedureWrapper it is needed to do this because
180// the procedure wrapper undefines INCLUDE_HEADER_ONLY macro when including
181// Types.h. This can be avoided if we don't force including all other procedure
182// types wrappers, but it is wanted to make sure that when a procedure type wrapper
183// is included, every other procedure is also included so that the template
184// specializations are always available independent on how you include it.
186#endif // RINGER_PROCEDURE_INCLUDE
187#endif // INCLUDE_HEADER_ONLY
Used as base for all IRingerProcedureWrapper template specializations.
virtual bool empty() const =0
Returns whether holden interface collection is empty.
virtual void write(TDirectory *baseDir, const char *idxStr="") const =0
Write collection to TDirectory.
virtual EtDependency etDep() const =0
Returns et dependecy for this wrapper.
virtual ~IRingerProcedureWrapperBase()
Ensure virtual destructor.
virtual EtaDependency etaDep() const =0
Returns eta dependecy for this wrapper.
virtual void print(MSG::Level lvl=MSG::DEBUG) const =0
Print wrapper content.
virtual void releaseMemory()=0
Release all pointed memory holden by wrapper.
virtual const char * name() const =0
Retrieve RingerProcedureWrapper name.
virtual std::string fullName() const =0
Get full wrapper name.
Specialization for Discriminator procedure.
Specialization for Discriminator procedure.
Namespace dedicated for Ringer utilities.
EtaDependency
Specify eta position dependency.
IRingerProcedureWrapperBase IProcWrapperBase
Reduce verbosity.
EtDependency
Specify et position dependency.
std::vector< IProcWrapperBase > IProcWrapperBaseCollection
Collection of interface base.
static constexpr bool is_threshold
static constexpr bool is_pre_processor
static constexpr bool is_discriminator