ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
AsgAnalysisAlgorithms
RNtupleTreeMakerAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef ASGANALYSISALGORITHMS_RNTUPLETREEMAKERALG_H
5
#define ASGANALYSISALGORITHMS_RNTUPLETREEMAKERALG_H
6
7
#include "
AnaAlgorithm/AnaAlgorithm.h
"
8
#include "
AsgTools/PropertyWrapper.h
"
9
#include "
AsgTools/ToolHandle.h
"
10
#include "
PATInterfaces/SystematicSet.h
"
11
12
// RNTuple include(s):
13
#include <ROOT/RNTupleModel.hxx>
14
#include <ROOT/RNTupleWriter.hxx>
15
16
// Local include(s):
17
#include "
AsgAnalysisAlgorithms/RNtupleFieldHelpers.h
"
18
19
#include <string>
20
#include <vector>
21
#include <memory>
22
#include <unordered_map>
23
24
namespace
CP
{
25
27
class
RNtupleTreeMakerAlg
:
public
EL::AnaAlgorithm
{
28
29
public
:
31
using
EL::AnaAlgorithm::AnaAlgorithm
;
32
34
virtual
StatusCode
initialize
()
override
;
35
37
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
38
40
virtual
StatusCode
finalize
()
override
;
41
42
private
:
44
StatusCode
setupTree
();
45
48
49
Gaudi::Property<std::string>
m_modelName
{
50
this
,
"TreeName"
,
"physics"
,
"Name of the RNTuple model/tree"
};
51
52
Gaudi::Property<std::string>
m_outputStreamName
{
53
this
,
"OutputStreamName"
,
"ANALYSIS"
,
"Name of the output stream"
};
54
55
Gaudi::Property<std::vector<std::string>>
m_branches
{
56
this
,
"Branches"
, {},
"List of branches to create (format: Object.Var -> BranchName)"
};
57
58
Gaudi::Property<std::vector<std::string>>
m_nonContainers
{
59
this
,
"NonContainers"
, {},
"List of objects to treat as non-containers"
};
60
62
64
ServiceHandle<ISystematicsSvc>
m_systematicsService
{
65
this
,
"SystematicsSvc"
,
"SystematicsSvc"
,
"Systematics service"
};
66
69
70
std::unique_ptr<ROOT::RNTupleModel>
m_model
;
71
std::unique_ptr<ROOT::RNTupleWriter>
m_writer
;
72
73
CP::RNtupleFieldHelpers::ProcessorList
m_processorList
{
this
};
74
75
bool
m_isInitialized
=
false
;
76
78
79
};
// class RNtupleTreeMakerAlg
80
81
}
// namespace CP
82
83
#endif
// ASGANALYSISALGORITHMS_RNTUPLETREEMAKERALG_H
AnaAlgorithm.h
PropertyWrapper.h
RNtupleFieldHelpers.h
SystematicSet.h
ToolHandle.h
CP::RNtupleFieldHelpers::ProcessorList
Definition
RNtupleFieldHelpers.h:182
CP::RNtupleTreeMakerAlg
Algorithm that creates an RNTuple (instead of TTree).
Definition
RNtupleTreeMakerAlg.h:27
CP::RNtupleTreeMakerAlg::m_nonContainers
Gaudi::Property< std::vector< std::string > > m_nonContainers
Definition
RNtupleTreeMakerAlg.h:58
CP::RNtupleTreeMakerAlg::m_branches
Gaudi::Property< std::vector< std::string > > m_branches
Definition
RNtupleTreeMakerAlg.h:55
CP::RNtupleTreeMakerAlg::m_outputStreamName
Gaudi::Property< std::string > m_outputStreamName
Definition
RNtupleTreeMakerAlg.h:52
CP::RNtupleTreeMakerAlg::setupTree
StatusCode setupTree()
Function setting up the internal data structures on the first event.
Definition
RNtupleTreeMakerAlg.cxx:85
CP::RNtupleTreeMakerAlg::m_isInitialized
bool m_isInitialized
Definition
RNtupleTreeMakerAlg.h:75
CP::RNtupleTreeMakerAlg::m_modelName
Gaudi::Property< std::string > m_modelName
Definition
RNtupleTreeMakerAlg.h:49
CP::RNtupleTreeMakerAlg::m_processorList
CP::RNtupleFieldHelpers::ProcessorList m_processorList
Definition
RNtupleTreeMakerAlg.h:73
CP::RNtupleTreeMakerAlg::m_writer
std::unique_ptr< ROOT::RNTupleWriter > m_writer
Definition
RNtupleTreeMakerAlg.h:71
CP::RNtupleTreeMakerAlg::initialize
virtual StatusCode initialize() override
Function executed during algorithm initialization.
Definition
RNtupleTreeMakerAlg.cxx:23
CP::RNtupleTreeMakerAlg::m_systematicsService
ServiceHandle< ISystematicsSvc > m_systematicsService
Service handle for systematics.
Definition
RNtupleTreeMakerAlg.h:64
CP::RNtupleTreeMakerAlg::finalize
virtual StatusCode finalize() override
Function executed during algo finalization.
Definition
RNtupleTreeMakerAlg.cxx:80
CP::RNtupleTreeMakerAlg::m_model
std::unique_ptr< ROOT::RNTupleModel > m_model
Definition
RNtupleTreeMakerAlg.h:70
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition
AnaAlgorithm.h:74
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition
AnaAlgorithm.cxx:40
EL::AnaAlgorithm::execute
virtual::StatusCode execute()
execute this algorithm
Definition
AnaAlgorithm.cxx:315
ServiceHandle
Definition
ClusterMakerTool.h:36
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
Generated on
for ATLAS Offline Software by
1.17.0