All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SAMProjectSource.h
Go to the documentation of this file.
1 #include <iostream>
2 #include <cassert>
3 
5 
6 /// IFDH interface (data handling)
7 namespace ifdh_ns {
8  class ifdh;
9 }
10 
11 namespace ana
12 {
13  /// Fetch files from a pre-existing SAM project
15  {
16  public:
17  /// \param proj SAM project name (not URL)
18  /// \param fileLimit Optional maximum number of files to process
19  SAMProjectSource(const std::string& proj, int fileLimit = -1);
20  virtual ~SAMProjectSource();
21 
22  virtual TFile* GetNextFile() override;
23 
24  int NFiles() const override {return fNFiles;}
25  protected:
26  ifdh_ns::ifdh *fIFDH;
27 
28  std::string fProjectURL;
29  std::string fProcessID;
30 
31  TFile* fFile; ///< The most-recently-returned file
32 
33  int fNFiles;
34 
35  static bool fgGotTickets;
36  };
37 }
ifdh_ns::ifdh * fIFDH
SAMProjectSource(const std::string &proj, int fileLimit=-1)
process_name opflashCryoW ana
int NFiles() const override
May return -1 indicating the number of files is not known.
Interface class for accessing ROOT files in sequence.
Definition: IFileSource.h:10
virtual TFile * GetNextFile() override
Returns the next file in sequence, ready for reading.
Fetch files from a pre-existing SAM project.
TFile * fFile
The most-recently-returned file.