GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
TGo4MbsFile Class Reference

#include <TGo4MbsFile.h>

+ Inheritance diagram for TGo4MbsFile:

Public Member Functions

 TGo4MbsFile (const char *name)
 
 TGo4MbsFile ()
 
 TGo4MbsFile (TGo4MbsFileParameter *par)
 
 ~TGo4MbsFile ()
 
Int_t Close () override
 
Int_t Open () override
 
Int_t NextEvent () override
 
const char * GetTagName () const
 
const char * GetCurrentTagName () const
 
const char * GetCurrentFileName () const
 
const char * GetActiveName () const override
 
- Public Member Functions inherited from TGo4MbsSource
 TGo4MbsSource ()
 
 TGo4MbsSource (const char *name, Int_t mode)
 
 TGo4MbsSource (TGo4MbsSourceParameter *par, Int_t mode)
 
virtual ~TGo4MbsSource ()
 
Bool_t CheckEventClass (TClass *cl) override
 
Bool_t BuildEvent (TGo4EventElement *dest) override
 
void BuildMbsEvent (TGo4MbsEvent *target)
 
TGo4MbsSubEventBuildMbsSubEvent (TGo4MbsEvent *target, Int_t fullID, Short_t *source, Int_t datalength)
 
void SetStartEvent (UInt_t firstindex)
 
void SetStopEvent (UInt_t lastindex)
 
void SetEventInterval (UInt_t skipinterval)
 
void SetTimeout (Int_t time)
 
void SetPort (Int_t port)
 
s_filheGetInfoHeader () const
 
virtual s_bufheGetBufferHeader ()
 
void SetPrintEvent (Int_t num=1, Int_t sid=-1, Int_t longw=1, Int_t hexw=1, Int_t dataw=0)
 
void SetDataCopyMode (Bool_t on)
 
- Public Member Functions inherited from TGo4EventSource
 TGo4EventSource ()
 
 TGo4EventSource (const char *name)
 
virtual ~TGo4EventSource ()
 
void Clear (Option_t *opt="") override
 
Int_t GetCreateStatus () const
 
Int_t GetEventStatus () const
 
const char * GetErrMess () const
 

Static Public Attributes

static const char * fgcNOTAGFILE ="GO4-NOLMDTAG"
 
static const char * fgcLMDSUF =".lmd"
 
static const char * fgcFILELISTSUF =".lml"
 
- Static Public Attributes inherited from TGo4MbsSource
static const UInt_t fguLONGBYCHAR = sizeof(Int_t) / sizeof(Char_t)
 
static const UInt_t fguSHORTBYCHAR = sizeof(Short_t) / sizeof(Char_t)
 
static const UInt_t fguLONGBYSHORT = sizeof(Int_t) / sizeof(Short_t)
 
static const UInt_t fguEVHEBYCHAR = sizeof(s_evhe) / sizeof(Char_t)
 
- Static Public Attributes inherited from TGo4EventSource
static const Int_t fgiTIMEOUTDEFAULT =1
 

Private Member Functions

