ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
12// RNTuple include(s):
13#include <ROOT/RNTupleModel.hxx>
14#include <ROOT/RNTupleWriter.hxx>
15
16// Local include(s):
18
19#include <string>
20#include <vector>
21#include <memory>
22#include <unordered_map>
23
24namespace CP {
25
28
29 public:
32
34 virtual StatusCode initialize() override;
35
37 virtual StatusCode execute() 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
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
74
75 bool m_isInitialized = false;
76
78
79 }; // class RNtupleTreeMakerAlg
80
81} // namespace CP
82
83#endif // ASGANALYSISALGORITHMS_RNTUPLETREEMAKERALG_H
Algorithm that creates an RNTuple (instead of TTree).
virtual StatusCode execute() override
Function executed once per event.
Gaudi::Property< std::vector< std::string > > m_nonContainers
Gaudi::Property< std::vector< std::string > > m_branches
Gaudi::Property< std::string > m_outputStreamName
StatusCode setupTree()
Function setting up the internal data structures on the first event.
Gaudi::Property< std::string > m_modelName
CP::RNtupleFieldHelpers::ProcessorList m_processorList
std::unique_ptr< ROOT::RNTupleWriter > m_writer
virtual StatusCode initialize() override
Function executed during algorithm initialization.
ServiceHandle< ISystematicsSvc > m_systematicsService
Service handle for systematics.
virtual StatusCode finalize() override
Function executed during algo finalization.
std::unique_ptr< ROOT::RNTupleModel > m_model
the (new) base class for EventLoop algorithms
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Select isolated Photons, Electrons and Muons.