Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4MbsFile Class Reference

Implements the gsi mbs stream server into the go4 classes. More...

#include <TGo4MbsFile.h>

Inheritance diagram for TGo4MbsFile:

TGo4MbsSource TGo4EventSource List of all members.

Public Member Functions

 TGo4MbsFile (const char *name)
 TGo4MbsFile ()
 TGo4MbsFile (TGo4MbsFileParameter *par)
 ~TGo4MbsFile ()
virtual Int_t Close ()
 Close the file or connection.
virtual Int_t Open ()
 Open the file or connection.
virtual Int_t NextEvent ()
 Requests the next event from mbs source.
const char * GetTagName () const
 Name of the Tagfile.
const char * GetCurrentTagName () const
const char * GetCurrentFileName () const
virtual const char * GetActiveName ()
 interface from eventsource base class to give active file

Public Attributes

Bool_t fbFirstEvent

Static Public Attributes

static const Text_t fgcNOTAGFILE [] = "GO4-NOLMDTAG"
 string to indicate that no lmd tagfile is chosen
static const Text_t fgcWILDFILE [] = ".go4inputs"
 Filename of default multi input file from wildcard evaluation.
static const Text_t fgcLMDSUF [] = ".lmd"
 standard suffix for listmode data files
static const Text_t fgcFILELISTSUF [] = ".lml"
 standard suffix for list of listmode files

Private Member Functions

Int_t NextFile ()
 For multiple input mode: Open next file in list.
Int_t OpenFile ()
 Open current file/tagfile.
Int_t CloseFile ()
 Close current file/tagfile.
Int_t NewFileAction (Bool_t dosave=kTRUE)
 Called whenever new file is opened in multiple mode.

Private Attributes

TString fxTagFile
 Name of the tagfile associated with the listmode event file.
TString fxCurrentFile
 Currently processed file (for multiple input mode).
TString fxCurrentTag
 Currently processed tagfile (for multiple input mode).
TString fxMultiName
 Currently processed multiple input filename (for multiple input mode).
Bool_t fbMultipleMode
 kTRUE if multiple input mode is active
Bool_t fbWildcardMode
 kTRUE if wildcard input mode is active
std::ifstream * fxMultiFile
 file that contains the list of mbs filenames.
Bool_t fbFileOpen
 This indicates if the current file is open or not.

Detailed Description

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

Definition at line 31 of file TGo4MbsFile.h.


Constructor & Destructor Documentation

TGo4MbsFile::TGo4MbsFile const char *  name  ) 
 

Definition at line 48 of file TGo4MbsFile.cxx.

References TGo4Log::Debug(), fgcNOTAGFILE, fxTagFile, Open(), and TRACE.

TGo4MbsFile::TGo4MbsFile  ) 
 

Definition at line 37 of file TGo4MbsFile.cxx.

References TRACE.

TGo4MbsFile::TGo4MbsFile TGo4MbsFileParameter par  ) 
 

Definition at line 64 of file TGo4MbsFile.cxx.

References TGo4Log::Debug(), fxTagFile, TGo4MbsFileParameter::GetEventInterval(), TGo4MbsFileParameter::GetStartEvent(), TGo4MbsFileParameter::GetStopEvent(), TGo4MbsFileParameter::GetTagName(), Open(), TGo4MbsSource::SetEventInterval(), TGo4MbsSource::SetStartEvent(), TGo4MbsSource::SetStopEvent(), and TRACE.

TGo4MbsFile::~TGo4MbsFile  ) 
 

Definition at line 86 of file TGo4MbsFile.cxx.

References Close(), and TRACE.


Member Function Documentation

Int_t TGo4MbsFile::Close  )  [virtual]
 

Close the file or connection.

Reimplemented from TGo4MbsSource.

Definition at line 187 of file TGo4MbsFile.cxx.

References CloseFile(), TGo4MbsSource::fbIsOpen, fbWildcardMode, TGo4EventSource::fguTXTLEN, fxMultiFile, fxMultiName, TGo4EventSource::GetCreateStatus(), GETEVT__SUCCESS, and TRACE.

Referenced by ~TGo4MbsFile().

Int_t TGo4MbsFile::Open  )  [virtual]
 

