ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
Root
AsgxAODNTupleMakerAlg.cxx
Go to the documentation of this file.
1
// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
// Local include(s):
4
#include "
AsgAnalysisAlgorithms/AsgxAODNTupleMakerAlg.h
"
5
6
namespace
CP
{
7
8
StatusCode
AsgxAODNTupleMakerAlg::initialize
() {
9
10
// Check that at least one branch is configured.
11
if
(
m_branches
.empty() ) {
12
ATH_MSG_ERROR
(
"No branches set up for writing"
);
13
return
StatusCode::FAILURE;
14
}
15
16
// Set up the systematics list.
17
ATH_CHECK
(
m_systematicsService
.retrieve() );
18
19
// Initialise the output tree.
20
m_tree
=
tree
(
m_treeName
);
21
if
( !
m_tree
) {
22
ATH_MSG_ERROR
(
"Could not find output tree \""
<<
m_treeName
23
<<
"\""
);
24
return
StatusCode::FAILURE;
25
}
26
// Call the setup function.
27
if
(
m_defaultBasketSize
!= 0)
28
m_processorList
.defaultBasketSize =
m_defaultBasketSize
;
29
ATH_CHECK
(
m_processorList
.setupTree (
m_branches
, {m_nonContainers.value().begin(), m_nonContainers.value().end()}, *
m_systematicsService
, *
m_tree
) );
30
31
// Return gracefully.
32
return
StatusCode::SUCCESS;
33
}
34
35
StatusCode
AsgxAODNTupleMakerAlg::execute
(
const
EventContext&
/*ctx*/
) {
36
37
ATH_CHECK
(
m_processorList
.process (*
evtStore
()) );
38
39
// Return gracefully.
40
return
StatusCode::SUCCESS;
41
}
42
43
StatusCode
AsgxAODNTupleMakerAlg::finalize
() {
44
45
// Return gracefully.
46
return
StatusCode::SUCCESS;
47
}
48
49
}
// namespace CP
AsgxAODNTupleMakerAlg.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
AthCommonAlgorithm< Gaudi::Algorithm >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
CP::AsgxAODNTupleMakerAlg::m_defaultBasketSize
Gaudi::Property< int > m_defaultBasketSize
Definition
AsgxAODNTupleMakerAlg.h:78
CP::AsgxAODNTupleMakerAlg::m_systematicsService
ServiceHandle< ISystematicsSvc > m_systematicsService
the handle for the systematics service
Definition
AsgxAODNTupleMakerAlg.h:91
CP::AsgxAODNTupleMakerAlg::m_processorList
TreeBranchHelpers::ProcessorList m_processorList
Definition
AsgxAODNTupleMakerAlg.h:85
CP::AsgxAODNTupleMakerAlg::finalize
StatusCode finalize() override
Function executed as part of the job finalisation.
Definition
AsgxAODNTupleMakerAlg.cxx:43
CP::AsgxAODNTupleMakerAlg::m_treeName
Gaudi::Property< std::string > m_treeName
The name of the output tree to write.
Definition
AsgxAODNTupleMakerAlg.h:74
CP::AsgxAODNTupleMakerAlg::m_tree
TTree * m_tree
The tree being written.
Definition
AsgxAODNTupleMakerAlg.h:88
CP::AsgxAODNTupleMakerAlg::m_branches
Gaudi::Property< std::vector< std::string > > m_branches
The branches to write into this output tree.
Definition
AsgxAODNTupleMakerAlg.h:76
CP::AsgxAODNTupleMakerAlg::initialize
StatusCode initialize() override
Function executed as part of the job initialisation.
Definition
AsgxAODNTupleMakerAlg.cxx:8
EL::AnaAlgorithm::execute
virtual::StatusCode execute()
execute this algorithm
Definition
AnaAlgorithm.cxx:315
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
tree
TChain * tree
Definition
tile_monitor.h:30
Generated on
for ATLAS Offline Software by
1.17.0