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
// EDM include(s):
7
#include "
AthContainersInterfaces/IAuxStoreIO.h
"
8
#include "
AthContainersInterfaces/IAuxTypeVectorFactory.h
"
9
#include "
AthContainers/AuxElement.h
"
10
#include "
AthContainers/AuxVectorBase.h
"
11
#include "
AthContainers/normalizedTypeinfoName.h
"
12
#include "
xAODRootAccess/tools/THolder.h
"
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
27
namespace
CP
{
28
29
StatusCode
AsgxAODNTupleMakerAlg::initialize
() {
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.
41
m_tree
=
tree
(
m_treeName
);
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
56
StatusCode
AsgxAODNTupleMakerAlg::execute
(
const
EventContext&
/*ctx*/
) {
57
58
ATH_CHECK
(
m_processorList
.process (*
evtStore
()) );
59
60
// Return gracefully.
61
return
StatusCode::SUCCESS;
62
}
63
64
StatusCode
AsgxAODNTupleMakerAlg::finalize
() {
65
66
// Return gracefully.
67
return
StatusCode::SUCCESS;
68
}
69
70
}
// 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:33
AuxElement.h
Base class for elements of a container that can have aux data.
AuxVectorBase.h
Manage index tracking and synchronization of auxiliary data.
IAuxStoreIO.h
Interface providing I/O for a generic auxiliary store.
IAuxTypeVectorFactory.h
Interface for factory objects that create vectors.
THolder.h
AthCommonAlgorithm< Gaudi::Algorithm >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
Definition
AthCommonDataStore.h:85
CP::AsgxAODNTupleMakerAlg::m_defaultBasketSize
Gaudi::Property< int > m_defaultBasketSize
Definition
AsgxAODNTupleMakerAlg.h:92
CP::AsgxAODNTupleMakerAlg::m_systematicsService
ServiceHandle< ISystematicsSvc > m_systematicsService
the handle for the systematics service
Definition
AsgxAODNTupleMakerAlg.h:105
CP::AsgxAODNTupleMakerAlg::m_processorList
TreeBranchHelpers::ProcessorList m_processorList
Definition
AsgxAODNTupleMakerAlg.h:99
CP::AsgxAODNTupleMakerAlg::finalize
StatusCode finalize() override
Function executed as part of the job finalisation.
Definition
AsgxAODNTupleMakerAlg.cxx:64
CP::AsgxAODNTupleMakerAlg::m_treeName
Gaudi::Property< std::string > m_treeName
The name of the output tree to write.
Definition
AsgxAODNTupleMakerAlg.h:88
CP::AsgxAODNTupleMakerAlg::m_tree
TTree * m_tree
The tree being written.
Definition
AsgxAODNTupleMakerAlg.h:102
CP::AsgxAODNTupleMakerAlg::m_branches
Gaudi::Property< std::vector< std::string > > m_branches
The branches to write into this output tree.
Definition
AsgxAODNTupleMakerAlg.h:90
CP::AsgxAODNTupleMakerAlg::initialize
StatusCode initialize() override
Function executed as part of the job initialisation.
Definition
AsgxAODNTupleMakerAlg.cxx:29
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
normalizedTypeinfoName.h
Convert a type_info to a normalized string representation (matching the names used in the root dictio...
tree
TChain * tree
Definition
tile_monitor.h:30
Generated on
for ATLAS Offline Software by
1.17.0