GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
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 
29 class TGo4MbsRandom : public TGo4MbsSource {
30  public:
31 
32  TGo4MbsRandom(const char *name);
33 
34  TGo4MbsRandom();
35 
37 
38  virtual ~TGo4MbsRandom();
39 
41  Int_t Close() override;
42 
44  Int_t Open() override;
45 
48  Int_t NextEvent() override;
49 
51  s_bufhe * GetBufferHeader() override;
52 
53  private:
54 
56  Int_t fiDLen{0};
57 
59  Int_t fiNumSub{0};
60 
62  Int_t fiNumDat{0};
63 
65  Short_t *fxEventMem{nullptr};
66 
67  UInt_t fuSeed{0};
68 
70  void get_rand_seed();
71 
72  double gauss_rnd(double mean, double sigma);
73 
74  double get_int(double low, double high);
75 
76  long rand_event(long choice);
77 
78  static double fgdPeak[];
79  static double fgdSigma[];
80  static double fgdPeak2[];
81  static double fgdSigma2[];
82 
83  ClassDefOverride(TGo4MbsRandom,1)
84 };
85 
86 #endif //TGO4MBSRANDOM_H
long rand_event(long choice)
static double fgdSigma2[]
Definition: TGo4MbsRandom.h:81
Short_t * fxEventMem
Definition: TGo4MbsRandom.h:65
double gauss_rnd(double mean, double sigma)
static double fgdSigma[]
Definition: TGo4MbsRandom.h:79
virtual ~TGo4MbsRandom()
Int_t NextEvent() override
Int_t Close() override
static double fgdPeak2[]
Definition: TGo4MbsRandom.h:80
Int_t Open() override
double get_int(double low, double high)
static double fgdPeak[]
Definition: TGo4MbsRandom.h:78
s_bufhe * GetBufferHeader() override