#include <TGo4MbsFile.h>
Public Member Functions | |
TGo4MbsFile (const char *name) | |
TGo4MbsFile () | |
TGo4MbsFile (TGo4MbsFileParameter *par) | |
~TGo4MbsFile () | |
virtual Int_t | Close () |
virtual Int_t | Open () |
virtual Int_t | NextEvent () |
const char * | GetTagName () const |
const char * | GetCurrentTagName () const |
const char * | GetCurrentFileName () const |
virtual const char * | GetActiveName () |
Static Public Attributes | |
static const char * | fgcNOTAGFILE = "GO4-NOLMDTAG" |
static const char * | fgcLMDSUF = ".lmd" |
static const char * | fgcFILELISTSUF = ".lml" |
Private Member Functions | |
void | AddFileName (const char *name, const char *tagname=0, bool isonly=kFALSE) |
Int_t | NextFile () |
Int_t | OpenFile () |
Int_t | CloseFile () |
Int_t | NewFileAction (Bool_t dosave=kTRUE) |
Private Attributes | |
TString | fxTagFile |
TString | fxCurrentFile |
TString | fxCurrentTag |
TList * | fxMultiFile |
Bool_t | fbFileOpen |
Bool_t | fbShowInfo |
Implements the gsi mbs stream server into the go4 classes. This is an alias for the MbsSource Class with parameter GETEVT__FILE
Definition at line 31 of file TGo4MbsFile.h.
TGo4MbsFile::TGo4MbsFile | ( | const char * | name | ) |
Definition at line 50 of file TGo4MbsFile.cxx.
References AddFileName(), TGo4Log::Debug(), fgcNOTAGFILE, fxTagFile, GO4TRACE, and Open().
TGo4MbsFile::TGo4MbsFile | ( | ) |
Definition at line 38 of file TGo4MbsFile.cxx.
References GO4TRACE.
TGo4MbsFile::TGo4MbsFile | ( | TGo4MbsFileParameter * | par | ) |
Definition at line 69 of file TGo4MbsFile.cxx.
References AddFileName(), TGo4Log::Debug(), fxTagFile, TGo4MbsFileParameter::GetMoreName(), TGo4MbsFileParameter::GetTagName(), GO4TRACE, TGo4MbsFileParameter::NumMoreFiles(), and Open().
TGo4MbsFile::~TGo4MbsFile | ( | ) |
Definition at line 93 of file TGo4MbsFile.cxx.
References Close(), fxMultiFile, and GO4TRACE.
void TGo4MbsFile::AddFileName | ( | const char * | name, | |
const char * | tagname = 0 , |
|||
bool | isonly = kFALSE | |||
) | [private] |
Definition at line 101 of file TGo4MbsFile.cxx.
References fgcFILELISTSUF, fgcNOTAGFILE, TGo4EventSource::fguTXTLEN, fxMultiFile, GETEVT__NOFILE, TGo4FileSource::ProducesFilesList(), TGo4EventSource::SetCreateStatus(), and TGo4EventSource::SetErrMess().
Referenced by TGo4MbsFile().
Int_t TGo4MbsFile::Close | ( | ) | [virtual] |
Close the file or connection.
Reimplemented from TGo4MbsSource.
Definition at line 251 of file TGo4MbsFile.cxx.
References CloseFile(), TGo4MbsSource::fbIsOpen, fxMultiFile, TGo4EventSource::GetCreateStatus(), GETEVT__SUCCESS, and GO4TRACE.
Referenced by ~TGo4MbsFile().
Int_t TGo4MbsFile::CloseFile | ( | ) | [private] |
Close current file/tagfile.
Definition at line 414 of file TGo4MbsFile.cxx.
References f_evt_get_tagclose(), fbFileOpen, TGo4MbsSource::fxInputChannel, and GETEVT__SUCCESS.
Referenced by Close(), and NextFile().
const char * TGo4MbsFile::GetActiveName | ( | ) | [virtual] |
interface from eventsource base class to give active file
Reimplemented from TGo4EventSource.
Definition at line 440 of file TGo4MbsFile.cxx.
References GetCurrentFileName().
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::GetCurrentTagName | ( | ) | const [inline] |
Definition at line 54 of file TGo4MbsFile.h.
References fxCurrentTag.
Referenced by NextEvent(), and OpenFile().
const char* TGo4MbsFile::GetTagName | ( | ) | const [inline] |
Name of the Tagfile
Definition at line 52 of file TGo4MbsFile.h.
References fxTagFile.
Referenced by 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 422 of file TGo4MbsFile.cxx.
References TGo4Analysis::AutoSave(), TGo4Analysis::ClearObjects(), GetCurrentFileName(), TGo4Analysis::Instance(), TGo4Analysis::IsAutoSaveFileChange(), TGo4Analysis::SetAutoSaveFile(), TGo4Analysis::SetInputFileName(), and TGo4Analysis::SetNewInputFile().
Referenced by NextEvent(), and Open().
Int_t TGo4MbsFile::NextEvent | ( | ) | [virtual] |
Requests the next event from mbs source. Returns event status value.
Reimplemented from TGo4MbsSource.
Definition at line 178 of file TGo4MbsFile.cxx.
References f_evt_error(), f_evt_get_tagnext(), TGo4MbsSource::fbFirstEvent, fbShowInfo, TGo4MbsSource::fuEventCounter, TGo4MbsSource::fuEventInterval, TGo4MbsSource::fuStartEvent, TGo4MbsSource::fuStopEvent, TGo4MbsSource::fxEvent, TGo4MbsSource::fxInputChannel, fxMultiFile, GetCurrentFileName(), GetCurrentTagName(), TGo4EventSource::GetEventStatus(), GETEVT__NOMORE, GO4TRACE, TGo4EventSourceException::Handle(), TGo4Log::Info(), NewFileAction(), NextFile(), TGo4EventSource::SetErrMess(), and TGo4EventSource::SetEventStatus().
Int_t TGo4MbsFile::NextFile | ( | ) | [private] |
For multiple input mode: Open next file in list.
Definition at line 296 of file TGo4MbsFile.cxx.
References CloseFile(), fbShowInfo, fgcNOTAGFILE, TGo4EventSource::fguTXTLEN, TGo4MbsSource::fuEventCounter, TGo4MbsSource::fuEventInterval, TGo4MbsSource::fuStartEvent, TGo4MbsSource::fuStopEvent, fxCurrentFile, fxCurrentTag, fxMultiFile, GETEVT__NOFILE, GetTagName(), TGo4EventSourceException::Handle(), TGo4Analysis::Instance(), TGo4Analysis::Message(), OpenFile(), TGo4EventSource::SetCreateStatus(), and TGo4EventSource::SetErrMess().
Referenced by NextEvent(), and Open().
Int_t TGo4MbsFile::Open | ( | ) | [virtual] |
Open the file or connection.
Reimplemented from TGo4MbsSource.
Definition at line 265 of file TGo4MbsFile.cxx.
References TGo4MbsSource::fbIsOpen, fxMultiFile, GetCurrentFileName(), GO4TRACE, TGo4Log::Info(), NewFileAction(), and NextFile().
Referenced by TGo4MbsFile().
Int_t TGo4MbsFile::OpenFile | ( | ) | [private] |
Open current file/tagfile.
Definition at line 383 of file TGo4MbsFile.cxx.
References TGo4Log::Debug(), f_evt_error(), f_evt_get_tagopen(), fbFileOpen, TGo4MbsSource::fbFirstEvent, fgcNOTAGFILE, fxCurrentTag, TGo4MbsSource::fxInfoHeader, TGo4MbsSource::fxInputChannel, TGo4EventSource::GetCreateStatus(), GetCurrentFileName(), GetCurrentTagName(), GETEVT__SUCCESS, TGo4EventSource::SetCreateStatus(), and TGo4EventSource::SetErrMess().
Referenced by NextFile().
Bool_t TGo4MbsFile::fbFileOpen [private] |
This indicates if the current file is open or not
Definition at line 102 of file TGo4MbsFile.h.
Referenced by CloseFile(), and OpenFile().
Bool_t TGo4MbsFile::fbShowInfo [private] |
Indicates if mbs file should show information about new open file
Definition at line 105 of file TGo4MbsFile.h.
Referenced by NextEvent(), and NextFile().
const char * TGo4MbsFile::fgcFILELISTSUF = ".lml" [static] |
standard suffix for list of listmode files
Definition at line 68 of file TGo4MbsFile.h.
Referenced by AddFileName().
const char * TGo4MbsFile::fgcLMDSUF = ".lmd" [static] |
standard suffix for listmode data files
Definition at line 65 of file TGo4MbsFile.h.
const char * TGo4MbsFile::fgcNOTAGFILE = "GO4-NOLMDTAG" [static] |
string to indicate that no lmd tagfile is chosen
Definition at line 62 of file TGo4MbsFile.h.
Referenced by AddFileName(), NextFile(), OpenFile(), and TGo4MbsFile().
TString TGo4MbsFile::fxCurrentFile [private] |
Currently processed file (for multiple input mode)
Definition at line 92 of file TGo4MbsFile.h.
Referenced by GetCurrentFileName(), and NextFile().
TString TGo4MbsFile::fxCurrentTag [private] |
Currently processed tagfile (for multiple input mode)
Definition at line 95 of file TGo4MbsFile.h.
Referenced by GetCurrentTagName(), NextFile(), and OpenFile().
TList* TGo4MbsFile::fxMultiFile [private] |
file that contains the list of mbs filenames. format should be: "filename.lmd tagfilename" for each line.
Definition at line 99 of file TGo4MbsFile.h.
Referenced by AddFileName(), Close(), NextEvent(), NextFile(), Open(), and ~TGo4MbsFile().
TString TGo4MbsFile::fxTagFile [private] |
Name of the tagfile associated with the listmode event file.
Definition at line 89 of file TGo4MbsFile.h.
Referenced by GetTagName(), and TGo4MbsFile().