GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
17
18//***********************************************************
19TXXXCrate::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//***********************************************************
35TXXXUnpackEvent::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}
static UInt_t Config_Crates[XXX_NUM_CRATES]
#define NR_MODULES
#define XXX_NUM_CRATES
Base type for object composition.
Bool_t addEventElement(TGo4EventElement *aElement, Bool_t reading=kFALSE)