GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 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 #include "TXXXUnpackEvent.h"
15 
16 
18 
19 
20 
21 
22 
23 
24 //***********************************************************
25 TXXXCrate::TXXXCrate(const char* name,Short_t id) :
26  TGo4CompositeEvent(name,name,id)
27 {
28 if(id <0 || id>XXX_NUM_CRATES)
29  {
30  printf("TXXXCrate id %d outside range!\n",id);
31 
32  }
33 else
34  {
35  TString modname;
36  for(UInt_t ix=0; ix<Config_Crates[id]; ++ix)
37  {
38  modname.Form("XXXCrate%d_XXXModule%d",id,ix);
39  addEventElement(new TXXXModule(modname.Data(),ix));
40  }
41  }
42 
43 }
44 
45 
46 
47 
48 //***********************************************************
49 TXXXUnpackEvent::TXXXUnpackEvent(const char* name) :
50  TGo4CompositeEvent(name,name,0)
51 {
52  TString modname;
53  for(UInt_t ix=0; ix<XXX_NUM_CRATES; ++ix)
54  {
55  if(Config_Crates[ix]==0) continue; // skip empty crates
56  modname.Form("XXXCrate%d",ix);
57  addEventElement(new TXXXCrate(modname.Data(),ix));
58  }
59 }
static UInt_t Config_Crates[XXX_NUM_CRATES]
Bool_t addEventElement(TGo4EventElement *aElement, Bool_t reading=kFALSE)
#define NR_MODULES
#define XXX_NUM_CRATES