17 : fFileNames(files.
begin(), files.
end()),
18 fIt(fFileNames.
begin()),
28 if(getenv(
"CAFANA_OFFSET"))
29 offset = atoi(getenv(
"CAFANA_OFFSET"));
31 offset = std::max(offset, 0);
35 if(getenv(
"CAFANA_STRIDE"))
36 fStride = atoi(getenv(
"CAFANA_STRIDE"));
41 if(
fStride >
int(files.size())){
43 <<
" is greater than the number of files: " << files.size()
44 <<
". This is strange and inefficient." << std::endl;
54 fN = (int(files.size())-offset-1)/
fStride+1;
56 for(
const std::string&
loc: files){
57 if(
loc.rfind(
"/pnfs/", 0) == 0){
62 if(system(
"klist -5 -s || klist -s") != 0)
fgGotTickets =
true;
75 for(
int i = 0; i <
offset; ++i){
100 fFile = TFile::Open(loc.c_str());
103 for(
int i = 0; i <
fStride; ++i){
BEGIN_PROLOG TPC Trig offset(g4 rise time) ProjectToHeight
std::vector< std::string >::iterator fIt
Iterator into fFileNames.
BEGIN_PROLOG could also be cerr
process_name opflashCryoW ana
int fN
Number of files that will actually be returned.
std::vector< std::string > fFileNames
The list of files.
auto end(FixedBins< T, C > const &) noexcept
virtual ~FileListSource()
auto begin(FixedBins< T, C > const &) noexcept
FileListSource(const std::vector< std::string > &files, int stride=-1, int offset=-1)
default offset and stride mean obey cmd-line options
static bool fgGotTickets
Have we renewed our tickets?
virtual TFile * GetNextFile() override
Returns the next file in sequence, ready for reading.
TFile * fFile
The most-recently-returned file.