]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITStestV2.C
- Pass (p,E) with PushTrack.
[u/mrichter/AliRoot.git] / ITS / AliITStestV2.C
index 09a3c5895b2fb19c4c5d13e53c3e3c13b3540880..ade8c991e7ec978094be6f1fdf5a406d16725b6a 100644 (file)
@@ -1,32 +1,39 @@
-Int_t AliITStestV2(Char_t SlowOrFast='s') {
+/****************************************************************************
+ *           Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch                 *
+ ****************************************************************************/
+
+Int_t AliITStestV2(Int_t nev=5, Char_t SlowOrFast='s') {
    Int_t rc=0;
 
-   if (gAlice) {delete gAlice; gAlice=0;}
-   TFile *in=TFile::Open("galice.root");
-   if (!in->IsOpen()) {
-      cerr<<"Can't open galice.root !\n"; 
+   if (gAlice) {
+      delete gAlice->GetRunLoader();
+      delete gAlice; 
+      gAlice=0;
+   }
+
+   rl = AliRunLoader::Open("galice.root");
+   if (rl == 0x0) {
+      cerr<<"Can not open session"<<endl;
       return 1;
    }
-   if (!(gAlice=(AliRun*)in->Get("gAlice"))) {
-      cerr<<"Can't find gAlice !\n";
-      return 2;
+
+   if (rl->LoadgAlice()) {
+      cerr<<"Error occured while loading AliRun"<<endl;
+      return 1;
    }
-   AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField());
-   delete gAlice; gAlice=0;
-   in->Close();
+   AliKalmanTrack::
+   SetConvConst(1000/0.299792458/rl->GetAliRun()->Field()->SolenoidField());
 
+   delete rl;
+  
    if (SlowOrFast=='f') {
-      //cerr<<"Fast AliITSRecPoint(s) !\n";
-      //gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSHits2FastRecPoints.C");
-      //AliITSHits2FastRecPoints();
+      cerr<<"Fast AliITSRecPoint(s) !\n";
    } else {
       cerr<<"Slow AliITSRecPoint(s) !\n";
       gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSHits2SDigits.C");
       AliITSHits2SDigits();
       gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSSDigits2Digits.C");
       AliITSSDigits2Digits();
-      //gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSDigits2RecPoints.C");
-      //AliITSDigits2RecPoints();
    }
    gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindClustersV2.C");
    if (rc=AliITSFindClustersV2(SlowOrFast)) return rc;