ATLAS Offline Software
Loading...
Searching...
No Matches
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):
5
6// EDM include(s):
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
24namespace CP {
25
27 // get the output tree for the first time
28 if( ! m_tree ) {
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
#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 for factory objects that create vectors.
StatusCode execute() override
Function executed once per event.
TTree * m_tree
The tree being written.
Gaudi::Property< std::string > m_treeName
The name of the output tree to write.
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