void AddFileName (const char *name, const char *tagname=nullptr, 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 {nullptr}
 
Bool_t fbFileOpen {kFALSE}
 
Bool_t fbShowInfo {kFALSE}
 

Additional Inherited Members

- Static Public Member Functions inherited from TGo4MbsSource
static void SetPollingMode (Bool_t on=kTRUE)
 
- Protected Types inherited from TGo4EventSource
enum  { fguTXTLEN = 256 }
 
- Protected Member Functions inherited from TGo4EventSource
void SetErrMess (const char *txt)
 
void SetEventStatus (Int_t status)
 
void SetCreateStatus (Int_t status)
 
void ThrowError (Int_t creastat, Int_t errstat, const char *message,...)
 
void ThrowEOF (Int_t creastat, Int_t errstat, const char *message,...)
 
- Protected Attributes inherited from TGo4MbsSource
s_evt_channelfxInputChannel {nullptr}
 
s_ve10_1fxEvent {nullptr}
 
s_bufhefxBuffer {nullptr}
 
s_filhefxInfoHeader {nullptr}
 
Bool_t fbIsOpen {kFALSE}
 
Bool_t fbDataCopyMode {kFALSE}
 
ULong_t fuEventCounter {0}
 
Bool_t fbFirstEvent {kFALSE}
 
ULong_t fuStartEvent {0}
 
ULong_t fuStopEvent {0}
 
ULong_t fuEventInterval {0}
 
Int_t fiTimeout {0}
 
Bool_t fbPollingMode {kFALSE}
 
Int_t fiPort {0}
 if true, use short timeout to keep gSystem->ProcessEvents() running More...
 
TGo4MbsSourcePrintPar fxPrEventPar
 
- Static Protected Attributes inherited from TGo4MbsSource
static Bool_t gbPollingMode = kFALSE
 

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 30 of file TGo4MbsFile.h.

Constructor & Destructor Documentation

◆ TGo4MbsFile() [1/3]

TGo4MbsFile::TGo4MbsFile ( const char *  name)

Definition at line 50 of file TGo4MbsFile.cxx.

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

◆ TGo4MbsFile() [2/3]

TGo4MbsFile::TGo4MbsFile ( )

Definition at line 38 of file TGo4MbsFile.cxx.

References GO4TRACE.

◆ TGo4MbsFile() [3/3]

TGo4MbsFile::TGo4MbsFile ( TGo4MbsFileParameter par)

◆ ~TGo4MbsFile()

TGo4MbsFile::~TGo4MbsFile ( )

Definition at line 93 of file TGo4MbsFile.cxx.

References Close(), fxMultiFile, and GO4TRACE.

Member Function Documentation

◆ AddFileName()

void TGo4MbsFile::AddFileName ( const char *  name,
const char *  tagname = nullptr,
bool  isonly = kFALSE 
)
private

◆ Close()

Int_t TGo4MbsFile::Close ( )
overridevirtual

Close the file or connection.

Reimplemented from TGo4MbsSource.

Definition at line 252 of file TGo4MbsFile.cxx.

References CloseFile(), TGo4MbsSource::fbIsOpen, fxMultiFile, TGo4EventSource::GetCreateStatus(), GETEVT__SUCCESS, and GO4TRACE.

Referenced by ~TGo4MbsFile().

◆ CloseFile()

Int_t TGo4MbsFile::CloseFile ( )
private

Close current file/tagfile.

Definition at line 407 of file TGo4MbsFile.cxx.

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

Referenced by Close(), and NextFile().

◆ GetActiveName()

const char * TGo4MbsFile::GetActiveName ( ) const
overridevirtual

interface from eventsource base class to give active file

Reimplemented from TGo4EventSource.

Definition at line 435 of file TGo4MbsFile.cxx.

References GetCurrentFileName().

Referenced by GetCurrentFileName().

◆ GetCurrentFileName()

const char* TGo4MbsFile::GetCurrentFileName ( ) const
inline

Definition at line 55 of file TGo4MbsFile.h.

References fxCurrentFile, and GetActiveName().

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

◆ GetCurrentTagName()

const char* TGo4MbsFile::GetCurrentTagName ( ) const
inline

Definition at line 53 of file TGo4MbsFile.h.

References fxCurrentTag.

Referenced by NextEvent(), and OpenFile().

◆ GetTagName()

const char* TGo4MbsFile::GetTagName ( ) const
inline

Name of the Tagfile

Definition at line 51 of file TGo4MbsFile.h.

References fxTagFile.

Referenced by NextFile().

◆ NewFileAction()

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 415 of file TGo4MbsFile.cxx.

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

Referenced by NextEvent(), and Open().

◆ NextEvent()

Int_t TGo4MbsFile::NextEvent ( )
overridevirtual

◆ NextFile()

Int_t TGo4MbsFile::NextFile ( )
private

◆ Open()

Int_t TGo4MbsFile::Open ( )
overridevirtual

Open the file or connection.

Reimplemented from TGo4MbsSource.

Definition at line 266 of file TGo4MbsFile.cxx.

References TGo4MbsSource::fbIsOpen, fxMultiFile, GetCurrentFileName(), GO4TRACE, TGo4Log::Info(), NewFileAction(), and NextFile().

Referenced by TGo4MbsFile().

◆ OpenFile()

Int_t TGo4MbsFile::OpenFile ( )
private

Member Data Documentation

◆ fbFileOpen

Bool_t TGo4MbsFile::fbFileOpen {kFALSE}
private

This indicates if the current file is open or not

Definition at line 101 of file TGo4MbsFile.h.

Referenced by CloseFile(), and OpenFile().

◆ fbShowInfo

Bool_t TGo4MbsFile::fbShowInfo {kFALSE}
private

Indicates if mbs file should show information about new open file

Definition at line 104 of file TGo4MbsFile.h.

Referenced by NextEvent(), and NextFile().

◆ fgcFILELISTSUF

const char * TGo4MbsFile::fgcFILELISTSUF =".lml"
static

standard suffix for list of listmode files

Definition at line 67 of file TGo4MbsFile.h.

Referenced by AddFileName().

◆ fgcLMDSUF

const char * TGo4MbsFile::fgcLMDSUF =".lmd"
static

standard suffix for listmode data files

Definition at line 64 of file TGo4MbsFile.h.

◆ fgcNOTAGFILE

const char * TGo4MbsFile::fgcNOTAGFILE ="GO4-NOLMDTAG"
static

string to indicate that no lmd tagfile is chosen

Definition at line 61 of file TGo4MbsFile.h.

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

◆ fxCurrentFile

TString TGo4MbsFile::fxCurrentFile
private

Currently processed file (for multiple input mode)

Definition at line 91 of file TGo4MbsFile.h.

Referenced by GetCurrentFileName(), and NextFile().

◆ fxCurrentTag

TString TGo4MbsFile::fxCurrentTag
private

Currently processed tagfile (for multiple input mode)

Definition at line 94 of file TGo4MbsFile.h.

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

◆ fxMultiFile

TList* TGo4MbsFile::fxMultiFile {nullptr}
private

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

Definition at line 98 of file TGo4MbsFile.h.

Referenced by AddFileName(), Close(), NextEvent(), NextFile(), Open(), and ~TGo4MbsFile().

◆ fxTagFile

TString TGo4MbsFile::fxTagFile
private

Name of the tagfile associated with the listmode event file.

Definition at line 88 of file TGo4MbsFile.h.

Referenced by GetTagName(), and TGo4MbsFile().


The documentation for this class was generated from the following files: