ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
16#include <TString.h>
17#include <TTree.h>
18
19//
20// method implementations
21//
22
23namespace 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);
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}
TString m_fileExecutedName
the name of the file being executed, to be stored inside m_fileExecutedTree
std::unique_ptr< TTree > m_fileExecutedTree
the tree containing the list of files for which fileExecute has been called
TString * m_fileExecutedNamePtr
pointer to m_fileExecutedName used as the branch address
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:179
This module defines the arguments passed from the BATCH driver to the BATCH worker.
::StatusCode StatusCode
StatusCode definition for legacy code.
the data the EventLoop core classes are sharing with the Module implementation
Definition ModuleData.h:64