GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TXXXUnpackEvent.h
Go to the documentation of this file.
1 // $Id: TXXXUnpackEvent.h 478 2009-10-29 12:26:09Z linev $
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 TXXXUnpackEvent_H
15 #define TXXXUnpackEvent_H
16 
17 #define XXX_NUM_CHAN 8
18 #define XXX_NUM_MODULES 16
19 #define XXX_NUM_CRATES 4
20 
21 // nr of modules in Crate 0 1 2 3
22 // | | | |
23 #define NR_MODULES {0, 16, 16, 2}
24 
25 
26 
27 #include "TGo4EventElement.h"
28 #include "TGo4CompositeEvent.h"
29 
30 /* example for composite event with 2 sublevels:
31  * one unpack event consists of up to XXX_NUM_CRATES crates.
32  * Each crate has up to XXX_NUM_MODULES modules*/
33 
34 class TXXXModule : public TGo4EventElement {
35  public:
37  TXXXModule(const char *name, Short_t id):
38  TGo4EventElement(name,name,id) {}
39  virtual ~TXXXModule() {}
40 
41  void Clear(Option_t * = "") override
42  {
43  fiData = 0;
44  fiTest = 0;
45  fiAux = 0;
46  }
47 
48  Int_t GetData() const { return fiData; }
49  void SetData(Int_t dat) { fiData = dat; }
50 
51  Int_t GetTest() const { return fiTest; }
52  void SetTest(Int_t dat) { fiTest = dat; }
53 
54  Int_t GetAux() const { return fiAux; }
55  void SetAux(Int_t dat) { fiAux = dat; }
56 
57  /* in this example, each module represents single channel of data.*/
58  Int_t fiData{0};
59 
60  /* module may have test data channel.*/
61  Int_t fiTest{0};
62 
63  /* module may have aux data channel.*/
64  Int_t fiAux{0};
65 
66  ClassDefOverride(TXXXModule,1)
67 
68 };
69 
70 class TXXXCrate : public TGo4CompositeEvent {
71  public:
73  TXXXCrate(const char *name, Short_t id);
74  virtual ~TXXXCrate() {}
75 
76  ClassDefOverride(TXXXCrate, 1)
77 };
78 
79 class TXXXUnpackEvent : public TGo4CompositeEvent {
80  public:
82  TXXXUnpackEvent(const char *name);
83  virtual ~TXXXUnpackEvent() {}
84 
85  ClassDefOverride(TXXXUnpackEvent, 1)
86 };
87 
88 #endif
virtual ~TXXXCrate()
void SetData(Int_t dat)
Int_t GetAux() const
void SetTest(Int_t dat)
Int_t GetTest() const
TXXXModule(const char *name, Short_t id)
Int_t GetData() const
virtual ~TXXXModule()
void Clear(Option_t *="") override
virtual ~TXXXUnpackEvent()
void SetAux(Int_t dat)