GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
TGo4MbsSource Class Reference

#include <TGo4MbsSource.h>

+ Inheritance diagram for TGo4MbsSource:

Public Member Functions

 TGo4MbsSource ()
 
 TGo4MbsSource (const char *name, Int_t mode)
 
 TGo4MbsSource (TGo4MbsSourceParameter *par, Int_t mode)
 
virtual ~TGo4MbsSource ()
 
virtual Bool_t CheckEventClass (TClass *cl)
 
virtual Bool_t BuildEvent (TGo4EventElement *dest)
 
virtual Int_t Close ()
 
virtual Int_t Open ()
 
virtual Int_t NextEvent ()
 
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 ()
 
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 (const char *name)
 
virtual ~TGo4EventSource ()
 
 TGo4EventSource ()
 
virtual void Clear (Option_t *opt="")
 
Int_t GetCreateStatus () const
 
Int_t GetEventStatus () const
 
const char * GetErrMess () const
 
virtual const char * GetActiveName ()
 

Static Public Member Functions

static void SetPollingMode (Bool_t on=kTRUE)
 

Static Public Attributes

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
 

Protected Attributes

s_evt_channelfxInputChannel
 
s_ve10_1fxEvent
 
s_bufhefxBuffer
 
s_filhefxInfoHeader
 
Bool_t fbIsOpen
 
Bool_t fbDataCopyMode
 
ULong_t fuEventCounter
 
Bool_t fbFirstEvent
 
ULong_t fuStartEvent
 
ULong_t fuStopEvent
 
ULong_t fuEventInterval
 
Int_t fiTimeout
 
Bool_t fbPollingMode
 
Int_t fiPort
 if true, use short timeout to keep gSystem->ProcessEvents() running More...
 
TGo4MbsSourcePrintPar fxPrEventPar
 

Static Protected Attributes

static Bool_t gbPollingMode = kFALSE
 

Private Member Functions

Int_t GetMode () const
 number of allowed reconnect retries More...
 

Private Attributes

Int_t fiMode
 
Int_t fiRetryCnt
 

Additional Inherited Members

- 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,...)
 

Detailed Description

Definition at line 60 of file TGo4MbsSource.h.

Constructor & Destructor Documentation

TGo4MbsSource::TGo4MbsSource ( )

default for streamer

Definition at line 78 of file TGo4MbsSource.cxx.

References f_evt_control(), fxInputChannel, and GO4TRACE.

TGo4MbsSource::TGo4MbsSource ( const char *  name,
Int_t  mode 
)
TGo4MbsSource::TGo4MbsSource ( TGo4MbsSourceParameter par,
Int_t  mode 
)

Definition at line 37 of file TGo4MbsSource.cxx.

References f_evt_control(), fxInputChannel, and GO4TRACE.

TGo4MbsSource::~TGo4MbsSource ( )
virtual

Definition at line 92 of file TGo4MbsSource.cxx.

References Close(), fxInputChannel, and GO4TRACE.

Member Function Documentation

Bool_t TGo4MbsSource::BuildEvent ( TGo4EventElement dest)
virtual

Fill the destination event

Parameters
dest

Reimplemented from TGo4EventSource.

Definition at line 118 of file TGo4MbsSource.cxx.

References BuildMbsEvent(), TGo4Log::Debug(), TGo4EventSource::GetErrMess(), GETEVT__SUCCESS, and NextEvent().

void TGo4MbsSource::BuildMbsEvent ( TGo4MbsEvent target)
TGo4MbsSubEvent * TGo4MbsSource::BuildMbsSubEvent ( TGo4MbsEvent target,
Int_t  fullID,
Short_t *  source,
Int_t  datalength 
)

Auxiliary function to fill datalength words (Short_t) from source into the next subevent of target with matching header fullID longword. Returns handle to this subevent.

Definition at line 245 of file TGo4MbsSource.cxx.

References TGo4MbsEvent::AddSubEvent(), and fbDataCopyMode.

Bool_t TGo4MbsSource::CheckEventClass ( TClass *  cl)
virtual

Check that filled event is a proper class

Reimplemented from TGo4EventSource.

Definition at line 113 of file TGo4MbsSource.cxx.

