GET library
GETRunSerie.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETRunSerie.hh
3  *
4  * Include file for the GETRunSerie class.
5  */
6 //======================================================================
7 
8 #ifndef GET_RUN_SERIE_HH
9 #define GET_RUN_SERIE_HH
10 
11 //----------------------------------------------------------------------
12 // includes from GET library
13 #include "GETRunList.hh"
14 
15 // includes from GCpp library
16 #include "GIntervalList.hh"
17 
18 
19 //======================================================================
20 /*! \class GETRunSerie
21  *
22  * This class defines a serie of runs data files, identified by
23  * a list of run numbers and a file pattern.
24  *
25  * The file pattern must contain a "%R" indicating where the run
26  * number is specified in the file name, or "%<n>R" if the run
27  * number is padded with 0.
28  */
29 class GETRunSerie : public GETRunList
30 {
31  //------------------------------------------------------------
32  /*! \object_doc */
34  //------------------------------------------------------------
35 
36  protected:
37 
38  // data file
39  GString run_pattern; ///< Pattern for file name (containing "%*r" information)
40  GIntervalList run_serie; ///< List of effective run files
41  int current_run_num; ///< Current run number (-1 if none)
42 
43  u_int serie_event_count; ///< Number of events in the runs serie
44 
45  public:
46  //----------------------------------------------------------
47  /** @name Constructors, affectation, destructor */
48  //@{
49  GETRunSerie ( const string & pattern = "",
50  const string & serie = "", bool open = true );
51  virtual ~GETRunSerie ( );
52  //@}
53 
54  //----------------------------------------------------------
55  /** @name File operations */
56  //@{
57  virtual int Open ( );
58  virtual int Close ( );
59  virtual bool IsOpen ( ) const; // inline
60  virtual int OpenNext ( );
61 
62  virtual bool AtEnd ( ) const; // inline
63 
64  virtual int SetNextRunList ( bool skip = true );
65  virtual int SetRunList ( int rnum );
66 
67  //@}
68 
69  //----------------------------------------------------------
70  /** @name File information */
71  //@{
72  virtual int SetRunPattern ( const string & pattern );
73  virtual int SetRunSerie ( const string & serie );
74 
75  const string & GetRunPattern ( ) const; // inline
76  string & GetRunPattern ( ); // inline
77 
78  string GetRunSerie ( ) const; // inline
79 
80  u_int GetRunCount ( ) const; // inline
81  int GetCurrentRun ( ) const; // inline
82  void InitCurrentRun ( ); // inline
83 
84  virtual void EventCountIncr ( ); // inline
85  int GetSerieEventCount ( ) const; // inline
86 
87  //@}
88 
89  //----------------------------------------------------------
90  /** @name ROOT related functions */
91  //@{
92  public:
93 
94  /*! for use within ROOT.*/
96  //@}
97 };
98 
99 
100 //----------------------------------------------------------------------
101 // Inline functions
102 #include "icc/GETRunSerie.icc"
103 
104 
105 //======================================================================
106 #endif
virtual int SetRunList(int rnum)
Definition: GETRunSerie.cpp:237
Definition: GETRunList.hh:26
virtual ~GETRunSerie()
Definition: GETRunSerie.cpp:52
const string & GetRunPattern() const
Definition: GETRunSerie.icc:21
virtual bool IsOpen() const
Definition: GETRunSerie.icc:9
GString run_pattern
Pattern for file name (containing &quot;%*r&quot; information)
Definition: GETRunSerie.hh:39
virtual int Open()
Definition: GETRunSerie.cpp:65
virtual int SetNextRunList(bool skip=true)
Definition: GETRunSerie.cpp:189
int current_run_num
Current run number (-1 if none)
Definition: GETRunSerie.hh:41
int GetCurrentRun() const
Definition: GETRunSerie.icc:37
int GetSerieEventCount() const
Definition: GETRunSerie.icc:51
GIntervalList run_serie
List of effective run files.
Definition: GETRunSerie.hh:40
GObject(GETRunSerie)
void InitCurrentRun()
Definition: GETRunSerie.icc:41
virtual int SetRunSerie(const string &serie)
Definition: GETRunSerie.cpp:308
virtual int SetRunPattern(const string &pattern)
Definition: GETRunSerie.cpp:269
GETRunSerie(const string &pattern="", const string &serie="", bool open=true)
Definition: GETRunSerie.cpp:20
u_int GetRunCount() const
Definition: GETRunSerie.icc:33
virtual int Close()
Definition: GETRunSerie.cpp:111
virtual bool AtEnd() const
Definition: GETRunSerie.icc:15
virtual void EventCountIncr()
Definition: GETRunSerie.icc:47
string GetRunSerie() const
Definition: GETRunSerie.icc:29
virtual int OpenNext()
Definition: GETRunSerie.cpp:138
u_int serie_event_count
Number of events in the runs serie.
Definition: GETRunSerie.hh:43
ClassDef(GETRunSerie, 0)
Definition: GETRunSerie.hh:29