GET library
|
#include <GETRunList.hh>
Public Member Functions | |
Constructors, affectation, destructor | |
GETRunList (const string &pattern="", bool open=true) | |
virtual | ~GETRunList () |
File operations | |
virtual int | Open () |
virtual int | Close () |
virtual bool | IsOpen () const |
virtual int | OpenNext () |
virtual bool | AtEnd () const |
File information | |
virtual int | SetFilePattern (const string &pattern) |
const string & | GetFilePattern () const |
string & | GetFilePattern () |
const GStringList & | GetFileList () const |
GStringList & | GetFileList () |
u_int | GetFileCount () const |
virtual void | EventCountIncr () |
int | GetListEventCount () const |
ROOT related functions | |
ClassDef (GETRunList, 0) | |
Public Member Functions inherited from GETRunFile | |
GETRunFile (const string &fname="", bool open=true) | |
virtual | ~GETRunFile () |
virtual int | Open (const string &fname) |
int | GetFileLun () const |
virtual int | SetFileName (const string &fname) |
const string & | GetFileName () const |
string & | GetFileName () |
FILE * | GetFilePtr () |
int | GetFileEventCount () const |
ClassDef (GETRunFile, 0) | |
Protected Attributes | |
int | current_file_num |
Number of currently opened file (-1 if none) | |
u_int | list_event_count |
Number of events in the file list. | |
GStringList | run_file_list |
List of effective run files. | |
string | run_file_pattern |
Pattern for file name selection. | |
Protected Attributes inherited from GETRunFile | |
u_int | file_event_count |
Number of events in the file. | |
string | run_file_name |
Name of the experimental data file. | |
FILE * | run_file_ptr |
Pointer to experimental data file. | |
Private Member Functions | |
GObject (GETRunList) | |
This class defines a list of runs data files, instead of a single file.
GETRunList::GETRunList | ( | const string & | pattern = "" , |
bool | open = true |
||
) |
Constructor.
pattern | pattern for the file list selection |
open | whether the first file should be opened when created |
References current_file_num, list_event_count, Open(), run_file_pattern, and SetFilePattern().
|
virtual |
Destructor.
|
inlinevirtual |
Return true if at end of the last file in the list. The function also returns true if no file is opened.
Reimplemented from GETRunFile.
Reimplemented in GETRunSerie.
References GETRunFile::AtEnd(), current_file_num, and GetFileCount().
Referenced by GETRunSerie::AtEnd(), and GETRunSerie::OpenNext().
GETRunList::ClassDef | ( | GETRunList | , |
0 | |||
) |
for use within ROOT.
|
virtual |
Close the current run file, if open. The function returns 0 if no error occured
Reimplemented from GETRunFile.
Reimplemented in GETRunSerie.
References GETRunFile::Close(), current_file_num, IsOpen(), and GETRunFile::IsOpen().
Referenced by GETRunSerie::Close(), and GETRunSerie::OpenNext().
|
inlinevirtual |
Increment the event counter.
Reimplemented from GETRunFile.
Reimplemented in GETRunSerie.
References GETRunFile::EventCountIncr(), and list_event_count.
Referenced by GETRunSerie::EventCountIncr().
|
inline |
Return the number of files in the current list of files.
References run_file_list.
Referenced by AtEnd(), Open(), OpenNext(), and GETRunSerie::SetRunList().
|
inline |
Return the list of file names.
References run_file_list.
|
inline |
Return the list of file names.
References run_file_list.
|
inline |
Return the pattern for the files selection.
References run_file_pattern.
|
inline |
Return the pattern for the files selection.
References run_file_pattern.
|
inline |
Return the event counter since last file list started.
References list_event_count.
|
private |
Macro from GCpp library that defines the following functions:
|
inlinevirtual |
Return true if the file is currently opened.
Reimplemented from GETRunFile.
Reimplemented in GETRunSerie.
References current_file_num, and GETRunFile::IsOpen().
Referenced by Close(), GETRunSerie::Close(), GETRunSerie::IsOpen(), Open(), OpenNext(), GETRunSerie::OpenNext(), and SetFilePattern().
|
virtual |
Open the file list, starting at first file.
Reimplemented from GETRunFile.
Reimplemented in GETRunSerie.
References current_file_num, GetFileCount(), IsOpen(), list_event_count, GETRunFile::Open(), run_file_list, and GETRunFile::run_file_name.
Referenced by GETRunList(), GETRunSerie::Open(), and GETRunSerie::OpenNext().
|
virtual |
Open the next effective file. It returns -1 when there no next file, or a positive value in case of error.
Reimplemented from GETRunFile.
Reimplemented in GETRunSerie.
References GETRunFile::Close(), current_file_num, GetFileCount(), IsOpen(), GETRunFile::Open(), and run_file_list.
Referenced by GETRunSerie::OpenNext().
|
virtual |
Defines the list of file names according to the pattern argument. If successful, it initializes the current selected file. The function returns 0 if no error occured. If the file is already opened, an error is returned.
pattern | pattern for the file list selection |
References current_file_num, IsOpen(), run_file_list, GETRunFile::run_file_name, and run_file_pattern.
Referenced by GETRunList(), and GETRunSerie::SetRunList().