Int_t TGo4MbsSource::Close ( )
virtual
s_bufhe * TGo4MbsSource::GetBufferHeader ( )
virtual

User access to current event buffer header.

Reimplemented in TGo4MbsRandom.

Definition at line 430 of file TGo4MbsSource.cxx.

References f_evt_get_buffer_ptr(), and fxInputChannel.

Referenced by TGo4MbsEvent::GetMbsBufferHeader().

s_filhe* TGo4MbsSource::GetInfoHeader ( )
inline

User access to info header. May contain additional run information

Definition at line 111 of file TGo4MbsSource.h.

References fxInfoHeader.

Referenced by TGo4MbsEvent::GetMbsSourceHeader().

Int_t TGo4MbsSource::GetMode ( ) const
inlineprivate

number of allowed reconnect retries

Definition at line 145 of file TGo4MbsSource.h.

References fiMode.

Referenced by Open().

Int_t TGo4MbsSource::NextEvent ( )
virtual
Int_t TGo4MbsSource::Open ( )
virtual
void TGo4MbsSource::SetDataCopyMode ( Bool_t  on)
inline

Definition at line 134 of file TGo4MbsSource.h.

References fbDataCopyMode.

void TGo4MbsSource::SetEventInterval ( UInt_t  skipinterval)
inline

Definition at line 104 of file TGo4MbsSource.h.

References fuEventInterval.

void TGo4MbsSource::SetPollingMode ( Bool_t  on = kTRUE)
static

Definition at line 99 of file TGo4MbsSource.cxx.

References gbPollingMode.

Referenced by main().

void TGo4MbsSource::SetPort ( Int_t  port)
inline

Definition at line 108 of file TGo4MbsSource.h.

References fiPort.

void TGo4MbsSource::SetPrintEvent ( Int_t  num = 1,
Int_t  sid = -1,
Int_t  longw = 1,
Int_t  hexw = 1,
Int_t  dataw = 0 
)

Set mbs source into printout (verbose) mode for the next num events. Subevent id sid may be specific (-1 is all subevents). Parameters longw, hexw, dataw switch output data formats. See MbsAPI function f_evt_type().

Definition at line 104 of file TGo4MbsSource.cxx.

References TGo4MbsSourcePrintPar::fiData, TGo4MbsSourcePrintPar::fiHex, TGo4MbsSourcePrintPar::fiLong, TGo4MbsSourcePrintPar::fiNum, TGo4MbsSourcePrintPar::fiSid, and fxPrEventPar.

Referenced by TGo4ComSetPrintEvent::ExeCom(), and TGo4MbsEvent::SetPrintEvent().

void TGo4MbsSource::SetStartEvent ( UInt_t  firstindex)
inline

Define the Start index for the NextEvent

Definition at line 100 of file TGo4MbsSource.h.

References fuStartEvent.

void TGo4MbsSource::SetStopEvent ( UInt_t  lastindex)
inline

Definition at line 102 of file TGo4MbsSource.h.

References fuStopEvent.

void TGo4MbsSource::SetTimeout ( Int_t  time)
inline

Definition at line 106 of file TGo4MbsSource.h.

References fiTimeout.

Referenced by TGo4MbsSource().

Member Data Documentation

Bool_t TGo4MbsSource::fbDataCopyMode
protected

switches buildmbs event mode: if true, data buffer is copied to own buffer of subevent. If false (default), mbs subevent uses reference to external data buffer of eventapi.

Definition at line 165 of file TGo4MbsSource.h.

Referenced by BuildMbsEvent(), BuildMbsSubEvent(), and SetDataCopyMode().

Bool_t TGo4MbsSource::fbFirstEvent
protected

Indicates if first event should be extracted

Definition at line 171 of file TGo4MbsSource.h.

Referenced by TGo4MbsFile::NextEvent(), NextEvent(), and TGo4MbsFile::OpenFile().

Bool_t TGo4MbsSource::fbIsOpen
protected
Bool_t TGo4MbsSource::fbPollingMode
protected

Definition at line 185 of file TGo4MbsSource.h.

Referenced by NextEvent(), and Open().

const UInt_t TGo4MbsSource::fguEVHEBYCHAR = sizeof(s_evhe) / sizeof(Char_t)
static

ratio sizeof(s_evhe) by sizeof(char).

