ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
Root
TreeMakerAlg.cxx
Go to the documentation of this file.
1
// Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2
3
// Local include(s):
4
#include "
AsgAnalysisAlgorithms/TreeMakerAlg.h
"
5
6
// ROOT include(s):
7
#include <TTree.h>
8
9
namespace
CP
{
10
11
StatusCode
TreeMakerAlg::initialize
() {
12
ANA_CHECK
(
book
(TTree(
m_treeName
.value().c_str(),
"xAOD->NTuple tree"
)));
13
TTree *treePtr =
tree
(
m_treeName
);
14
if
(!treePtr)
15
{
16
ANA_MSG_ERROR
(
"Failed to create output tree \""
<<
m_treeName
.value() <<
"\""
);
17
return
StatusCode::FAILURE;
18
}
19
treePtr->SetAutoFlush(
m_treeAutoFlush
);
20
return
StatusCode::SUCCESS;
21
}
22
23
}
// namespace CP
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
TreeMakerAlg.h
AthHistogramming::book
StatusCode book(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
Definition
AthHistogramming.h:305
CP::TreeMakerAlg::m_treeName
Gaudi::Property< std::string > m_treeName
The name of the output tree to write.
Definition
TreeMakerAlg.h:47
CP::TreeMakerAlg::initialize
virtual StatusCode initialize() override
Definition
TreeMakerAlg.cxx:11
CP::TreeMakerAlg::m_treeAutoFlush
Gaudi::Property< int > m_treeAutoFlush
Flush setting for the output tree.
Definition
TreeMakerAlg.h:50
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