ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
Root
TreeFillerAlg.cxx
Go to the documentation of this file.
1
// Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
// Local include(s):
4
#include "
AsgAnalysisAlgorithms/TreeFillerAlg.h
"
5
6
// ROOT include(s):
7
#include <TTree.h>
8
9
namespace
CP
{
10
11
StatusCode
TreeFillerAlg::execute
(
const
EventContext&
/*ctx*/
) {
12
// get the output tree for the first time
13
if
( !
m_tree
) {
14
m_tree
=
tree
(
m_treeName
);
15
}
16
17
if
( !
m_tree
) {
18
ATH_MSG_ERROR
(
"Could not find output tree \""
<<
m_treeName
19
<<
"\""
);
20
return
StatusCode::FAILURE;
21
}
22
23
// Fill the tree.
24
if
(
m_tree
->Fill() < 0 ) {
25
ATH_MSG_ERROR
(
"Error while filling TTree"
);
26
return
StatusCode::FAILURE;
27
}
28
29
// Return gracefully.
30
return
StatusCode::SUCCESS;
31
}
32
33
}
// namespace CP
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x,...)
Definition
AthMsgStreamMacros.h:47
TreeFillerAlg.h
CP::TreeFillerAlg::m_tree
TTree * m_tree
The tree being written.
Definition
TreeFillerAlg.h:61
CP::TreeFillerAlg::m_treeName
Gaudi::Property< std::string > m_treeName
The name of the output tree to write.
Definition
TreeFillerAlg.h:53
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