3 void ITSstream (Int_t evNumber1=0,Int_t evNumber2=0)
5 /////////////////////////////////////////////////////////////////////////
6 // This macro is a small example of a ROOT macro
7 // illustrating how to read the output of GALICE
8 // and do some analysis.
10 /////////////////////////////////////////////////////////////////////////
12 // Dynamically link some shared libs
14 if (gClassTable->GetID("AliRun") < 0) {
15 gROOT->LoadMacro("loadlibs.C");
19 // Connect the Root Galice file containing Geometry, Kine and Hits
21 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("stream.root");
22 if (!file) file = new TFile("stream.root");
25 // Get AliRun object from file or create it if not on file
29 gAlice = (AliRun*)file->Get("gAlice");
30 if (gAlice) printf("AliRun object found on file\n");
31 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
35 AliITSInStream *IStream;
37 char *path=gDirectory->GetPath();
38 printf("path %s\n",path);
41 Int_t nkeys=gDirectory->GetNkeys();
42 printf("nkeys %d\n",nkeys);
45 for (int i=1;i<=nkeys;i++) {
46 //sprintf(namecycle,"%s%d",GetName(),i);
47 sprintf(namecycle,"AliITSInStream;%d",i);
48 printf("namecycle %s\n",namecycle);
49 IStream=(AliITSInStream*)gDirectory->Get(namecycle);
50 //Char_t *str=IStream->Stream();
51 UChar_t *str=IStream->Stream();
52 Int_t len=IStream->StreamLength();
53 printf("str len %p %d\n",str,len);
54 for (int k=0;k<len;k++) {
57 printf("i,k,elem %d %d %d\n",i,k,elem);
58 //if (elem > 0) printf("i,k,elem %d %d %d\n",i,k,elem);
62 cout<<"END test for InStream "<<endl;