]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/FindKrClustersRaw.C
remove bad modules BEFORE cleaning digits
[u/mrichter/AliRoot.git] / TPC / FindKrClustersRaw.C
1 Int_t FindKrClustersRaw(const char *fileName="data.root"){
2
3   //define tree
4   TFile *hfile=new TFile("adc.root","RECREATE","ADC file");
5   // Create a ROOT Tree
6   TTree *mytree = new TTree("Kr","Krypton cluster tree");
7
8
9   AliRawReader *reader = new AliRawReaderRoot(fileName);
10   //AliRawReader *reader = new AliRawReaderDate(fileName);
11   reader->Reset();
12
13   TStopwatch timer;
14   timer.Start();
15
16   AliAltroRawStreamFast* stream = new AliAltroRawStreamFast(reader);
17   stream->SelectRawData("TPC");
18
19   //one general output
20   AliTPCclustererKr *clusters = new AliTPCclustererKr();
21   clusters->SetOutput(mytree);
22   clusters->SetRecoParam(0);
23
24   //only for geometry parameters loading - temporarly
25   AliRunLoader* rl = AliRunLoader::Open("galice.root");
26   AliTPCParam *param=(AliTPCParamSR *)gDirectory->Get("75x40_100x60_150x60");
27   //if (!param) {cerr<<"TPC parameters have not been found !\n"; return 4;}
28   clusters->SetParam(param);
29
30
31   Int_t evtnr=0;
32   while (reader->NextEvent()) {
33     //output for each event
34     //  AliTPCclustererKr *clusters = new AliTPCclustererKr();
35     //  clusters->SetOutput(mytree);
36
37     //if(evtnr++<35)continue;
38     cout<<"Evt = "<<evtnr<<endl;
39     clusters->finderIO(reader);
40     evtnr++;
41
42
43   }
44
45   //mytree->Print();//print rootuple summary 
46   // Save all objects in this file
47   hfile->Write();
48   // Close the file
49   hfile->Close();
50
51   timer.Stop();
52   timer.Print();
53
54   delete stream;
55
56   return 0;
57 }