ATLAS Offline Software
ModuleData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
9 #ifndef EVENT_LOOP__MODULE_DATA_H
10 #define EVENT_LOOP__MODULE_DATA_H
11 
12 #include <EventLoop/Global.h>
13 
15 #include <SampleHandler/Global.h>
16 #include <cstdint>
17 #include <memory>
18 #include <string>
19 #include <vector>
20 #include <map>
21 
22 class TFile;
23 class TList;
24 class TObject;
25 class TTree;
26 
27 namespace asg
28 {
29  class SgTEvent;
30 }
31 
32 namespace xAOD
33 {
34  class TEvent;
35  class TStore;
36 }
37 
38 namespace EL
39 {
40  namespace Detail
41  {
62 
63  struct ModuleData
64  {
66  std::vector<Detail::AlgorithmData> m_algs;
67 
69  std::string m_inputFileUrl;
70 
72  std::unique_ptr<TFile> m_inputFile;
73 
75  TTree *m_inputTree {nullptr};
76 
80 
82  bool m_skipEvent = false;
83 
85  const SH::MetaObject *m_metaData {nullptr};
86 
89 
92 
94  std::unique_ptr<TTree> m_jobStats;
95 
97  xAOD::TEvent *m_tevent {nullptr};
98 
100  xAOD::TStore *m_tstore {nullptr};
101 
104 
106  Worker *m_worker {nullptr};
107 
109  std::map<std::string,Detail::OutputStreamData> m_outputs;
110 
111 
112 
114  ModuleData () noexcept;
115 
117  ~ModuleData () noexcept;
118 
124  void addOutput (std::unique_ptr<TObject> output);
125  };
126  }
127 }
128 
129 #endif
EL::Detail::OutputStreamData
all data needed to manage a given output stream
Definition: OutputStreamData.h:30
EL::Detail::ModuleData::m_inputTree
TTree * m_inputTree
the (main) tree in the input file
Definition: ModuleData.h:75
EL::Detail::ModuleData
the data the EventLoop core classes are sharing with the Module implementation
Definition: ModuleData.h:64
SH::MetaObject
A class that manages meta-data to be associated with an object.
Definition: MetaObject.h:56
EL::Detail::ModuleData::ModuleData
ModuleData() noexcept
explicit constructor for dependency reduction
asg
Definition: DataHandleTestTool.h:28
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
EL::Detail::ModuleData::m_inputFile
std::unique_ptr< TFile > m_inputFile
the input file pointer of the currently opened filed
Definition: ModuleData.h:72
EL::Detail::ModuleData::m_jobStats
std::unique_ptr< TTree > m_jobStats
Tree saving per-job statistics information.
Definition: ModuleData.h:94
EL::Detail::ModuleData::addOutput
void addOutput(std::unique_ptr< TObject > output)
add the given output object to the histogram output stream
Definition: ModuleData.cxx:34
EL::Worker
Definition: Worker.h:25
EL::Detail::ModuleData::m_tstore
xAOD::TStore * m_tstore
the TStore structure, if we use one
Definition: ModuleData.h:100
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
EL::Detail::ModuleData::m_evtStore
asg::SgTEvent * m_evtStore
the SgTEvent structure, if we use one
Definition: ModuleData.h:103
EL::Detail::ModuleData::m_outputs
std::map< std::string, Detail::OutputStreamData > m_outputs
the list of output files
Definition: ModuleData.h:109
merge.output
output
Definition: merge.py:17
AlgorithmData.h
xAOD::DiTauJetParameters::Detail
Detail
Definition: DiTauDefs.h:38
EL::Detail::ModuleData::m_inputTreeEntry
uint64_t m_inputTreeEntry
the entry in the input tree we are currently looking at
Definition: ModuleData.h:79
EL::Detail::ModuleData::m_algs
std::vector< Detail::AlgorithmData > m_algs
the list of algorithms
Definition: ModuleData.h:66
asg::SgTEvent
Wrapper for TEvent to make it look like StoreGate.
Definition: SgTEvent.h:44
EL::Detail::ModuleData::m_inputFileUrl
std::string m_inputFileUrl
the input file url of the currently opened file
Definition: ModuleData.h:69
EL::Detail::ModuleData::m_histOutput
OutputStreamData * m_histOutput
the histogram output stream
Definition: ModuleData.h:91
EL::Detail::ModuleData::m_eventsProcessed
uint64_t m_eventsProcessed
the number of events that have been processed
Definition: ModuleData.h:88
xAOD::TStore
A relatively simple transient store for objects created in analysis.
Definition: TStore.h:44
EL::Detail::ModuleData::m_tevent
xAOD::TEvent * m_tevent
the TEvent structure, if we use one
Definition: ModuleData.h:97
EL::Detail::ModuleData::m_skipEvent
bool m_skipEvent
whether we are skipping the current event
Definition: ModuleData.h:82
EL::Detail::ModuleData::m_worker
Worker * m_worker
the worker (to pass on to the algorithms)
Definition: ModuleData.h:106
EL::Detail::ModuleData::m_metaData
const SH::MetaObject * m_metaData
the meta-data we use
Definition: ModuleData.h:85
Global.h
Global.h
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:81