3 void ITShuffman_f (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");
26 AliITSInStream *IStream;
28 char *path=gDirectory->GetPath();
29 printf("path %s\n",path);
32 Int_t nkeys=gDirectory->GetNkeys();
33 printf("nkeys %d\n",nkeys);
36 AliITSHTable *hufft=new AliITSHTable(256);
37 for (int i=1;i<=nkeys;i++) {
42 sprintf(namecycle,"AliITSInStream;%d",i);
43 printf("namecycle %s\n",namecycle);
44 IStream=(AliITSInStream*)gDirectory->Get(namecycle);
45 UChar_t *str=IStream->Stream();
46 Int_t len=IStream->StreamLength();
47 //printf("str len %p %d\n",str,len);
48 for (int k=0;k<len;k++) {
51 if (elem==128) count++;
52 if (elem==127) count1++;
53 if (elem==129) count2++;
54 if (elem==134) count3++;
55 //if (elem != 128) printf("i,k,elem %d %d %d\n",i,k,elem);
57 //printf("count 128 127 129 134 %d %d %d %d \n",count,count1,count2,count3);
58 hufft->GetFrequencies(len,str);
63 cout<<"END test for InStream "<<endl;