GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 für 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 TXXXEVENT_H
15 #define TXXXEVENT_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 
35 {
36  public:
38  TXXXModule(const char* name, Short_t id):
39  TGo4EventElement(name,name,id), fiData(0) {;}
40  virtual ~TXXXModule() {;}
41 
42  void Clear(Option_t *t="")
43  {
44  fiData=0;
45  fiTest=0;
46  fiAux=0;
47  }
48 
49  Int_t GetData(){return fiData;}
50  void SetData(Int_t dat){fiData=dat;}
51 
52  Int_t GetTest(){return fiTest;}
53  void SetTest(Int_t dat){fiTest=dat;}
54 
55  Int_t GetAux(){return fiAux;}
56  void SetAux(Int_t dat){fiAux=dat;}
57 
58  /* in this example, each module represents single channel of data.*/
59  Int_t fiData;
60 
61  /* module may have test data channel.*/
62  Int_t fiTest;
63 
64  /* module may have aux data channel.*/
65  Int_t fiAux;
66 
67 
68  ClassDef(TXXXModule,1)
69 
70 };
71 
72 
73 class TXXXCrate : public TGo4CompositeEvent {
74 public:
76  TXXXCrate(const char* name, Short_t id);
77  virtual ~TXXXCrate() {;}
78 
79  ClassDef(TXXXCrate,1)
80 };
81 
82 class TXXXUnpackEvent : public TGo4CompositeEvent {
83  public:
85  TXXXUnpackEvent(const char* name) ;
86  virtual ~TXXXUnpackEvent() {;}
87 
88  ClassDef(TXXXUnpackEvent,1)
89 };
90 #endif //TXXXEVENT_H
91 
92 
93 
virtual ~TXXXCrate()
Int_t GetAux()
void SetData(Int_t dat)
Int_t GetTest()
void Clear(Option_t *t="")
void SetTest(Int_t dat)
Int_t GetData()
TXXXModule(const char *name, Short_t id)
virtual ~TXXXModule()
virtual ~TXXXUnpackEvent()
void SetAux(Int_t dat)