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
6// EDM include(s):
13
14// ROOT include(s):
15#include <TClass.h>
16#include <TTree.h>
17#include <TBranch.h>
18#include <TVirtualCollectionProxy.h>
19
20// System include(s):
21#include <regex>
22#include <algorithm>
23#include <functional>
24#include <sstream>
25
26
27namespace CP {
28
30
31 // Check that at least one branch is configured.
32 if( m_branches.empty() ) {
33 ATH_MSG_ERROR( "No branches set up for writing" );
34 return StatusCode::FAILURE;
35 }
36
37 // Set up the systematics list.
38 ATH_CHECK( m_systematicsService.retrieve() );
39
40 // Initialise the output tree.
42 if( ! m_tree ) {
43 ATH_MSG_ERROR( "Could not find output tree \"" << m_treeName
44 << "\"" );
45 return StatusCode::FAILURE;
46 }
47 // Call the setup function.
48 if (m_defaultBasketSize != 0)
49 m_processorList.defaultBasketSize = m_defaultBasketSize;
50 ATH_CHECK( m_processorList.setupTree (m_branches, {m_nonContainers.value().begin(), m_nonContainers.value().end()}, *m_systematicsService, *m_tree) );
51
52 // Return gracefully.
53 return StatusCode::SUCCESS;
54 }
55
57
58 ATH_CHECK( m_processorList.process (*evtStore()) );
59
60 // Return gracefully.
61 return StatusCode::SUCCESS;
62 }
63
65
66 // Return gracefully.
67 return StatusCode::SUCCESS;
68 }
69
70} // namespace CP
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
Base class for elements of a container that can have aux data.
Manage index tracking and synchronization of auxiliary data.
Interface providing I/O for a generic auxiliary store.
Interface for factory objects that create vectors.
Gaudi::Property< int > m_defaultBasketSize
ServiceHandle< ISystematicsSvc > m_systematicsService
the handle for the systematics service
StatusCode execute() override
Function executed once per event.
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.
Select isolated Photons, Electrons and Muons.
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
TChain * tree