ATLAS Offline Software
Loading...
Searching...
No Matches
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):
5
6namespace CP {
7
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.
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
44
45 // Return gracefully.
46 return StatusCode::SUCCESS;
47 }
48
49} // namespace CP
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
ServiceHandle< StoreGateSvc > & evtStore()
Gaudi::Property< int > m_defaultBasketSize
ServiceHandle< ISystematicsSvc > m_systematicsService
the handle for the systematics service
TreeBranchHelpers::ProcessorList m_processorList
StatusCode finalize() override
Function executed as part of the job finalisation.
Gaudi::Property< std::string > m_treeName
The name of the output tree to write.
TTree * m_tree
The tree being written.
Gaudi::Property< std::vector< std::string > > m_branches
The branches to write into this output tree.
StatusCode initialize() override
Function executed as part of the job initialisation.
virtual::StatusCode execute()
execute this algorithm
Select isolated Photons, Electrons and Muons.
TChain * tree