ATLAS Offline Software
Trigger
TrigValidation
TrigValTools
src
TMultiFileLooper.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
13
#include "
TrigValTools/TMultiFileLooper.h
"
14
#include "TString.h"
15
16
#include <iostream>
17
18
using namespace
std;
19
20
Int_t
TMultiFileLooper::run
(
const
char
* fileListName,
const
char
*
/*rootDir*/
)
21
{
22
m_errorCode = 0;
23
24
if
(fileListName==0) {
25
cout <<
"Invalid file list (0)"
<< endl;
26
m_errorCode = 1;
27
return
m_errorCode;
28
}
29
30
ifstream ifs;
31
ifs.open(fileListName);
32
if
(!ifs) {
33
cout <<
"Cannot open file "
<< fileListName << endl;
34
m_errorCode = 1;
35
return
m_errorCode;
36
}
37
38
while
(!ifs.eof()) {
39
string
filename
;
40
ifs >>
filename
;
41
if
(
filename
!=
""
) addFile(
filename
.c_str());
42
}
43
44
return
run
();
45
}
46
47
48
Int_t
TMultiFileLooper::run
()
49
{
50
m_errorCode = 0;
51
beginJob();
52
53
vector<TString>::iterator
iter;
54
for
(iter=m_fileList.begin(); iter!=m_fileList.end(); ++iter) {
55
processFile(*iter);
56
}
57
58
endJob();
59
return
m_errorCode;
60
}
61
62
void
TMultiFileLooper::addFile
(
const
char
*
filename
)
63
{
64
if
(
filename
) m_fileList.push_back(TString(
filename
));
65
}
xAOD::iterator
JetConstituentVector::iterator iterator
Definition:
JetConstituentVector.cxx:68
TMultiFileLooper.h
TMultiFileLooper class.
run
int run(int argc, char *argv[])
Definition:
ttree2hdf5.cxx:28
TMultiFileLooper::addFile
void addFile(const char *filename)
Definition:
TMultiFileLooper.cxx:62
TMultiFileLooper::run
Int_t run()
Definition:
TMultiFileLooper.cxx:48
CaloCellTimeCorrFiller.filename
filename
Definition:
CaloCellTimeCorrFiller.py:24
Generated on Tue Jul 2 2024 21:29:24 for ATLAS Offline Software by
1.8.18