ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
SystematicsHandles
Root
AthenaDependencyHelpers.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
//
9
// includes
10
//
11
12
#include <
SystematicsHandles/AthenaDependencyHelpers.h
>
13
14
#ifndef XAOD_STANDALONE
15
#include <
PATInterfaces/SystematicSet.h
>
16
#include <
SystematicsHandles/ISystematicsSvc.h
>
17
18
//
19
// method implementations
20
//
21
22
namespace
CP
23
{
24
namespace
detail
25
{
26
StatusCode
addSysDependency
(MsgStream&
msg
,
const
ISystematicsSvc
& svc,
27
const
std::function<
void
(
const
DataObjID&, Gaudi::DataHandle::Mode)>& addAlgDependency,
28
const
CLID
clid,
const
std::string&
name
, Gaudi::DataHandle::Mode mode,
29
const
std::string& decoName,
bool
decoWrite)
30
{
31
// Build full key string: "StoreGateSvc+name"
32
std::string fullKeyStr =
"StoreGateSvc+"
;
33
34
{
40
std::string temp;
41
if
(svc.makeSystematicsName (temp,
name
,
CP::SystematicSet
{}).isFailure())
42
{
43
msg
<< MSG::ERROR <<
"could not build nominal systematic name for "
+
name
<<
endmsg
;
44
return
StatusCode::FAILURE;
45
}
46
fullKeyStr += temp;
47
}
48
49
if
(!decoName.empty())
50
{
51
std::string temp;
52
if
(svc.makeSystematicsName (temp, decoName,
CP::SystematicSet
{}).isFailure())
53
{
54
msg
<< MSG::ERROR <<
"could not build nominal systematic name for "
+ decoName <<
endmsg
;
55
return
StatusCode::FAILURE;
56
}
57
58
// Build decoration key string
59
fullKeyStr +=
"."
+ temp;
60
61
// Decoration mode
62
mode = decoWrite ? Gaudi::DataHandle::Writer : Gaudi::DataHandle::Reader;
63
}
64
65
addAlgDependency(DataObjID{clid, std::move(fullKeyStr)}, mode);
66
return
StatusCode::SUCCESS;
67
}
68
}
69
}
70
#endif
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
AthenaDependencyHelpers.h
CLID
uint32_t CLID
The Class ID type.
Definition
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ISystematicsSvc.h
SystematicSet.h
CP::ISystematicsSvc
the interface for the central systematics service
Definition
ISystematicsSvc.h:26
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
CP::detail
Definition
EgammaAnalysisAlgorithms/EgammaAnalysisAlgorithms/CopyHelpers.h:20
CP::detail::addSysDependency
StatusCode addSysDependency(MsgStream &msg, const ISystematicsSvc &svc, const std::function< void(const DataObjID &, Gaudi::DataHandle::Mode)> &addAlgDependency, const CLID clid, const std::string &name, Gaudi::DataHandle::Mode mode, const std::string &decoName, bool decoWrite)
Definition
AthenaDependencyHelpers.cxx:26
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0