ATLAS Offline Software
Loading...
Searching...
No Matches
SysCopyHandle.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8#ifndef SYSTEMATICS_HANDLES__SYS_COPY_HANDLE_H
9#define SYSTEMATICS_HANDLES__SYS_COPY_HANDLE_H
10
18#include <string>
19#include <tuple>
20#include <unordered_map>
21
22class StatusCode;
23
24namespace CP
25{
30
59
60 template<typename T> class SysCopyHandle final
62 {
63 //
64 // public interface
65 //
66
81 public:
82 template<typename T2>
83 SysCopyHandle (T2 *owner, const std::string& propertyName,
84 const std::string& propertyValue,
85 const std::string& propertyDescription);
86
95 template<typename T2>
96 SysCopyHandle (const std::string &inputName, const std::string &outputName, T2 *owner);
97
98
100 public:
101 virtual bool empty () const noexcept override;
102
104 public:
105 explicit operator bool () const noexcept;
106
108 public:
109 virtual std::string getNamePattern () const override;
110
111
114 public:
115 StatusCode initialize (SysListHandle& sysListHandle);
116 StatusCode initialize (SysListHandle& sysListHandle, SG::AllowEmptyEnum);
118
119
121 public:
122 ::StatusCode getCopy (T*& object,
124
125
126
127 //
128 // inherited interface
129 //
130
131 private:
133 virtual StatusCode
135 const CP::SystematicSet& fullAffecting,
136 const std::vector<CP::SystematicSet>& sysList) override;
137
138
139
140 //
141 // private interface
142 //
143
145 private:
147
149 private:
151
153 private:
154 std::unordered_map<CP::SystematicSet,std::tuple<std::string,std::string,std::string> > m_nameCache;
155
156
158 private:
159 typedef std::decay<decltype(
160 *(std::declval<EL::AnaAlgorithm>().evtStore()))>::type StoreType;
161
163 private:
165
173 private:
175 };
176}
177
178#include "SysCopyHandle.icc"
179
180#endif
A property holding a SG store/key/clid from which a VarHandle is made.
a basic interface for all systematics handles
the interface for the central systematics service
::StatusCode getCopy(T *&object, const CP::SystematicSet &sys) const
retrieve the object for the given name
virtual bool empty() const noexcept override
whether we have a name configured
SysCopyHandle(T2 *owner, const std::string &propertyName, const std::string &propertyValue, const std::string &propertyDescription)
Standard constructor.
virtual std::string getNamePattern() const override
get the name pattern before substitution
StatusCode initialize(SysListHandle &sysListHandle)
initialize this handle
SysCopyHandle(const std::string &inputName, const std::string &outputName, T2 *owner)
Construct directly without declaring properties.
std::string m_outputName
the (optional) name of the copy we create
StoreType * m_evtStore
the event store we use
std::function< StoreType *()> m_evtStoreGetter
the function to retrieve the event store
std::unordered_map< CP::SystematicSet, std::tuple< std::string, std::string, std::string > > m_nameCache
the cache of names we use
virtual CP::SystematicSet getInputAffecting(const ISystematicsSvc &svc) const override
get the affecting systematics if this is an input handle
std::decay< decltype(*(std::declval< EL::AnaAlgorithm >().evtStore()))>::type StoreType
the type of the event store we use
std::string m_inputName
the input name we use
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const CP::SystematicSet &fullAffecting, const std::vector< CP::SystematicSet > &sysList) override
register and cache the systematics
a class managing the property to configure the list of systematics to process
Class to wrap a set of SystematicVariations.
base class to forward messages to another class
Select isolated Photons, Electrons and Muons.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Forward declaration.
STL namespace.
#define private