IFileSource.h
Go to the documentation of this file.
1 #pragma once
2 
3 class TFile;
4 
5 namespace ana
6 {
7  /// \brief Interface class for accessing ROOT files in sequence
8  ///
9  /// Used internally by \ref SpectrumLoaderBase etc.
11  {
12  public:
13  virtual ~IFileSource() {}
14  /// \brief Returns the next file in sequence, ready for reading
15  ///
16  /// A null return means that the end of the sequence has been reached.
17  /// DO NOT close or delete the file that is returned.
18  virtual TFile* GetNextFile() = 0;
19 
20  /// May return -1 indicating the number of files is not known
21  virtual int NFiles() const {return -1;}
22  };
23 }
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
virtual ~IFileSource()
Definition: IFileSource.h:13
virtual int NFiles() const
May return -1 indicating the number of files is not known.
Definition: IFileSource.h:21
virtual TFile * GetNextFile()=0
Returns the next file in sequence, ready for reading.
Interface class for accessing ROOT files in sequence.
Definition: IFileSource.h:10