]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ACORDE/AliACORDEQADataMakerSim.cxx
Fixes for bug #49914: Compilation breaks in trunk, and bug #48629: Trunk cannot read...
[u/mrichter/AliRoot.git] / ACORDE / AliACORDEQADataMakerSim.cxx
index cf5f17ea3fc658b56507a5d62bed5186c8682654..6ebe597a1cf92dfb24c0fbdf2fdff4abbf0c759f 100755 (executable)
@@ -49,7 +49,7 @@
 ClassImp(AliACORDEQADataMakerSim)
            
 //____________________________________________________________________________ 
-AliACORDEQADataMakerSim::AliACORDEQADataMakerSim():AliQADataMakerSim(AliQA::GetDetName(AliQA::kACORDE), "ACORDE Quality Assurance Data Maker")
+AliACORDEQADataMakerSim::AliACORDEQADataMakerSim():AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker")
 {
 }
 //____________________________________________________________________________ 
@@ -68,19 +68,19 @@ AliACORDEQADataMakerSim& AliACORDEQADataMakerSim::operator = (const AliACORDEQAD
   return *this;
 }
 //____________________________________________________________________________
-void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
-   printf("ACORDE---->Detector specific actions at END of cycle\n................\n");
+   AliInfo("ACORDE---->Detector specific actions at END of cycle\n................\n");
 
-  AliQAChecker::Instance()->Run(AliQA::kACORDE, task, list) ;
+  AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
 }
 //____________________________________________________________________________
 void AliACORDEQADataMakerSim::StartOfDetectorCycle()
 {
   //Detector specific actions at start of cycle
-  printf("ACORDE---->Detector specific actions at START of cycle\n................\n");
+  AliInfo("ACORDE---->Detector specific actions at START of cycle\n................\n");
 }
 //____________________________________________________________________________ 
 void AliACORDEQADataMakerSim::InitHits()
@@ -111,80 +111,43 @@ void AliACORDEQADataMakerSim::MakeHits(TTree *hitTree)
 
        TClonesArray * hits = new TClonesArray("AliACORDEhit",1000);
        TBranch * branch = hitTree->GetBranch("ACORDE");
-       if (!branch)
-       {
+       if (!branch) {
                AliWarning("ACORDE branch in Hit Tree not found");
-       }else
-       {
-               if (branch)
-               {
-                       branch->SetAddress(&hits);
-               }else
-               {
-                       AliError("Branch ACORDE hit not found");
-                       exit(111);
-               }
-               Int_t ntracks = (Int_t)hitTree->GetEntries();
-               if (ntracks<=0) return;
-               for(Int_t track=0;track<ntracks;track++)
-               {
+       } else {
+    branch->SetAddress(&hits);
+               for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
                        branch->GetEntry(track);
-                       Int_t nhits = hits->GetEntriesFast();
-                       for(Int_t ihit=1;ihit<=nhits;ihit++)
-                       {
+                       for(Int_t ihit=0 ; ihit < hits->GetEntriesFast() ; ihit++) {
                                AliACORDEhit *AcoHit = (AliACORDEhit*) hits->UncheckedAt(ihit);
-                               if(!AcoHit)
-                               {
+                               if(!AcoHit) {
                                        AliError("The unchecked hit doesn't exist");
-                                       break;
+                                       continue ;
                                }
                                GetHitsData(0)->Fill(AcoHit->GetModule()-1);
-                       }
-               }
-       }
-
+      }
+    }
+  }
 }
 //____________________________________________________________________________
 void AliACORDEQADataMakerSim::MakeDigits( TTree *digitsTree)
 {
   //fills QA histos for Digits
-
-
-        TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000);
-        TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
-        if (!branch)
-        {
-                AliWarning("ACORDE branch in Digits Tree not found");
-        }else
-        {
-                if (branch)
-                {
-                        branch->SetAddress(&digits);
-                }else
-                {
-                        AliError("Branch ACORDE digit not found");
-                        exit(111);
-                }
-                Int_t ntracks = (Int_t)digitsTree->GetEntries();
-                if (ntracks<=0) return;
-                printf("Entries in DigitsTree:%d\n",ntracks);
-                for(Int_t track=0;track<ntracks;track++)
-                {
-                        branch->GetEntry(track);
-                        Int_t ndigits = digits->GetEntriesFast();
-                        for(Int_t idigit=0;idigit<ndigits;idigit++)
-                        {
-                                AliACORDEdigit *AcoDigit = (AliACORDEdigit*) digits->UncheckedAt(idigit);
-                                if (!AcoDigit)
-                                {
-                                        AliError("The unchecked digit doesn't exist");
-                                        break;
-                                }
-                                GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
-                        }
-                }
-
-
+  TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000);
+  TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
+  if (!branch) {
+    AliWarning("ACORDE branch in Digits Tree not found");
+  } else {
+    branch->SetAddress(&digits);
+    for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
+      branch->GetEntry(track);
+      for(Int_t idigit = 0 ; idigit < digits->GetEntriesFast() ; idigit++) {
+        AliACORDEdigit *AcoDigit = (AliACORDEdigit*) digits->UncheckedAt(idigit);
+        if (!AcoDigit) {
+          AliError("The unchecked digit doesn't exist");
+          continue ;
         }
-
+        GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
+      }
+    }
+  }
 }