GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4MbsRandom.h
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#ifndef TGO4MBSRANDOM_H
15#define TGO4MBSRANDOM_H
16
17#include "TGo4MbsSource.h"
18
19#define NUM_PEAK 5
20
22
31 public:
32
33 TGo4MbsRandom(const char *name);
34
36
38
39 virtual ~TGo4MbsRandom();
40
42 Int_t Close() override;
43
45 Int_t Open() override;
46
49 Int_t NextEvent() override;
50
52 s_bufhe * GetBufferHeader() override;
53
54 private:
55
57 Int_t fiDLen{0};
58
60 Int_t fiNumSub{0};
61
63 Int_t fiNumDat{0};
64
66 Short_t *fxEventMem{nullptr};
67
68 UInt_t fuSeed{0};
69
71 void get_rand_seed();
72
73 double gauss_rnd(double mean, double sigma);
74
75 double get_int(double low, double high);
76
77 long rand_event(long choice);
78
79 ClassDefOverride(TGo4MbsRandom,1)
80};
81
82#endif //TGO4MBSRANDOM_H
Implements a random generator as source for mbs events.
Short_t * fxEventMem
Memory allocated for the current random event.
Int_t NextEvent() override
Requests the next event from mbs source.
Int_t Open() override
Open the file or connection.
double get_int(double low, double high)
s_bufhe * GetBufferHeader() override
User access to current event buffer header.
Int_t fiNumSub
Number of subevents per event.
Int_t fiNumDat
Number of data longwords per subevent.
void get_rand_seed()
obtains seed for generator
double gauss_rnd(double mean, double sigma)
long rand_event(long choice)
virtual ~TGo4MbsRandom()
TGo4MbsRandom(const char *name)
Int_t Close() override
Close the file or connection.
Int_t fiDLen
total length of current random event in words (Short_t)
TGo4MbsSource()
default for streamer