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
10
// RNTuple include(s):
11
#include <ROOT/RNTupleModel.hxx>
12
#include <ROOT/RNTupleWriter.hxx>
13
#include <TFile.h>
14
15
// Local include(s):
16
#include "
AsgAnalysisAlgorithms/RNtupleFieldHelpers.h
"
17
18
#include <string>
19
#include <vector>
20
#include <memory>
21
22
namespace
CP
{
23
25
class
RNtupleTreeMakerAlg
:
public
EL::AnaAlgorithm
{
26
27
public
:
29
using
EL::AnaAlgorithm::AnaAlgorithm
;
30
32
virtual
StatusCode
initialize
()
override
;
33
35
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
36
38
virtual
StatusCode
finalize
()
override
;
39
40
private
:
42
StatusCode
setupTree
();
43
46
47
Gaudi::Property<std::string>
m_modelName
{
48
this
,
"TreeName"
,
"physics"
,
"Name of the RNTuple model/tree"
};
49
50
Gaudi::Property<std::string>
m_outputStreamName
{
51
this
,
"OutputStreamName"
,
"ANALYSIS"
,
"Name of the output stream"
};
52
53
Gaudi::Property<std::vector<std::string>>
m_branches
{
54
this
,
"Branches"
, {},
"List of branches to create (format: Object.Var -> BranchName)"
};
55
56
Gaudi::Property<std::vector<std::string>>
m_nonContainers
{
57
this
,
"NonContainers"
, {},
"List of objects to treat as non-containers"
};
58
59
Gaudi::Property<std::size_t>
m_approxZippedClusterSize
{
60
this
,
"ApproxZippedClusterSize"
, 0,
61
"Target compressed cluster size in bytes (0 = ROOT default)"
};
62
63
Gaudi::Property<std::size_t>
m_maxUnzippedClusterSize
{
64
this
,
"MaxUnzippedClusterSize"
, 0,
65
"Maximum uncompressed cluster size in bytes, bounds the write buffer memory (0 = ROOT default)"
};
66
68
70
ServiceHandle<ISystematicsSvc>
m_systematicsService
{
71
this
,
"SystematicsSvc"
,
"SystematicsSvc"
,
"Systematics service"
};
72
75
76
std::unique_ptr<ROOT::RNTupleModel>
m_model
;
77
std::unique_ptr<ROOT::RNTupleWriter>
m_writer
;
78
79
CP::RNtupleFieldHelpers::ProcessorList
m_processorList
{
this
};
80
81
bool
m_isInitialized
=
false
;
82
84
85
};
// class RNtupleTreeMakerAlg
86
87
}
// namespace CP
88
89
#endif
// ASGANALYSISALGORITHMS_RNTUPLETREEMAKERALG_H
AnaAlgorithm.h
PropertyWrapper.h
RNtupleFieldHelpers.h
CP::RNtupleFieldHelpers::ProcessorList
Definition
RNtupleFieldHelpers.h:184
CP::RNtupleTreeMakerAlg
Algorithm that creates an RNTuple (instead of TTree).
Definition
RNtupleTreeMakerAlg.h:25
CP::RNtupleTreeMakerAlg::m_nonContainers
Gaudi::Property< std::vector< std::string > > m_nonContainers
Definition
RNtupleTreeMakerAlg.h:56
CP::RNtupleTreeMakerAlg::m_branches
Gaudi::Property< std::vector< std::string > > m_branches
Definition
RNtupleTreeMakerAlg.h:53
CP::RNtupleTreeMakerAlg::m_outputStreamName
Gaudi::Property< std::string > m_outputStreamName
Definition
RNtupleTreeMakerAlg.h:50
CP::RNtupleTreeMakerAlg::setupTree
StatusCode setupTree()
Function setting up the internal data structures on the first event.
Definition
RNtupleTreeMakerAlg.cxx:142
CP::RNtupleTreeMakerAlg::m_isInitialized
bool m_isInitialized
Definition
RNtupleTreeMakerAlg.h:81
CP::RNtupleTreeMakerAlg::m_modelName
Gaudi::Property< std::string > m_modelName
Definition
RNtupleTreeMakerAlg.h:47
CP::RNtupleTreeMakerAlg::m_processorList
CP::RNtupleFieldHelpers::ProcessorList m_processorList
Definition
RNtupleTreeMakerAlg.h:79
CP::RNtupleTreeMakerAlg::m_writer
std::unique_ptr< ROOT::RNTupleWriter > m_writer
Definition
RNtupleTreeMakerAlg.h:77
CP::RNtupleTreeMakerAlg::initialize
virtual StatusCode initialize() override
Function executed during algorithm initialization.
Definition
RNtupleTreeMakerAlg.cxx:62
CP::RNtupleTreeMakerAlg::m_systematicsService
ServiceHandle< ISystematicsSvc > m_systematicsService
Service handle for systematics.
Definition
RNtupleTreeMakerAlg.h:70
CP::RNtupleTreeMakerAlg::m_maxUnzippedClusterSize
Gaudi::Property< std::size_t > m_maxUnzippedClusterSize
Definition
RNtupleTreeMakerAlg.h:63
CP::RNtupleTreeMakerAlg::finalize
virtual StatusCode finalize() override
Function executed during algo finalization.
Definition
RNtupleTreeMakerAlg.cxx:137
CP::RNtupleTreeMakerAlg::m_model
std::unique_ptr< ROOT::RNTupleModel > m_model
Definition
RNtupleTreeMakerAlg.h:76
CP::RNtupleTreeMakerAlg::m_approxZippedClusterSize
Gaudi::Property< std::size_t > m_approxZippedClusterSize
Definition
RNtupleTreeMakerAlg.h:59
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