KaliVeda
Toolkit for HIC analysis
KVINDRARunListReader Class Reference

Detailed Description

Utitlity base class for reading INDRA runlist files.

Use multiple inheritance with this class as one base class, then method "GoodRunLine" can be overridden to perform implementation-specific tasks.

Definition at line 18 of file KVINDRARunListReader.h.

#include <KVINDRARunListReader.h>

Inheritance diagram for KVINDRARunListReader:

Public Member Functions

 KVINDRARunListReader ()
 
virtual ~ KVINDRARunListReader ()
 
void CloseRLFile ()
 
KVRunListLineGetLineReader () const
 
Int_t GetRLLineNumber () const
 
Int_t GetRunListTrigger (const Char_t *field, const Char_t *fmt)
 
virtual void GoodRunLine ()
 
Bool_t IsNewRunList () const
 
Bool_t OpenRLFile (const Char_t *)
 
Bool_t ReadRLLine ()
 
void ReadRunList (const Char_t *name="")
 
void SetRLCommentChar (Char_t c)
 
void SetRLSeparatorChar (Char_t c)
 

Constructor & Destructor Documentation

◆ KVINDRARunListReader()

KVINDRARunListReader::KVINDRARunListReader ( )

Default ctor. We set default values for recognising comment lines ('#') and the separator character ('|')

Definition at line 20 of file KVINDRARunListReader.cpp.

◆ ~ KVINDRARunListReader()

virtual KVINDRARunListReader::~ KVINDRARunListReader ( )
virtual

Member Function Documentation

◆ CloseRLFile()

void KVINDRARunListReader::CloseRLFile ( )

Close current runlist file. Another file can be opened after this. If no file is open, do nothing.

Definition at line 85 of file KVINDRARunListReader.cpp.

◆ GetLineReader()

KVRunListLine* KVINDRARunListReader::GetLineReader ( ) const
inline

Definition at line 60 of file KVINDRARunListReader.h.

◆ GetRLLineNumber()

Int_t KVINDRARunListReader::GetRLLineNumber ( ) const
inline

Definition at line 67 of file KVINDRARunListReader.h.

◆ GetRunListTrigger()

Int_t KVINDRARunListReader::GetRunListTrigger ( const Char_t field,
const Char_t fmt 
)

Get trigger multiplicity for current line. Give field name which contains trigger information and format string 'fmt' containing e.g. "M>=%d" if trigger field info is written in form "M>=4" etc. etc. The last value read is kept (fTrigger), so that, if no trigger value is given for the current line, but one was given on a previous line, we assume that the previous value is valid until a new one is given. A value "-1" means no trigger has been set for any line in the file so far.

Definition at line 224 of file KVINDRARunListReader.cpp.

◆ GoodRunLine()

void KVINDRARunListReader::GoodRunLine ( )
virtual

This method should be overridden in derived class by the user. It is called every time that the fLineReader finds a line which is a "good run line" (see KVRunListLine::GoodRunLine()). The default behaviour is just to print the breakdown of the line in question on the screen.

Reimplemented in KVINDRADB4, KVINDRADB2, KVINDRADB1, and KVINDRADB.

Definition at line 205 of file KVINDRARunListReader.cpp.

◆ IsNewRunList()

Bool_t KVINDRARunListReader::IsNewRunList ( ) const
inline

Definition at line 35 of file KVINDRARunListReader.h.

◆ OpenRLFile()

Bool_t KVINDRARunListReader::OpenRLFile ( const Char_t filename)

Open file 'filename' for reading. Returns kTRUE if file can be opened (info message), kFALSE if not (error message) Reset fTrigger to -1 (in case we already read a different file)

Definition at line 57 of file KVINDRARunListReader.cpp.

◆ ReadRLLine()

Bool_t KVINDRARunListReader::ReadRLLine ( )

Read a line from current runlist file. If not a comment line (i.e. does not begin with 'fComment' character) then analyse it with fLineReader object. Returns kFALSE if no file is open or if file is not good for i/o Returns kFALSE if fLineReader has not been initialised Returns kFALSE if line cannot be read / end of file is reached

Definition at line 105 of file KVINDRARunListReader.cpp.

◆ ReadRunList()

void KVINDRARunListReader::ReadRunList ( const Char_t t = "")

This method will open the runlist file 't' and read its entire contents, calling user-overridable method "GoodRunLine(KVRunListLine*)" every time a line defining a new run is read from the file. If 't' is not given, we assume that the name of the run list file was passed to the constructor, and so the file should already be open in this case. Before calling this method, you should call SetRunListLineType() to define the class used to read each line, and SetRLCommentChar()/SetRLSeparatorChar() if you want to override the default comment/separator characters.

Definition at line 156 of file KVINDRARunListReader.cpp.

◆ SetRLCommentChar()

void KVINDRARunListReader::SetRLCommentChar ( Char_t  c)
inline

Definition at line 47 of file KVINDRARunListReader.h.

◆ SetRLSeparatorChar()

void KVINDRARunListReader::SetRLSeparatorChar ( Char_t  c)
inline

Definition at line 51 of file KVINDRARunListReader.h.