Open the file or connection.

Reimplemented from TGo4MbsSource.

Definition at line 217 of file TGo4MbsFile.cxx.

References TGo4MbsSource::fbIsOpen, fbMultipleMode, fbWildcardMode, fgcFILELISTSUF, fgcLMDSUF, fgcWILDFILE, TGo4EventSource::fguTXTLEN, TGo4MbsSource::fuEventInterval, TGo4MbsSource::fuStartEvent, TGo4MbsSource::fuStopEvent, fxMultiFile, fxMultiName, GetCurrentFileName(), GetCurrentTagName(), GETEVT__NOFILE, TGo4Analysis::Instance(), NewFileAction(), NextFile(), TGo4EventSource::SetCreateStatus(), TGo4EventSource::SetErrMess(), and TRACE.

Referenced by TGo4MbsFile().

Int_t TGo4MbsFile::NextEvent  )  [virtual]
 

Requests the next event from mbs source.

Returns event status value.

Reimplemented from TGo4MbsSource.

Definition at line 92 of file TGo4MbsFile.cxx.

References f_evt_error(), f_evt_get_tagnext(), fbFirstEvent, fbMultipleMode, TGo4EventSource::fguTXTLEN, TGo4MbsSource::fuEventCounter, TGo4MbsSource::fuEventInterval, TGo4MbsSource::fuStartEvent, TGo4MbsSource::fuStopEvent, TGo4MbsSource::fxEvent, TGo4MbsSource::fxInputChannel, GetCurrentFileName(), GetCurrentTagName(), TGo4EventSource::GetEventStatus(), GETEVT__NOMORE, NewFileAction(), NextFile(), TGo4EventSource::SetErrMess(), TGo4EventSource::SetEventStatus(), and TRACE.

const char* TGo4MbsFile::GetTagName  )  const [inline]
 

Name of the Tagfile.

Definition at line 52 of file TGo4MbsFile.h.

References fxTagFile.

Referenced by NextFile().

const char* TGo4MbsFile::GetCurrentTagName  )  const [inline]
 

Definition at line 54 of file TGo4MbsFile.h.

References fxCurrentTag.

Referenced by NextEvent(), Open(), and OpenFile().

const char* TGo4MbsFile::GetCurrentFileName  )  const [inline]
 

Definition at line 56 of file TGo4MbsFile.h.

References fxCurrentFile.

Referenced by GetActiveName(), NewFileAction(), NextEvent(), Open(), and OpenFile().

const char * TGo4MbsFile::GetActiveName  )  [virtual]
 

interface from eventsource base class to give active file

Reimplemented from TGo4EventSource.

Definition at line 536 of file TGo4MbsFile.cxx.

References GetCurrentFileName().

Int_t TGo4MbsFile::NextFile  )  [private]
 

For multiple input mode: Open next file in list.

Definition at line 370 of file TGo4MbsFile.cxx.

References CloseFile(), fbMultipleMode, fgcNOTAGFILE, TGo4EventSource::fguTXTLEN, TGo4MbsSource::fuEventCounter, TGo4MbsSource::fuEventInterval, TGo4MbsSource::fuStartEvent, TGo4MbsSource::fuStopEvent, fxCurrentFile, fxCurrentTag, fxMultiFile, fxMultiName, GETEVT__NOFILE, GetTagName(), TGo4Analysis::Instance(), OpenFile(), TGo4EventSource::SetCreateStatus(), and TGo4EventSource::SetErrMess().

Referenced by NextEvent(), and Open().

Int_t TGo4MbsFile::OpenFile  )  [private]
 

Open current file/tagfile.

Definition at line 471 of file TGo4MbsFile.cxx.

References TGo4Log::Debug(), f_evt_error(), f_evt_get_tagopen(), fbFileOpen, fbFirstEvent, fgcNOTAGFILE, TGo4EventSource::fguTXTLEN, fxCurrentTag, TGo4MbsSource::fxInfoHeader, TGo4MbsSource::fxInputChannel, TGo4EventSource::GetCreateStatus(), GetCurrentFileName(), GetCurrentTagName(), GETEVT__SUCCESS, TGo4EventSource::SetCreateStatus(), and TGo4EventSource::SetErrMess().

