v2.10-0 (21000JUN2005)

Go4EventServer
Class TGo4MbsRandom


class TGo4MbsRandom
derived from TGo4MbsSource

Implements a random generator as source for mbs events.
Produces events with 2 subevents containing gaussian spectra

Author:
J. Adamczewski, N.Kurz
Since: 5/2003

Field Summary
 private static double []fgdPeak
           
 private static double []fgdPeak2
           
 private static double []fgdSigma
           
 private static double []fgdSigma2
           
 private Int_tfiDLen
          total length of current random event in words (Short_t)
 private Int_tfiNumDat
          Number of data longwords per subevent
 private Int_tfiNumSub
          Number of subevents per event
 private UInt_tfuSeed
           
 private Short_t*fxEventMem
          Memory allocated for the current random event

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
TGo4MbsRandom(const char * name)
           
TGo4MbsRandom()
           
TGo4MbsRandom(TGo4MbsRandomParameter* par)
           

Destructor Summary
 virtual synchronized ~TGo4MbsRandom()
           

Method Summary
 virtual Int_tClose()
          Close the file or connection.
 private doublegauss_rnd(double mean, double sigma)
           
 private doubleget_int(double low, double high)
           
 private voidget_rand_seed()
          obtains seed for generator
 virtual s_bufhe*GetBufferHeader()
          User access to current event buffer header. dummy here!
 virtual Int_tNextEvent()
          Requests the next event from mbs source.
 virtual Int_tOpen()
          Open the file or connection.
 private longrand_event(long choice)
           

Methods inherited from class Go4EventServer.TGo4MbsSource
BuildMbsEvent, 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

fgdPeak

private static double [] fgdPeak

fgdPeak2

private static double [] fgdPeak2

fgdSigma

private static double [] fgdSigma

fgdSigma2

private static double [] fgdSigma2

fiDLen

private Int_t fiDLen
total length of current random event in words (Short_t)

fiNumDat

private Int_t fiNumDat
Number of data longwords per subevent

fiNumSub

private Int_t fiNumSub
Number of subevents per event

fuSeed

private UInt_t fuSeed

fxEventMem

private Short_t* fxEventMem
Memory allocated for the current random event
Constructor Detail

TGo4MbsRandom

public TGo4MbsRandom(const char * name)

TGo4MbsRandom

public TGo4MbsRandom()

TGo4MbsRandom

public TGo4MbsRandom(TGo4MbsRandomParameter* par)
Method Detail

~TGo4MbsRandom

public virtual synchronized ~TGo4MbsRandom()
Method Detail

Close

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

gauss_rnd

private double gauss_rnd(double mean, double sigma)

get_int

private double get_int(double low, double high)

get_rand_seed

private void get_rand_seed()
obtains seed for generator

GetBufferHeader

public virtual s_bufhe* GetBufferHeader()
User access to current event buffer header. dummy here!

NextEvent

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

Open

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

rand_event

private long rand_event(long choice)

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

30-06-2005