]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSreconstruction.cxx
Switch on QA, as it seems it is not run by default anymore
[u/mrichter/AliRoot.git] / ITS / AliITSreconstruction.cxx
index 00cd8ce126d67bd982085e938080807cdd574b14..79b69e71c4a1e993cd83fd3a203153341e90cf26 100644 (file)
@@ -36,8 +36,9 @@ AliITSreconstruction::AliITSreconstruction():
  fInit(kFALSE),
  fEnt(0),
  fEnt0(0),
//fITS(0x0),
fDetTypeRec(0x0),
  fDfArp(kFALSE),
+ fITSgeom(0x0),
  fLoader(0x0),
  fRunLoader(0x0)
 {
@@ -56,8 +57,9 @@ AliITSreconstruction::AliITSreconstruction(AliRunLoader *rl):
  fInit(kFALSE),
  fEnt(0),
  fEnt0(0),
//fITS(0x0),
fDetTypeRec(0x0),
  fDfArp(kFALSE),
+ fITSgeom(0x0),
  fLoader(0x0),
  fRunLoader(rl)
 {
@@ -68,8 +70,9 @@ AliITSreconstruction::AliITSreconstruction(const char* filename):
  fInit(kFALSE),
  fEnt(0),
  fEnt0(0),
//fITS(0x0),
fDetTypeRec(0x0),
  fDfArp(kFALSE),
+ fITSgeom(0x0),
  fLoader(0x0),
  fRunLoader(0x0)
 {
@@ -93,29 +96,32 @@ AliITSreconstruction::AliITSreconstruction(const char* filename):
        Error("AliITSreconstruction","Can not load the session",filename);
        return;
      }
-    fRunLoader->LoadgAlice();
-    gAlice = fRunLoader->GetAliRun();
-
-    if(!gAlice) {
-          Error("AliITSreconstruction","gAlice not found on file. Aborting.");
-          fInit = kFALSE;
-          return;
-      } // end if !gAlice
 
 }
+
 //______________________________________________________________________
-AliITSreconstruction::AliITSreconstruction(const AliITSreconstruction &/*rec*/):TTask(/*rec*/){
+AliITSreconstruction::AliITSreconstruction(const AliITSreconstruction &rec):TTask(rec),
+fInit(rec.fInit),
+fEnt(rec.fEnt),
+fEnt0(rec.fEnt0),
+fDetTypeRec(rec.fDetTypeRec),
+fDfArp(rec.fDfArp),
+fITSgeom(rec.fITSgeom),
+fLoader(rec.fLoader),
+fRunLoader(rec.fRunLoader)
+{
     // Copy constructor. 
 
-  Error("Copy constructor","Copy constructor not allowed");
   
 }
+
 //______________________________________________________________________
-AliITSreconstruction& AliITSreconstruction::operator=(const AliITSreconstruction& /*source*/){
-    // Assignment operator. This is a function which is not allowed to be
-    // done.
-    Error("operator=","Assignment operator not allowed\n");
-    return *this; 
+AliITSreconstruction& AliITSreconstruction::operator=(const AliITSreconstruction& source){
+    // Assignment operator. 
+  this->~AliITSreconstruction();
+  new(this) AliITSreconstruction(source);
+  return *this;
+
 }
 
 //______________________________________________________________________
@@ -141,8 +147,8 @@ Bool_t AliITSreconstruction::Init(){
        Error("Init","Run Loader is NULL");
        return kFALSE;
      }
-    fRunLoader->LoadgAlice();
-    fRunLoader->LoadHeader();  
+    //  fRunLoader->LoadgAlice();
+    //   fRunLoader->LoadHeader();  
 
     fLoader = (AliITSLoader*) fRunLoader->GetLoader("ITSLoader");
     if(!fLoader) {
@@ -152,8 +158,8 @@ Bool_t AliITSreconstruction::Init(){
 
     // Now ready to init.
  
-    fRunLoader->CdGAFile();
-    fITSgeom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
+    //fRunLoader->CdGAFile();
+    fITSgeom = fLoader->GetITSgeom();
 
     fDetTypeRec = new AliITSDetTypeRec();
     fDetTypeRec->SetITSgeom(fITSgeom);
@@ -162,18 +168,14 @@ Bool_t AliITSreconstruction::Init(){
     fEnt0 = 0;
 
     //fEnt  = gAlice->GetEventsPerRun();
-    fEnt = Int_t(fRunLoader->TreeE()->GetEntries());
+    fEnt = Int_t(fRunLoader->GetNumberOfEvents());
 
     fLoader->LoadDigits("read");
     fLoader->LoadRecPoints("recreate");
-    fLoader->LoadRawClusters("recreate");
     if (fLoader->TreeR() == 0x0) fLoader->MakeTree("R");
-    if (fLoader->TreeC() == 0x0) fLoader->MakeTree("C");
  
-    fDetTypeRec->SetLoader(fLoader);
-    fDetTypeRec->MakeBranchR(0);
-    fDetTypeRec->MakeBranchC();
-    fDetTypeRec->SetTreeAddress();
+    fDetTypeRec->SetTreeAddressD(fLoader->TreeD());
+    fDetTypeRec->MakeBranchR(fLoader->TreeR());
     fDetTypeRec->SetTreeAddressR(fLoader->TreeR());
 
     fInit = InitRec();
@@ -272,17 +274,11 @@ void AliITSreconstruction::Exec(const Option_t *opt){
       Info("Exec","");
 
       fRunLoader->GetEvent(evnt);
-      fDetTypeRec->SetITSgeom(fITSgeom);
-      fDetTypeRec->SetLoader(fLoader);
       if (fLoader->TreeR() == 0x0) fLoader->MakeTree("R");
       fDetTypeRec->MakeBranchR(0);
-      if (fLoader->TreeC() == 0x0){
-       fDetTypeRec->MakeTreeC();
-       fDetTypeRec->MakeBranchC();
-      }
       fDetTypeRec->SetTreeAddressR(fLoader->TreeR());
       fDetTypeRec->SetTreeAddressD(fLoader->TreeD());
-      fDetTypeRec->DigitsToRecPoints(evnt,0,lopt);
+      fDetTypeRec->DigitsToRecPoints(fLoader->TreeD(),fLoader->TreeR(),0,lopt);
     } // end for evnt
 }
 //______________________________________________________________________