v2.10-0 (21000JUN2005)

Go4EventServer
Class TGo4MbsFile


class TGo4MbsFile
derived from TGo4MbsSource

Implements the gsi mbs stream server into the
go4 classes. This is an alias for the MbsSource
Class with parameter GETEVT__FILE

Author:
J. Adamczewski
Since: 1/2001

Field Summary
 private Bool_tfbFileOpen
          This indicates if the current file is open or not
 Bool_tfbFirstEvent
           
 private Bool_tfbMultipleMode
          kTRUE if multiple input mode is active
 private Bool_tfbWildcardMode
          kTRUE if wildcard input mode is active
 const static const Text_t[]fgcFILELISTSUF
          standard suffix for list of listmode files
 const static const Text_t[]fgcLMDSUF
          standard suffix for listmode data files
 const static const Text_t[]fgcNOTAGFILE
          string to indicate that no lmd tagfile is chosen
 const static const Text_t[]fgcWILDFILE
          Filename of default multi input file from wildcard evaluation
 private TStringfxCurrentFile
          Currently processed file (for multiple input mode)
 private TStringfxCurrentTag
          Currently processed tagfile (for multiple input mode)
 private std::ifstream*fxMultiFile
          file that contains the list of mbs filenames.
format should be: "filename.lmd tagfilename" for each line.
 private TStringfxMultiName
          Currently processed multiple input filename (for multiple input mode)
 private TStringfxTagFile
          Name of the tagfile associated with the listmode event file.

Fields inherited from class Go4EventServer.TGo4MbsSource
fbDataCopyMode, fbIsOpen, fguEVHEBYCHAR, fguLONGBYCHAR, fguLONGBYSHORT, fguSHORTBYCHAR, fiTimeout, fuEventCounter, fuEventInterval, fuStartEvent, fuStopEvent, fxBuffer, fxEvent, fxInfoHeader, fxInputChannel, fxPrEventPar

Fields inherited from interface Go4Event.TGo4EventSource
fgiTIMEOUTDEFAULT, fguTXTLEN

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4MbsFile(const char * name)
           
TGo4MbsFile()
           
TGo4MbsFile(TGo4MbsFileParameter* par)
           

Destructor Summary
~TGo4MbsFile()
           

Method Summary
 virtual Int_tClose()
          Close the file or connection.
 private Int_tCloseFile()
          Close current file/tagfile.
 const const char *GetCurrentFileName()
           
 const const char *GetCurrentTagName()
           
 const const char *GetTagName()
          Name of the Tagfile
 private Int_tNewFileAction(Bool_t dosave)
          Called whenever new file is opened in multiple mode.
 virtual Int_tNextEvent()
          Requests the next event from mbs source.
 private Int_tNextFile()
          For multiple input mode: Open next file in list.
 virtual Int_tOpen()
          Open the file or connection.
 private Int_tOpenFile()
          Open current file/tagfile.

Methods inherited from class Go4EventServer.TGo4MbsSource
BuildMbsEvent, GetBufferHeader, GetInfoHeader, SetDataCopyMode, SetEventInterval, SetPrintEvent, SetStartEvent, SetStopEvent, SetTimeout

Methods inherited from interface Go4Event.TGo4EventSource
Clear, GetCreateStatus, GetErrMess, GetEventStatus, SetCreateStatus, SetErrMess, SetEventStatus, ThrowError

Methods inherited from class TNamed
operator=, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Print, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Field Detail

fbFileOpen

private Bool_t fbFileOpen
This indicates if the current file is open or not

fbFirstEvent

public Bool_t fbFirstEvent

fbMultipleMode

private Bool_t fbMultipleMode
kTRUE if multiple input mode is active

fbWildcardMode

private Bool_t fbWildcardMode
kTRUE if wildcard input mode is active

fgcFILELISTSUF

public const static const Text_t[] fgcFILELISTSUF
standard suffix for list of listmode files

fgcLMDSUF

public const static const Text_t[] fgcLMDSUF
standard suffix for listmode data files

fgcNOTAGFILE

public const static const Text_t[] fgcNOTAGFILE
string to indicate that no lmd tagfile is chosen

fgcWILDFILE

public const static const Text_t[] fgcWILDFILE
Filename of default multi input file from wildcard evaluation

fxCurrentFile

private TString fxCurrentFile
Currently processed file (for multiple input mode)

fxCurrentTag

private TString fxCurrentTag
Currently processed tagfile (for multiple input mode)

fxMultiFile

private std::ifstream* fxMultiFile
file that contains the list of mbs filenames.
format should be: "filename.lmd tagfilename" for each line.

fxMultiName

private TString fxMultiName
Currently processed multiple input filename (for multiple input mode)

fxTagFile

private TString fxTagFile
Name of the tagfile associated with the listmode event file.
Constructor Detail

TGo4MbsFile

public TGo4MbsFile(const char * name)

TGo4MbsFile

public TGo4MbsFile()

TGo4MbsFile

public TGo4MbsFile(TGo4MbsFileParameter* par)
Method Detail

~TGo4MbsFile

public synchronized ~TGo4MbsFile()
Method Detail

Close

public virtual Int_t Close()
Close the file or connection.

CloseFile

private Int_t CloseFile()
Close current file/tagfile.

GetCurrentFileName

public const const char * GetCurrentFileName()

GetCurrentTagName

public const const char * GetCurrentTagName()

GetTagName

public const const char * GetTagName()
Name of the Tagfile

NewFileAction

private Int_t NewFileAction(Bool_t dosave)
Called whenever new file is opened in multiple mode.
For ctor, argument dosave should be false
(no autosave possible inside InitEventClasses())

NextEvent

public virtual Int_t NextEvent()
Requests the next event from mbs source. Returns event status value.

NextFile

private Int_t NextFile()
For multiple input mode: Open next file in list.

Open

public virtual Int_t Open()
Open the file or connection.

OpenFile

private Int_t OpenFile()
Open current file/tagfile.

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005