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-2024 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):
18
19namespace CP {
20
29 class xAODWriterAlg final : public EL::AnaAlgorithm {
30
31 public:
34
37
39 StatusCode initialize() override;
40
42 StatusCode execute() override;
43
45 StatusCode finalize() override;
46
48
49 private:
51 StatusCode setup();
52
55
57 Gaudi::Property<std::string> m_outputStreamName {this, "OutputStreamName", "ANALYSIS", "Stream name of the output file to use"};
59 Gaudi::Property<std::vector<std::string>> m_itemList {this, "ItemList", {}, "Objects to write to the output file"};
61 Gaudi::Property<int> m_basketSize {this, "BasketSize", 32000, "(Starter) Basket size for the created branches"};
63 Gaudi::Property<int> m_splitLevel {this, "SplitLevel", 0, "Split level for the created branches"};
64
66
68 struct Item {
70 std::string name;
72 const std::type_info* type;
74 std::string typeName;
75 }; // struct Item
76
79
83 std::vector< Item > m_writtenItemList;
84
87
88 }; // class xAODWriterAlg
89
90} // namespace CP
91
92#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.
StatusCode finalize() override
Function finalising the algorithm.
std::vector< Item > m_writtenItemList
Item list being written after the first event.
xAOD::TEvent m_event
Object to write the output file with.
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
Tool for accessing xAOD files outside of Athena.
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.