GSI Object Oriented Online Offline (Go4)
GO4-6.4.0
Loading...
Searching...
No Matches
Go4ExampleAdvanced
TXXXUnpackEvent.cxx
Go to the documentation of this file.
1
// $Id: TXXXUnpackEvent.cxx 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
#include "
TXXXUnpackEvent.h
"
15
16
static
UInt_t
Config_Crates
[
XXX_NUM_CRATES
] =
NR_MODULES
;
17
18
//***********************************************************
19
TXXXCrate::TXXXCrate
(
const
char
*name,Short_t
id
) :
20
TGo4CompositeEvent
(name,name,id)
21
{
22
if
(id < 0 || id >
XXX_NUM_CRATES
) {
23
printf(
"TXXXCrate id %d outside range!\n"
,
id
);
24
25
}
else
{
26
TString modname;
27
for
(UInt_t ix = 0; ix <
Config_Crates
[id]; ++ix) {
28
modname.Form(
"XXXCrate%d_XXXModule%d"
,
id
, ix);
29
addEventElement
(
new
TXXXModule
(modname.Data(), ix));
30
}
31
}
32
}
33
34
//***********************************************************
35
TXXXUnpackEvent::TXXXUnpackEvent
(
const
char
*name) :
36
TGo4CompositeEvent
(name,name,0)
37
{
38
TString modname;
39
for
(UInt_t ix = 0; ix <
XXX_NUM_CRATES
; ++ix) {
40
if
(
Config_Crates
[ix] == 0)
41
continue
;
// skip empty crates
42
modname.Form(
"XXXCrate%d"
, ix);
43
addEventElement
(
new
TXXXCrate
(modname.Data(), ix));
44
}
45
}
Config_Crates
static UInt_t Config_Crates[XXX_NUM_CRATES]
Definition
TXXXUnpackEvent.cxx:16
TXXXUnpackEvent.h
NR_MODULES
#define NR_MODULES
Definition
TXXXUnpackEvent.h:23
XXX_NUM_CRATES
#define XXX_NUM_CRATES
Definition
TXXXUnpackEvent.h:19
TGo4CompositeEvent
Base type for object composition.
Definition
TGo4CompositeEvent.h:25
TGo4CompositeEvent::addEventElement
Bool_t addEventElement(TGo4EventElement *aElement, Bool_t reading=kFALSE)
Definition
TGo4CompositeEvent.cxx:186
TGo4CompositeEvent::TGo4CompositeEvent
TGo4CompositeEvent()
Definition
TGo4CompositeEvent.cxx:24
TXXXCrate::TXXXCrate
TXXXCrate()
Definition
TXXXUnpackEvent.h:72
TXXXModule
Definition
TXXXUnpackEvent.h:34
TXXXUnpackEvent::TXXXUnpackEvent
TXXXUnpackEvent()
Definition
TXXXUnpackEvent.h:23
Generated by
1.13.2