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
// EDM include(s):
7
#include "
AthContainersInterfaces/IAuxTypeVectorFactory.h
"
8
#include "
AthContainers/AuxElement.h
"
9
#include "
AthContainers/AuxVectorBase.h
"
10
#include "
AthContainers/normalizedTypeinfoName.h
"
11
12
// ROOT include(s):
13
#include <TClass.h>
14
#include <TTree.h>
15
#include <TBranch.h>
16
#include <TVirtualCollectionProxy.h>
17
18
// System include(s):
19
#include <regex>
20
#include <algorithm>
21
#include <functional>
22
#include <sstream>
23
24
namespace
CP
{
25
26
StatusCode
TreeFillerAlg::execute
(
const
EventContext&
/*ctx*/
) {
27
// get the output tree for the first time
28
if
( !
m_tree
) {
29
m_tree
=
tree
(
m_treeName
);
30
}
31
32
if
( !
m_tree
) {
33
ATH_MSG_ERROR
(
"Could not find output tree \""
<<
m_treeName
34
<<
"\""
);
35
return
StatusCode::FAILURE;
36
}
37
38
// Fill the tree.
39
if
(
m_tree
->Fill() < 0 ) {
40
ATH_MSG_ERROR
(
"Error while filling TTree"
);
41
return
StatusCode::FAILURE;
42
}
43
44
// Return gracefully.
45
return
StatusCode::SUCCESS;
46
}
47
48
}
// namespace CP
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.
IAuxTypeVectorFactory.h
Interface for factory objects that create vectors.
TreeFillerAlg.h
CP::TreeFillerAlg::m_tree
TTree * m_tree
The tree being written.
Definition
TreeFillerAlg.h:77
CP::TreeFillerAlg::m_treeName
Gaudi::Property< std::string > m_treeName
The name of the output tree to write.
Definition
TreeFillerAlg.h:69
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