ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDTools
EventLoop
Root
FileExecutedModule.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
9
//
10
// includes
11
//
12
13
#include <
EventLoop/FileExecutedModule.h
>
14
15
#include <
EventLoop/ModuleData.h
>
16
#include <TString.h>
17
#include <TTree.h>
18
19
//
20
// method implementations
21
//
22
23
namespace
EL
24
{
25
namespace
Detail
26
{
27
StatusCode
FileExecutedModule ::
28
onInitialize (
ModuleData
&
/*data*/
)
29
{
30
m_fileExecutedTree
= std::make_unique<TTree>
31
(
"EventLoop_FileExecuted"
,
"executed files"
);
32
m_fileExecutedTree
->SetDirectory (
nullptr
);
33
m_fileExecutedTree
->Branch (
"file"
, &
m_fileExecutedNamePtr
);
34
return
StatusCode::SUCCESS;
35
}
36
37
38
39
StatusCode
FileExecutedModule ::
40
onFileExecute (
ModuleData
& data)
41
{
42
auto
split
= data.m_inputFileUrl.rfind (
'/'
);
43
if
(
split
!= std::string::npos)
44
m_fileExecutedName
= data.m_inputFileUrl.substr (
split
+ 1);
45
else
46
m_fileExecutedName
= data.m_inputFileUrl;
47
m_fileExecutedTree
->Fill ();
48
return
StatusCode::SUCCESS;
49
}
50
51
52
53
StatusCode
FileExecutedModule ::
54
postFinalize (
ModuleData
& data)
55
{
56
data.addOutput (std::move (
m_fileExecutedTree
));
57
return
StatusCode::SUCCESS;
58
}
59
}
60
}
FileExecutedModule.h
ModuleData.h
EL::Detail::FileExecutedModule::m_fileExecutedName
TString m_fileExecutedName
the name of the file being executed, to be stored inside m_fileExecutedTree
Definition
FileExecutedModule.h:53
EL::Detail::FileExecutedModule::m_fileExecutedTree
std::unique_ptr< TTree > m_fileExecutedTree
the tree containing the list of files for which fileExecute has been called
Definition
FileExecutedModule.h:48
EL::Detail::FileExecutedModule::m_fileExecutedNamePtr
TString * m_fileExecutedNamePtr
pointer to m_fileExecutedName used as the branch address
Definition
FileExecutedModule.h:61
split
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition
hcg.cxx:179
EL::Detail
Definition
AsgComponentFactories.h:20
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition
AsgComponentFactories.h:16
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EL::Detail::ModuleData
the data the EventLoop core classes are sharing with the Module implementation
Definition
ModuleData.h:64
Generated on
for ATLAS Offline Software by
1.17.0