1 /****************************************************************************
2 * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch *
3 ****************************************************************************/
10 #include "AliITSgeom.h"
11 #include "AliITSclustererV2.h"
14 #include "TStopwatch.h"
17 Int_t AliITSFindClustersV2(Char_t SlowOrFast='s',Int_t eventn=1) {
19 cerr<<"Looking for clusters...\n";
21 TFile *in=TFile::Open("galice.root");
22 if (!in->IsOpen()) {cerr<<"Can't open galice.root !\n"; return 2;}
23 if (!(gAlice=(AliRun*)in->Get("gAlice"))) {
24 cerr<<"Can't find gAlice !\n";
27 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
28 if (!ITS) { cerr<<"Can't find the ITS !\n"; return 3; }
30 AliITSgeom *geom=ITS->GetITSgeom();
32 TFile *out=TFile::Open("AliITSclustersV2.root","new");
34 cerr<<"Delete old AliITSclustersV2.root !\n"; return 1;}
38 AliITSclustererV2 clusterer(geom);
39 for (Int_t i=0; i<eventn; i++) {
40 cerr<<"Processing event number: "<<i<<endl;
42 //ITS->MakeTreeC(); //To make the V1 cluster finders happy
43 clusterer.SetEvent(i);
44 if (SlowOrFast=='s') clusterer.Digits2Clusters(in,out);
45 else clusterer.Hits2Clusters(in,out);
47 timer.Stop(); timer.Print();
49 delete gAlice; gAlice=0;