Definition at line 126 of file TGo4MbsSource.h.

Referenced by BuildMbsEvent().

const UInt_t TGo4MbsSource::fguLONGBYCHAR = sizeof(Int_t) / sizeof(Char_t)
static

ratio sizeof(long) by sizeof(char).

Definition at line 117 of file TGo4MbsSource.h.

const UInt_t TGo4MbsSource::fguLONGBYSHORT = sizeof(Int_t) / sizeof(Short_t)
static

ratio sizeof(long) by sizeof(short).

Definition at line 123 of file TGo4MbsSource.h.

Referenced by TGo4MbsSubEvent::Clear().

const UInt_t TGo4MbsSource::fguSHORTBYCHAR = sizeof(Short_t) / sizeof(Char_t)
static

ratio sizeof(short) by sizeof(char).

Definition at line 120 of file TGo4MbsSource.h.

Referenced by BuildMbsEvent().

Int_t TGo4MbsSource::fiMode
private

Mode of operation

Definition at line 141 of file TGo4MbsSource.h.

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

Int_t TGo4MbsSource::fiPort
protected

if true, use short timeout to keep gSystem->ProcessEvents() running

Optional port parameter, if non-positive default port number for transport will be used

Definition at line 188 of file TGo4MbsSource.h.

Referenced by Open(), and SetPort().

Int_t TGo4MbsSource::fiRetryCnt
private

Definition at line 143 of file TGo4MbsSource.h.

Referenced by NextEvent().

Int_t TGo4MbsSource::fiTimeout
protected

Timeout in seconds for mbs getevent. If -1, no timeout (default)

Definition at line 183 of file TGo4MbsSource.h.

Referenced by Open(), and SetTimeout().

ULong_t TGo4MbsSource::fuEventCounter
protected

Current event index counter

Definition at line 168 of file TGo4MbsSource.h.

Referenced by TGo4MbsFile::NextEvent(), NextEvent(), and TGo4MbsFile::NextFile().

ULong_t TGo4MbsSource::fuEventInterval
protected

Number of events to skip from file in between two read events

Definition at line 180 of file TGo4MbsSource.h.

Referenced by TGo4MbsFile::NextEvent(), NextEvent(), TGo4MbsFile::NextFile(), and SetEventInterval().

ULong_t TGo4MbsSource::fuStartEvent
protected

Index of first event to process.

Definition at line 174 of file TGo4MbsSource.h.

Referenced by TGo4MbsFile::NextEvent(), NextEvent(), TGo4MbsFile::NextFile(), and SetStartEvent().

ULong_t TGo4MbsSource::fuStopEvent
protected

Index of last event to process.

Definition at line 177 of file TGo4MbsSource.h.

Referenced by TGo4MbsFile::NextEvent(), NextEvent(), TGo4MbsFile::NextFile(), and SetStopEvent().

s_bufhe* TGo4MbsSource::fxBuffer
protected

Points to the current gsi buffer structure filled by the event source.

Definition at line 155 of file TGo4MbsSource.h.

Referenced by BuildMbsEvent(), and NextEvent().

s_ve10_1* TGo4MbsSource::fxEvent
protected
s_filhe* TGo4MbsSource::fxInfoHeader
protected

Reference to header info delivered by source.

Definition at line 158 of file TGo4MbsSource.h.

Referenced by GetInfoHeader(), Open(), and TGo4MbsFile::OpenFile().

s_evt_channel* TGo4MbsSource::fxInputChannel
protected

Event channel structure used by event source.

Definition at line 150 of file TGo4MbsSource.h.

Referenced by Close(), TGo4MbsFile::CloseFile(), GetBufferHeader(), TGo4MbsFile::NextEvent(), NextEvent(), Open(), TGo4MbsFile::OpenFile(), TGo4MbsSource(), and ~TGo4MbsSource().

TGo4MbsSourcePrintPar TGo4MbsSource::fxPrEventPar
protected

This structure keeps parameters for printevent mode

Definition at line 191 of file TGo4MbsSource.h.

Referenced by BuildMbsEvent(), and SetPrintEvent().

Bool_t TGo4MbsSource::gbPollingMode = kFALSE
staticprotected

Definition at line 193 of file TGo4MbsSource.h.

Referenced by Open(), and SetPollingMode().


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