Referenced by NextFile().

Int_t TGo4MbsFile::CloseFile  )  [private]
 

Close current file/tagfile.

Definition at line 509 of file TGo4MbsFile.cxx.

References f_evt_get_tagclose(), fbFileOpen, TGo4MbsSource::fxInputChannel, and GETEVT__SUCCESS.

Referenced by Close(), and NextFile().

Int_t TGo4MbsFile::NewFileAction Bool_t  dosave = kTRUE  )  [private]
 

Called whenever new file is opened in multiple mode.

For ctor, argument dosave should be false (no autosave possible inside InitEventClasses())

Definition at line 518 of file TGo4MbsFile.cxx.

References TGo4Analysis::AutoSave(), TGo4Analysis::ClearObjects(), GetCurrentFileName(), TGo4Analysis::Instance(), TGo4Analysis::IsAutoSaveFileChange(), TGo4Analysis::SetAutoSaveFile(), and TGo4Analysis::SetNewInputFile().

Referenced by NextEvent(), and Open().


Member Data Documentation

const Text_t TGo4MbsFile::fgcNOTAGFILE = "GO4-NOLMDTAG" [static]
 

string to indicate that no lmd tagfile is chosen

Definition at line 32 of file TGo4MbsFile.cxx.

Referenced by NextFile(), OpenFile(), and TGo4MbsFile().

const Text_t TGo4MbsFile::fgcWILDFILE = ".go4inputs" [static]
 

Filename of default multi input file from wildcard evaluation.

Definition at line 33 of file TGo4MbsFile.cxx.

Referenced by Open().

const Text_t TGo4MbsFile::fgcLMDSUF = ".lmd" [static]
 

standard suffix for listmode data files

Definition at line 34 of file TGo4MbsFile.cxx.

Referenced by Open().

const Text_t TGo4MbsFile::fgcFILELISTSUF = ".lml" [static]
 

standard suffix for list of listmode files

Definition at line 35 of file TGo4MbsFile.cxx.

Referenced by Open().

Bool_t TGo4MbsFile::fbFirstEvent
 

Definition at line 73 of file TGo4MbsFile.h.

Referenced by NextEvent(), and OpenFile().

TString TGo4MbsFile::fxTagFile [private]
 

Name of the tagfile associated with the listmode event file.

Definition at line 92 of file TGo4MbsFile.h.

Referenced by GetTagName(), and TGo4MbsFile().

TString TGo4MbsFile::fxCurrentFile [private]
 

Currently processed file (for multiple input mode).

Definition at line 95 of file TGo4MbsFile.h.

Referenced by GetCurrentFileName(), and NextFile().

TString TGo4MbsFile::fxCurrentTag [private]
 

Currently processed tagfile (for multiple input mode).

Definition at line 98 of file TGo4MbsFile.h.

Referenced by GetCurrentTagName(), NextFile(), and OpenFile().

TString TGo4MbsFile::fxMultiName [private]
 

Currently processed multiple input filename (for multiple input mode).

Definition at line 101 of file TGo4MbsFile.h.

Referenced by Close(), NextFile(), and Open().

Bool_t TGo4MbsFile::fbMultipleMode [private]
 

kTRUE if multiple input mode is active

Definition at line 104 of file TGo4MbsFile.h.

Referenced by NextEvent(), NextFile(), and Open().

Bool_t TGo4MbsFile::fbWildcardMode [private]
 

kTRUE if wildcard input mode is active

Definition at line 107 of file TGo4MbsFile.h.

Referenced by Close(), and Open().

std::ifstream* TGo4MbsFile::fxMultiFile [private]
 

file that contains the list of mbs filenames.

format should be: "filename.lmd tagfilename" for each line.

Definition at line 111 of file TGo4MbsFile.h.

Referenced by Close(), NextFile(), and Open().

Bool_t TGo4MbsFile::fbFileOpen [private]
 

This indicates if the current file is open or not.

Definition at line 114 of file TGo4MbsFile.h.

Referenced by CloseFile(), and OpenFile().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:01:05 2008 for Go4-v3.04-1 by  doxygen 1.4.2