ATLAS Offline Software
Loading...
Searching...
No Matches
xAODWriterAlg.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef STANDALONEANALYSISALGORITHMS_XAODWRITERALG_H
6#define STANDALONEANALYSISALGORITHMS_XAODWRITERALG_H
7
8// System include(s):
9#include <string>
10#include <vector>
11#include <typeinfo>
12
13// Core include(s):
19
20namespace CP {
21
30 class xAODWriterAlg final : public EL::AnaAlgorithm {
31
32 public:
35
38
40 StatusCode initialize() override;
41
43 StatusCode execute() override;
44
46 StatusCode finalize() override;
47
49
50 private:
52 StatusCode setup();
53
56
58 Gaudi::Property<std::string> m_outputStreamName {this, "OutputStreamName", "ANALYSIS", "Stream name of the output file to use"};
60 Gaudi::Property<std::vector<std::string>> m_itemList {this, "ItemList", {}, "Objects to write to the output file"};
62 Gaudi::Property<int> m_basketSize {this, "BasketSize", 32000, "(Starter) Basket size for the created branches"};
64 Gaudi::Property<int> m_splitLevel {this, "SplitLevel", 0, "Split level for the created branches"};
65
67
69 struct Item {
71 std::string name;
73 const std::type_info* type;
75 std::string typeName;
76 }; // struct Item
77
79 std::unique_ptr<xAOD::TEvent> m_event;
80
84 std::vector< Item > m_writtenItemList;
85
88
89 }; // class xAODWriterAlg
90
91} // namespace CP
92
93#endif // STANDALONEANALYSISALGORITHMS_XAODWRITERALG_H
a class managing the property to configure the list of systematics to process
Algorithm writing an xAOD output file.
Gaudi::Property< int > m_basketSize
(Starter) Basket size for the created branches
Gaudi::Property< int > m_splitLevel
Split level for the created branches.
bool m_itemListInitialized
Internal flag.
StatusCode setup()
Function setting up the algorithm while processing the first event.
std::unique_ptr< xAOD::TEvent > m_event
Object to write the output file with.
StatusCode finalize() override
Function finalising the algorithm.
std::vector< Item > m_writtenItemList
Item list being written after the first event.
StatusCode execute() override
Function executing the algorithm.
Gaudi::Property< std::vector< std::string > > m_itemList
Item list to write to the output file.
SysListHandle m_systematicsList
The systematic list to consider during execution.
Gaudi::Property< std::string > m_outputStreamName
Name of the output stream to write to.
StatusCode initialize() override
Function initialising the algorithm.
the (new) base class for EventLoop algorithms
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Select isolated Photons, Electrons and Muons.
std::string name
Name of the written object.
const std::type_info * type
Type of the written object.
std::string typeName
Type name of the written object.