GET library
GETRunList.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETRunList.hh
3  *
4  * Include file for the GETRunList class.
5  */
6 //======================================================================
7 
8 #ifndef GET_RUN_LIST_HH
9 #define GET_RUN_LIST_HH
10 
11 //----------------------------------------------------------------------
12 // includes from GET library
13 #include "GETRunFile.hh"
14 
15 // includes from GCpp library
16 #include "GStringList.hh"
17 
18 
19 //======================================================================
20 /*! \class GETRunList
21  *
22  * This class defines a list of runs data files, instead of a
23  * single file.
24  *
25  */
26 class GETRunList : public GETRunFile
27 {
28  //------------------------------------------------------------
29  /*! \object_doc */
31  //------------------------------------------------------------
32 
33  protected:
34 
35  // data file
36  string run_file_pattern; ///< Pattern for file name selection
37  GStringList run_file_list; ///< List of effective run files
38  int current_file_num; ///< Number of currently opened file (-1 if none)
39 
40  u_int list_event_count; ///< Number of events in the file list
41 
42  public:
43  //----------------------------------------------------------
44  /** @name Constructors, affectation, destructor */
45  //@{
46  GETRunList ( const string & pattern = "", bool open = true );
47  virtual ~GETRunList ( );
48  //@}
49 
50  //----------------------------------------------------------
51  /** @name File operations */
52  //@{
53  virtual int Open ( );
54  virtual int Close ( );
55  virtual bool IsOpen ( ) const; // inline
56  virtual int OpenNext ( );
57 
58  virtual bool AtEnd ( ) const; // inline
59  //@}
60 
61  //----------------------------------------------------------
62  /** @name File information */
63  //@{
64  virtual int SetFilePattern ( const string & pattern );
65 
66  const string & GetFilePattern ( ) const; // inline
67  string & GetFilePattern ( ); // inline
68 
69  const GStringList & GetFileList ( ) const; // inline
70  GStringList & GetFileList ( ); // inline
71 
72  u_int GetFileCount ( ) const; // inline
73 
74  virtual void EventCountIncr ( ); // inline
75  int GetListEventCount ( ) const; // inline
76 
77  //@}
78 
79  //----------------------------------------------------------
80  /** @name ROOT related functions */
81  //@{
82  public:
83 
84  /*! for use within ROOT.*/
86  //@}
87 };
88 
89 
90 //----------------------------------------------------------------------
91 // Inline functions
92 #include "icc/GETRunList.icc"
93 
94 
95 //======================================================================
96 #endif
Definition: GETRunList.hh:26
virtual bool AtEnd() const
Definition: GETRunList.icc:15
u_int GetFileCount() const
Definition: GETRunList.icc:37
virtual bool IsOpen() const
Definition: GETRunList.icc:9
GETRunList(const string &pattern="", bool open=true)
Definition: GETRunList.cpp:18
u_int list_event_count
Number of events in the file list.
Definition: GETRunList.hh:40
virtual int SetFilePattern(const string &pattern)
Definition: GETRunList.cpp:152
int GetListEventCount() const
Definition: GETRunList.icc:47
GObject(GETRunList)
Definition: GETRunFile.hh:29
virtual int OpenNext()
Definition: GETRunList.cpp:111
string run_file_pattern
Pattern for file name selection.
Definition: GETRunList.hh:36
ClassDef(GETRunList, 0)
virtual void EventCountIncr()
Definition: GETRunList.icc:43
virtual ~GETRunList()
Definition: GETRunList.cpp:40
virtual int Open()
Definition: GETRunList.cpp:53
int current_file_num
Number of currently opened file (-1 if none)
Definition: GETRunList.hh:38
virtual int Close()
Definition: GETRunList.cpp:87
const GStringList & GetFileList() const
Definition: GETRunList.icc:29
GStringList run_file_list
List of effective run files.
Definition: GETRunList.hh:37
const string & GetFilePattern() const
Definition: GETRunList.icc:21