ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
RingerSelectorTools
RingerSelectorTools
procedures
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:
14
# include "
xAODCaloRings/CaloRings.h
"
15
# include "
xAODCaloRings/RingSetConf.h
"
16
# include "
xAODTracking/TrackParticleFwd.h
"
17
#endif
18
19
// Local includes:
20
#include "
RingerSelectorTools/RingerSelectorToolsDefs.h
"
21
#include "
RingerSelectorTools/procedures/IRingerProcedure.h
"
22
#include "
RingerSelectorTools/tools/VariableDependency.h
"
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
68
namespace
Ringer
{
69
74
class
IRingerProcedureWrapperBase
{
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
119
virtual
~IRingerProcedureWrapperBase
(){;}
120
121
};
122
126
typedef
IRingerProcedureWrapperBase
IProcWrapperBase
;
127
131
typedef
std::vector<IProcWrapperBase>
IProcWrapperBaseCollection
;
132
139
template
<
typename
procedure_t >
140
class
IRingerProcedureWrapper
;
141
148
//template<typename procedure_t>
149
//class ProcedureHolder;
150
151
161
template
<
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:
167
bool
isPreProcessor =
RingerProcedureType< procedure_t >::is_pre_processor
,
168
bool
isDiscriminator =
RingerProcedureType< procedure_t >::is_discriminator
,
169
bool
isThreshold =
RingerProcedureType< procedure_t >::is_threshold
170
>
171
class
RingerProcedureWrapper
;
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.
185
#include "
RingerProcedureWrapper.icc
"
186
#endif
// RINGER_PROCEDURE_INCLUDE
187
#endif
// INCLUDE_HEADER_ONLY
CaloRings.h
IRingerProcedure.h
RingSetConf.h
RingerProcedureWrapper.icc
RingerSelectorToolsDefs.h
TrackParticleFwd.h
VariableDependency.h
Ringer::IRingerProcedureWrapperBase
Used as base for all IRingerProcedureWrapper template specializations.
Definition
RingerProcedureWrapper.h:74
Ringer::IRingerProcedureWrapperBase::empty
virtual bool empty() const =0
Returns whether holden interface collection is empty.
Ringer::IRingerProcedureWrapperBase::write
virtual void write(TDirectory *baseDir, const char *idxStr="") const =0
Write collection to TDirectory.
Ringer::IRingerProcedureWrapperBase::etDep
virtual EtDependency etDep() const =0
Returns et dependecy for this wrapper.
Ringer::IRingerProcedureWrapperBase::~IRingerProcedureWrapperBase
virtual ~IRingerProcedureWrapperBase()
Ensure virtual destructor.
Definition
RingerProcedureWrapper.h:119
Ringer::IRingerProcedureWrapperBase::etaDep
virtual EtaDependency etaDep() const =0
Returns eta dependecy for this wrapper.
Ringer::IRingerProcedureWrapperBase::print
virtual void print(MSG::Level lvl=MSG::DEBUG) const =0
Print wrapper content.
Ringer::IRingerProcedureWrapperBase::releaseMemory
virtual void releaseMemory()=0
Release all pointed memory holden by wrapper.
Ringer::IRingerProcedureWrapperBase::name
virtual const char * name() const =0
Retrieve RingerProcedureWrapper name.
Ringer::IRingerProcedureWrapperBase::fullName
virtual std::string fullName() const =0
Get full wrapper name.
Ringer::IRingerProcedureWrapper
Specialization for Discriminator procedure.
Definition
RingerProcedureWrapper.h:140
Ringer::RingerProcedureWrapper
Specialization for Discriminator procedure.
Definition
RingerProcedureWrapper.h:171
Ringer
Namespace dedicated for Ringer utilities.
Definition
CaloRingsDefs.h:9
Ringer::EtaDependency
EtaDependency
Specify eta position dependency.
Definition
RingerSelectorToolsEnums.h:81
Ringer::EtaIndependent
@ EtaIndependent
Definition
RingerSelectorToolsEnums.h:82
Ringer::IProcWrapperBase
IRingerProcedureWrapperBase IProcWrapperBase
Reduce verbosity.
Definition
RingerProcedureWrapper.h:126
Ringer::EtDependency
EtDependency
Specify et position dependency.
Definition
RingerSelectorToolsEnums.h:95
Ringer::EtIndependent
@ EtIndependent
Definition
RingerSelectorToolsEnums.h:96
Ringer::NoSegmentation
@ NoSegmentation
Definition
RingerSelectorToolsEnums.h:65
Ringer::IProcWrapperBaseCollection
std::vector< IProcWrapperBase > IProcWrapperBaseCollection
Collection of interface base.
Definition
RingerProcedureWrapper.h:131
Ringer::RingerProcedureType::is_threshold
static constexpr bool is_threshold
Definition
IRingerProcedure.h:200
Ringer::RingerProcedureType::is_pre_processor
static constexpr bool is_pre_processor
Definition
IRingerProcedure.h:196
Ringer::RingerProcedureType::is_discriminator
static constexpr bool is_discriminator
Definition
IRingerProcedure.h:198
Generated on
for ATLAS Offline Software by
1.17.0