Changes in QA to be able to process separately different triggers (Ruben)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Jul 2011 07:46:08 +0000 (07:46 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 4 Jul 2011 07:46:08 +0000 (07:46 +0000)
77 files changed:
ACORDE/AliACORDEQADataMaker.cxx
ACORDE/AliACORDEQADataMaker.h
ACORDE/AliACORDEQADataMakerRec.cxx
ACORDE/AliACORDEQADataMakerRec.h
ACORDE/AliACORDEQADataMakerSim.cxx
EMCAL/AliEMCALQADataMakerRec.cxx
EMCAL/AliEMCALQADataMakerSim.cxx
FMD/AliFMDQADataMakerRec.cxx
FMD/AliFMDQADataMakerSim.cxx
HLT/QA/AliHLTTPCQADataMaker.cxx
HMPID/AliHMPIDQADataMaker.cxx
HMPID/AliHMPIDQADataMakerRec.cxx
HMPID/AliHMPIDQADataMakerRec.h
HMPID/AliHMPIDQADataMakerSim.cxx
ITS/AliITSQADataMakerRec.cxx
ITS/AliITSQADataMakerSim.cxx
ITS/AliITSQASDDDataMakerRec.cxx
ITS/AliITSQASDDDataMakerRec.h
ITS/AliITSQASDDDataMakerSim.cxx
ITS/AliITSQASDDDataMakerSim.h
ITS/AliITSQASPDDataMakerRec.cxx
ITS/AliITSQASPDDataMakerRec.h
ITS/AliITSQASPDDataMakerSim.cxx
ITS/AliITSQASPDDataMakerSim.h
ITS/AliITSQASSDDataMakerRec.cxx
ITS/AliITSQASSDDataMakerRec.h
ITS/AliITSQASSDDataMakerSim.cxx
ITS/AliITSQASSDDataMakerSim.h
MUON/AliMUONQADataMakerRec.cxx
MUON/AliMUONQADataMakerSim.cxx
MUON/AliMUONTrackerQADataMakerRec.cxx
MUON/AliMUONTrackerQADataMakerRec.h
MUON/AliMUONTriggerQADataMakerRec.cxx
MUON/AliMUONVQADataMakerRec.cxx
MUON/AliMUONVQADataMakerRec.h
PHOS/AliPHOSQADataMakerRec.cxx
PHOS/AliPHOSQADataMakerSim.cxx
PMD/AliPMDQADataMakerRec.cxx
PMD/AliPMDQADataMakerSim.cxx
STEER/AliCorrQADataMakerRec.cxx
STEER/AliGRPObject.cxx
STEER/AliGRPObject.h
STEER/AliGlobalQADataMaker.cxx
STEER/AliQAChecker.cxx
STEER/AliQACheckerBase.cxx
STEER/AliQADataMaker.cxx
STEER/AliQADataMaker.h
STEER/AliQADataMakerRec.cxx
STEER/AliQADataMakerRec.h
STEER/AliQADataMakerSim.cxx
STEER/AliQADataMakerSim.h
STEER/AliQAManager.cxx
STEER/AliQAv1.cxx
STEER/AliQAv1.h
STEER/AliReconstruction.cxx
STRUCT/EvalAbso.C
T0/AliT0QAChecker.cxx
T0/AliT0QADataMaker.cxx
T0/AliT0QADataMakerRec.cxx
T0/AliT0QADataMakerRec.h
T0/AliT0QADataMakerSim.cxx
TOF/AliTOFQADataMaker.cxx
TOF/AliTOFQADataMakerRec.cxx
TOF/AliTOFQADataMakerRec.h
TOF/AliTOFQADataMakerSim.cxx
TPC/AliTPCQADataMakerRec.cxx
TPC/AliTPCQADataMakerSim.cxx
TRD/AliTRDQADataMaker.cxx
TRD/AliTRDQADataMakerRec.cxx
TRD/AliTRDQADataMakerRec.h
TRD/AliTRDQADataMakerSim.cxx
VZERO/AliVZEROQADataMakerRec.cxx
VZERO/AliVZEROQADataMakerRec.h
VZERO/AliVZEROQADataMakerSim.cxx
ZDC/AliZDCQAChecker.cxx
ZDC/AliZDCQADataMakerRec.cxx
ZDC/AliZDCQADataMakerSim.cxx

index 2ab349f..97b0c5a 100755 (executable)
@@ -105,8 +105,10 @@ void AliACORDEQADataMaker::InitHits()
          Add2HitsList(hACORDExz,9);
          Add2HitsList(hACORDEyz,10);
          Add2HitsList(hACORDEAzimPol,11);
-
+        //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
 }
+
 //____________________________________________________________________________ 
 void AliACORDEQADataMaker::InitDigits()
 {
@@ -117,23 +119,24 @@ void AliACORDEQADataMaker::InitDigits()
    modulename = "hDigitsModule";
    fhDigitsModule = new TH1F(modulename.Data(),"hDigitsModuleSingle",60,0,60);
    Add2DigitsList( fhDigitsModule,0);
-
-
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
 void AliACORDEQADataMaker::InitRaws()
 {
   // create Raw histograms in Raw subdir
-TH1D *fhACORDEBitPattern[4];
-fhACORDEBitPattern[0] = new TH1D("ACORDERawDataSM","ACORDE-SingleMuon",60,1,60);//AcordeSingleMuon BitPattern
-fhACORDEBitPattern[1] = new TH1D("ACORDERawDataMM","ACORDE-MultiMuon",60,1,60);//AcordeMultiMuon BitPattern
-fhACORDEBitPattern[2] = new TH1D("ACORDERawDataSMM","ACORDE-SingleMuonMultiplicity",60,1,60);//AcordeSingleMuon Multiplicity
-fhACORDEBitPattern[3] = new TH1D("ACORDERawDataMMM","ACORDE-MultiMuonMultiplicity",60,1,60);//AcordeMultiMuon Multiplicity
-for(Int_t i=0;i<4;i++)
-{
-        Add2RawsList(fhACORDEBitPattern[i],i);
-}
+  TH1F *fhACORDEBitPattern[4];
+  fhACORDEBitPattern[0] = new TH1F("ACORDERawDataSM","ACORDE-SingleMuon",60,1,60);//AcordeSingleMuon BitPattern
+  fhACORDEBitPattern[1] = new TH1F("ACORDERawDataMM","ACORDE-MultiMuon",60,1,60);//AcordeMultiMuon BitPattern
+  fhACORDEBitPattern[2] = new TH1F("ACORDERawDataSMM","ACORDE-SingleMuonMultiplicity",60,1,60);//AcordeSingleMuon Multiplicity
+  fhACORDEBitPattern[3] = new TH1F("ACORDERawDataMMM","ACORDE-MultiMuonMultiplicity",60,1,60);//AcordeMultiMuon Multiplicity
+  for(Int_t i=0;i<4;i++) {
+    Add2RawsList(fhACORDEBitPattern[i],i);
+  }
+  //
+  ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -141,8 +144,11 @@ for(Int_t i=0;i<4;i++)
 void AliACORDEQADataMaker::InitRecPoints()
 {
   // create cluster histograms in RecPoint subdir
-  // Not needed for ACORDE by now !!!
+  // Not needed for ACORDE by now !!
+  //
+  ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
 }
+
 //____________________________________________________________________________
 void AliACORDEQADataMaker::InitESDs()
 {
@@ -160,8 +166,8 @@ void AliACORDEQADataMaker::InitESDs()
    name = "hESDsMulti";
    fhESDsMulti = new TH1F(name.Data(),"hESDsMulti",60,0,60);
    Add2ESDsList( fhESDsMulti,1);
-
-
+  //
+  ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
 
 }
 //____________________________________________________________________________
@@ -170,7 +176,9 @@ void AliACORDEQADataMaker::MakeHits(TTree *hitTree)
 {
 
  // Here we fill the QA histos for Hits declared above
-
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
+  
         printf("Estamos en make Hits");
         TClonesArray * hits = new TClonesArray("AliACORDEhit",1000);
         TBranch * branch = hitTree->GetBranch("ACORDE");
@@ -201,20 +209,20 @@ void AliACORDEQADataMaker::MakeHits(TTree *hitTree)
                                         AliError("The unchecked hit doesn't exist");
                                         break;
                                 }
-                                GetHitsData(0)->Fill(AcoHit->Eloss());
-                                GetHitsData(1)->Fill(AcoHit->PolarAngle());
-                                GetHitsData(2)->Fill(AcoHit->AzimuthAngle());
-                                GetHitsData(3)->Fill(AcoHit->Px());
-                                GetHitsData(4)->Fill(AcoHit->Py());
-                                GetHitsData(5)->Fill(AcoHit->Pz());
-                                GetHitsData(6)->Fill(TMath::Sqrt( (AcoHit->Px())*(AcoHit->Px())+
+                                FillHitsData(0,AcoHit->Eloss());
+                                FillHitsData(1,AcoHit->PolarAngle());
+                                FillHitsData(2,AcoHit->AzimuthAngle());
+                                FillHitsData(3,AcoHit->Px());
+                                FillHitsData(4,AcoHit->Py());
+                                FillHitsData(5,AcoHit->Pz());
+                                FillHitsData(6,TMath::Sqrt( (AcoHit->Px())*(AcoHit->Px())+
                                              (AcoHit->Py())*(AcoHit->Py())));
-                                if((AcoHit->Py()) != 0.0 ) GetHitsData(7)->Fill(TMath::ATan(AcoHit->Px()/AcoHit->Py()));
-                                GetHitsData(8)->Fill( (Float_t)(AcoHit->X()),(Float_t)(AcoHit->Y()) );
-                                GetHitsData(9)->Fill( (Float_t)(AcoHit->X()),(Float_t)(AcoHit->Z()) );
-                                GetHitsData(10)->Fill( (Float_t)(AcoHit->Y()),(Float_t)(AcoHit->Z()) );
-                                GetHitsData(11)->Fill( (Float_t)(AcoHit->AzimuthAngle()),
-                                (Float_t)(AcoHit->PolarAngle()));
+                                if((AcoHit->Py()) != 0.0 ) FillHitsData(7,TMath::ATan(AcoHit->Px()/AcoHit->Py()));
+                                FillHitsData(8, (Float_t)(AcoHit->X()),(Float_t)(AcoHit->Y()) );
+                                FillHitsData(9, (Float_t)(AcoHit->X()),(Float_t)(AcoHit->Z()) );
+                                FillHitsData(10, (Float_t)(AcoHit->Y()),(Float_t)(AcoHit->Z()) );
+                                FillHitsData(11, (Float_t)(AcoHit->AzimuthAngle()),
+                                            (Float_t)(AcoHit->PolarAngle()));
                         }
                 }
         }
@@ -227,6 +235,8 @@ void AliACORDEQADataMaker::MakeHits(TTree *hitTree)
 void AliACORDEQADataMaker::MakeDigits( TTree *digitsTree)
 {
   //fills QA histos for Digits
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
 
 
         TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000);
@@ -259,7 +269,7 @@ void AliACORDEQADataMaker::MakeDigits( TTree *digitsTree)
                                         AliError("The unchecked digit doesn't exist");
                                         break;
                                 }
-                                GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
+                                FillDigitsData(0,AcoDigit->GetModule()-1);
                         }
                 }
 
@@ -275,6 +285,9 @@ void AliACORDEQADataMaker::MakeRaws( AliRawReader* rawReader)
 {
 
  //fills QA histos for RAW
+  IncEvCountCycleRaws();
+  IncEvCountTotalRaws();
+
   rawReader->Reset();
   AliACORDERawStream rawStream(rawReader);
   size_t contSingle=0;
@@ -324,16 +337,16 @@ if(rawStream.Next())
         {
                 if(kroSingle[r]==1)
                 {
-                        GetRawsData(0)->Fill(r+1);
-                        contSingle=contSingle+1;
+                 FillRawsData(0,r+1);
+                 contSingle=contSingle+1;
                 }
                 if(kroMulti[r]==1)
                 {
-                        GetRawsData(1)->Fill(r+1);
-                        contMulti++;
+                 FillRawsData(1,r+1);
+                 contMulti++;
                 }
 
-        }GetRawsData(2)->Fill(contSingle);GetRawsData(3)->Fill(contMulti);
+        } FillRawsData(2,contSingle); FillRawsData(3,contMulti);
 }
 
 
@@ -343,6 +356,9 @@ if(rawStream.Next())
 void AliACORDEQADataMaker::MakeRecPoints(TTree * clustersTree)
 {
   //fills QA histos for clusters
+  IncEvCountCycleRecPoints();
+  IncEvCountTotalRecPoints();
+
   // Not needed for ACORDE by now!!!
 }
 
@@ -350,19 +366,22 @@ void AliACORDEQADataMaker::MakeRecPoints(TTree * clustersTree)
 void AliACORDEQADataMaker::MakeESDs(AliESDEvent * esd)
 {
   //fills QA histos for ESD
+  IncEvCountCycleESDs();
+  IncEvCountTotalESDs();
+
 
         AliESDACORDE * fESDACORDE= esd->GetACORDEData();
         Int_t *fACORDEMultiMuon =fESDACORDE->GetACORDEMultiMuon();
         Int_t *fACORDESingleMuon=fESDACORDE->GetACORDESingleMuon();
 
-       for(int i=0;i<60;i++){
-            if(fACORDESingleMuon[i]==1)
-               GetESDsData(0) -> Fill(i);
-            if(fACORDEMultiMuon[i]==1)
-               GetESDsData(1) -> Fill(i);
+       for(int i=0;i<60;i++){
+         if(fACORDESingleMuon[i]==1)
+           FillESDsData(0,i);
+         if(fACORDEMultiMuon[i]==1)
+           FillESDsData(1,i);
         }
-
-
+       
+       
 
 }
 
index 9fb5b36..e3d00de 100755 (executable)
@@ -63,7 +63,7 @@ private:
   virtual TObjArray* Init(AliQAv1::TASKINDEX_t, Int_t, Int_t){return 0;};
   virtual void   Init(AliQAv1::TASKINDEX_t, TObjArray*, Int_t, Int_t){};
   virtual void   StartOfCycle(AliQAv1::TASKINDEX_t, Bool_t){};
-  virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray*){};
+  virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray**) {}
   virtual void   InitSDigits(){};
   virtual void   MakeHits(TClonesArray*){};
   virtual void   MakeDigits(TClonesArray*){};
index ce89d11..b16177e 100755 (executable)
 //\r
 //  Created: June 13th 2008\r
 //---\r
-// Last update: May 5th. 2011 (by Mario RC: mrodrigu@mail.cern.ch) -->Creates QA expert histograms and QA-shifter histograms also with threshold lines and visual alarm\r
+// Last update: May 5th. 2011 (by Mario RC: mrodrigu@mail.cern.ch) -->Creates QA expert histograms \r
+// and QA-shifter histograms also with threshold lines and visual alarm\r
 // Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram\r
-//  Last update: Nov. 14t 2009 --> MRC <mrodrigu@mail.cern.ch> (FCFM-BUAP) \r
+// Last update: Nov. 14t 2009 --> MRC <mrodrigu@mail.cern.ch> (FCFM-BUAP) \r
 //                     |--> Change in Multiplicity histogram for AMORE (to detect empty triggers events of ACORDE)\r
 \r
 \r
@@ -37,7 +38,6 @@
 #include <TFile.h> \r
 #include <TH1F.h> \r
 #include <TDirectory.h>\r
-#include <TLine.h>\r
 #include <TPaveText.h>\r
 // --- Standard library ---\r
 \r
 ClassImp(AliACORDEQADataMakerRec)\r
            \r
 //____________________________________________________________________________ \r
-AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker"),\r
-fhACOMean(new TLine(0.,4.,60.,4.)),\r
-fhACOMin(new TLine(0.,4.,60.,4.)),\r
-fhACOMax(new TLine(0.,4.,60.,4.)),\r
-fhACOMulti(new TLine(0.,4.,60.,4.)),\r
-fhACOMeanAMU(new TLine(0.,4.,60.,4.)),\r
-fhACOMinAMU(new TLine(0.,4.,60.,4.)),\r
-fhACOMaxAMU(new TLine(0.,4.,60.,4.)),\r
-fhACOMultiAMU(new TLine(0.,4.,60.,4.)),\r
-fhACOTriggerCheck(new TLine(0.,4.,60.,4.))\r
+ AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker"),\r
+  fhACOMean(new TLine(0.,4.,60.,4.)),\r
+  fhACOMin(new TLine(0.,4.,60.,4.)),\r
+  fhACOMax(new TLine(0.,4.,60.,4.)),\r
+  fhACOMulti(new TLine(0.,4.,60.,4.)),\r
+  fhACOMeanAMU(new TLine(0.,4.,60.,4.)),\r
+  fhACOMinAMU(new TLine(0.,4.,60.,4.)),\r
+  fhACOMaxAMU(new TLine(0.,4.,60.,4.)),\r
+  fhACOMultiAMU(new TLine(0.,4.,60.,4.)),\r
+  fhACOTriggerCheck(new TLine(0.,4.,60.,4.))\r
 {\r
 \r
 }\r
 //____________________________________________________________________________ \r
-AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):AliQADataMakerRec(),\r
-fhACOMean(qadm.fhACOMean),\r
-fhACOMin(qadm.fhACOMin),\r
-fhACOMax(qadm.fhACOMax),\r
-fhACOMulti(qadm.fhACOMulti),\r
-fhACOMeanAMU(qadm.fhACOMeanAMU),\r
-fhACOMinAMU(qadm.fhACOMinAMU),\r
-fhACOMaxAMU(qadm.fhACOMaxAMU),\r
-fhACOMultiAMU(qadm.fhACOMultiAMU),\r
-fhACOTriggerCheck(qadm.fhACOTriggerCheck)\r
+AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):\r
+  AliQADataMakerRec(),\r
+  fhACOMean(qadm.fhACOMean),\r
+  fhACOMin(qadm.fhACOMin),\r
+  fhACOMax(qadm.fhACOMax),\r
+  fhACOMulti(qadm.fhACOMulti),\r
+  fhACOMeanAMU(qadm.fhACOMeanAMU),\r
+  fhACOMinAMU(qadm.fhACOMinAMU),\r
+  fhACOMaxAMU(qadm.fhACOMaxAMU),\r
+  fhACOMultiAMU(qadm.fhACOMultiAMU),\r
+  fhACOTriggerCheck(qadm.fhACOTriggerCheck)\r
 {\r
   SetName((const char*)qadm.GetName()) ; \r
   SetTitle((const char*)qadm.GetTitle()); \r
 }\r
+\r
 //__________________________________________________________________\r
 AliACORDEQADataMakerRec::~AliACORDEQADataMakerRec()\r
 {\r
-       delete fhACOMean;\r
-       delete fhACOMin;\r
-       delete fhACOMax;\r
-       delete fhACOMulti;\r
-       delete fhACOTriggerCheck;\r
+  delete fhACOMean;\r
+  delete fhACOMin;\r
+  delete fhACOMax;\r
+  delete fhACOMulti;\r
+  delete fhACOTriggerCheck;\r
 }\r
 \r
 //__________________________________________________________________\r
@@ -104,338 +106,324 @@ void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj
 {\r
   //Detector specific actions at end of cycle\r
   // do the QA checking\r
-       // Update for DQM GUI\r
-       for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) \r
-       {\r
-               if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) \r
-                       continue ; \r
-               if (!GetRawsData(0)||!GetRawsData(1)) continue;\r
-               Double_t integral = GetRawsData(0)->Integral();\r
-               if (integral==0) \r
-               {\r
-                       printf("No entries in ACORDE Hits histograms --> fatal error, please check !!!\n");\r
-                       TPaveText *acoBoxFatal=new TPaveText(35,0.5,55,1,"b");  \r
-                       acoBoxFatal->SetFillColor(kRed);\r
-                       acoBoxFatal->SetLineColor(kRed);\r
-                       acoBoxFatal->SetLineWidth(2);\r
-                       //acoBox2->SetTextSize(3);\r
-                       //acoBox2->SetTextColor(kBlack);\r
-                       acoBoxFatal->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
-                       acoBoxFatal->AddText("Blue line: mean of hits");\r
-                       acoBoxFatal->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(0)->GetListOfFunctions()->Add(acoBoxFatal);\r
-\r
-                       TPaveText *acoMultiBoxFatal = new TPaveText(20,0.5,40,1,"b");\r
-                       acoMultiBoxFatal->SetFillColor(kRed);\r
-                       acoMultiBoxFatal->SetLineColor(kRed);\r
-                       acoMultiBoxFatal->SetLineWidth(2);\r
-                       acoMultiBoxFatal->AddText("ACO. Not O.K., Call the experts");\r
-                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBoxFatal);\r
-                       \r
-                       continue;\r
-               }\r
-               Double_t mean = integral/60;\r
-               fhACOMean->SetY1(mean);\r
-               fhACOMean->SetY2(mean);\r
-               fhACOMin->SetY1(0.05*mean);\r
-               fhACOMin->SetY2(0.05*mean);\r
-               fhACOMax->SetY1(2.25*mean);\r
-               fhACOMax->SetY2(2.25*mean);\r
-               \r
-               // alarms\r
-               Double_t max = GetRawsData(0)->GetMaximum();\r
-               if (max == 0)\r
-               {\r
-                       printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r
-                       continue;\r
-               }\r
-               // Multiplicity histogram threshold\r
-               Double_t maxMulti = GetRawsData(1)->GetMaximum();\r
-               if (maxMulti == 0)\r
-               {\r
-                       printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r
-                       continue;\r
-               }\r
-               fhACOMulti->SetX1(1);\r
-               fhACOMulti->SetY1(1);\r
-               fhACOMulti->SetX2(1);\r
-               fhACOMulti->SetY2(maxMulti);\r
-               TPaveText *acoBox=new TPaveText(35,max-0.20*max,55,max,"b");    \r
-               //acoBox->SetFillStyle(0);\r
-               TPaveText *acoBox1=new TPaveText(35,max-0.20*max,55,max,"b");   \r
-               //acoBox1->SetFillStyle(0);\r
-               TPaveText *acoBox2=new TPaveText(35,max-0.20*max,55,max,"b");   \r
-               //acoBox2->SetFillStyle(0);\r
-               Int_t flagACO_DQM = 0;\r
-               Bool_t isACOOk = kTRUE;\r
-               Bool_t isACOWarning = kFALSE;\r
-               for(Int_t iModule=0;iModule<60;iModule++)\r
-               {\r
-                       if ((GetRawsData(0)->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;\r
-               }\r
-               if (flagACO_DQM < 15)\r
-               {\r
-                       acoBox->SetFillColor(kGreen);\r
-                       acoBox->SetLineColor(kGreen);\r
-                       acoBox->SetLineWidth(2);\r
-                       //acoBox->SetTextSize(3);\r
-                       //acoBox->SetTextColor(kBlack);\r
-                       acoBox->AddText("FLAG MESSAGE: O.K. !!!");\r
-                       acoBox->AddText("Blue line: mean of hits");\r
-                       acoBox->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(0)->GetListOfFunctions()->Add(acoBox);\r
-\r
-                       \r
-               }else if (flagACO_DQM > 15 && flagACO_DQM<30)\r
-               {\r
-                       acoBox1->SetFillColor(kYellow);\r
-                       acoBox1->SetLineColor(kYellow);\r
-                       acoBox1->SetLineWidth(2);\r
-                       //acoBox1->SetTextSize(3);\r
-                       //acoBox1->SetTextColor(kBlack);\r
-                       acoBox1->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");\r
-                       acoBox1->AddText("Blue line: mean of hits");\r
-                       acoBox1->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(0)->GetListOfFunctions()->Add(acoBox1);\r
-                       isACOWarning=kTRUE;\r
-\r
-               }else if (flagACO_DQM > 30)\r
-               {\r
-                       acoBox2->SetFillColor(kRed);\r
-                       acoBox2->SetLineColor(kRed);\r
-                       acoBox2->SetLineWidth(2);\r
-                       //acoBox2->SetTextSize(3);\r
-                       //acoBox2->SetTextColor(kBlack);\r
-                       acoBox2->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
-                       acoBox2->AddText("Blue line: mean of hits");\r
-                       acoBox2->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(0)->GetListOfFunctions()->Add(acoBox2);\r
-                       isACOOk=kFALSE;\r
-\r
-               }\r
-               \r
-               \r
-               TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");\r
-               if (GetRawsData(1)->Integral()==0 || isACOOk==kFALSE)\r
-               {\r
-                       acoMultiBox->SetFillColor(kRed);\r
-                       acoMultiBox->SetLineColor(kRed);\r
-                       acoMultiBox->SetLineWidth(2);\r
-                       acoMultiBox->AddText("ACO. Not O.K., Call the experts");\r
-                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);\r
-               }\r
-/*             if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){\r
-                       acoMultiBox->SetFillColor(kYellow);\r
-                       acoMultiBox->SetLineColor(kYellow);\r
-                       acoMultiBox->SetLineWidth(2);\r
-                       acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");\r
-                       GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);\r
-               }\r
-*/\r
-               if (isACOOk==kTRUE)\r
-               {\r
-                       acoMultiBox->SetFillColor(kGreen);\r
-                       acoMultiBox->SetLineColor(kGreen);\r
-                       acoMultiBox->SetLineWidth(2);\r
-                       acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K.");\r
-                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
-                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);\r
-               }\r
-               if (isACOWarning==kTRUE)\r
-               {\r
-                       acoMultiBox->SetFillColor(kYellow);\r
-                       acoMultiBox->SetLineColor(kYellow);\r
-                       acoMultiBox->SetLineWidth(2);\r
-                       acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");\r
-                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
-                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);\r
-               }\r
-\r
-               // for AMU ACORDE trigger option\r
-               \r
-               if (!GetRawsData(2)||!GetRawsData(3)) continue;\r
-               Double_t integral1 = GetRawsData(2)->Integral();\r
-               if (integral1==0) \r
-               {\r
-                       printf("No entries in ACORDE Hits histograms --> fatal error, please check !!!\n");\r
-                       TPaveText *acoBoxFatalAMU=new TPaveText(35,0.5,55,1,"b");       \r
-                       acoBoxFatalAMU->SetFillColor(kRed);\r
-                       acoBoxFatalAMU->SetLineColor(kRed);\r
-                       acoBoxFatalAMU->SetLineWidth(2);\r
-                       //acoBox2->SetTextSize(3);\r
-                       //acoBox2->SetTextColor(kBlack);\r
-                       acoBoxFatalAMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
-                       acoBoxFatalAMU->AddText("Blue line: mean of hits");\r
-                       acoBoxFatalAMU->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(2)->GetListOfFunctions()->Add(acoBoxFatalAMU);\r
-\r
-                       TPaveText *acoMultiBoxFatalAMU = new TPaveText(20,0.5,40,1,"b");\r
-                       acoMultiBoxFatalAMU->SetFillColor(kRed);\r
-                       acoMultiBoxFatalAMU->SetLineColor(kRed);\r
-                       acoMultiBoxFatalAMU->SetLineWidth(2);\r
-                       acoMultiBoxFatalAMU->AddText("ACO. Not O.K., Call the experts");\r
-                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxFatalAMU);\r
-                       \r
-                       continue;\r
-               }\r
-               Double_t mean1 = integral1/60;\r
-               fhACOMeanAMU->SetY1(mean1);\r
-               fhACOMeanAMU->SetY2(mean1);\r
-               fhACOMinAMU->SetY1(0.05*mean1);\r
-               fhACOMinAMU->SetY2(0.05*mean1);\r
-               fhACOMaxAMU->SetY1(2.25*mean1);\r
-               fhACOMaxAMU->SetY2(2.25*mean1);\r
-               \r
-               // alarms\r
-               Double_t max1 = GetRawsData(2)->GetMaximum();\r
-               if (max1 == 0)\r
-               {\r
-                       printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r
-                       continue;\r
-               }\r
-               // Multiplicity histogram threshold\r
-               Double_t maxMulti1 = GetRawsData(3)->GetMaximum();\r
-               if (maxMulti1 == 0)\r
-               {\r
-                       printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r
-                       continue;\r
-               }\r
-               fhACOMultiAMU->SetX1(1);\r
-               fhACOMultiAMU->SetY1(1);\r
-               fhACOMultiAMU->SetX2(1);\r
-               fhACOMultiAMU->SetY2(maxMulti1);\r
-               TPaveText *acoBoxAMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");      \r
-               //acoBox->SetFillStyle(0);\r
-               TPaveText *acoBox1AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");     \r
-               //acoBox1->SetFillStyle(0);\r
-               TPaveText *acoBox2AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");     \r
-               //acoBox2->SetFillStyle(0);\r
-               Int_t flagACO_DQMAMU = 0;\r
-               Bool_t isACOOkAMU = kTRUE;\r
-               Bool_t isACOWarningAMU = kFALSE;\r
-               for(Int_t iModule=0;iModule<60;iModule++)\r
-               {\r
-                       if ((GetRawsData(2)->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;\r
-               }\r
-               if (flagACO_DQMAMU < 15)\r
-               {\r
-                       acoBoxAMU->SetFillColor(kGreen);\r
-                       acoBoxAMU->SetLineColor(kGreen);\r
-                       acoBoxAMU->SetLineWidth(2);\r
-                       //acoBox->SetTextSize(3);\r
-                       //acoBox->SetTextColor(kBlack);\r
-                       acoBoxAMU->AddText("FLAG MESSAGE: O.K. !!!");\r
-                       acoBoxAMU->AddText("Blue line: mean of hits");\r
-                       acoBoxAMU->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(2)->GetListOfFunctions()->Add(acoBoxAMU);\r
-\r
-                       \r
-               }else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30)\r
-               {\r
-                       acoBox1AMU->SetFillColor(kYellow);\r
-                       acoBox1AMU->SetLineColor(kYellow);\r
-                       acoBox1AMU->SetLineWidth(2);\r
-                       //acoBox1->SetTextSize(3);\r
-                       //acoBox1->SetTextColor(kBlack);\r
-                       acoBox1AMU->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");\r
-                       acoBox1AMU->AddText("Blue line: mean of hits");\r
-                       acoBox1AMU->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(2)->GetListOfFunctions()->Add(acoBox1AMU);\r
-                       isACOWarningAMU=kTRUE;\r
-\r
-               }else if (flagACO_DQMAMU > 30)\r
-               {\r
-                       acoBox2AMU->SetFillColor(kRed);\r
-                       acoBox2AMU->SetLineColor(kRed);\r
-                       acoBox2AMU->SetLineWidth(2);\r
-                       //acoBox2->SetTextSize(3);\r
-                       //acoBox2->SetTextColor(kBlack);\r
-                       acoBox2AMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
-                       acoBox2AMU->AddText("Blue line: mean of hits");\r
-                       acoBox2AMU->AddText("Between GREEN lines: ACO. O.K.");\r
-                       GetRawsData(2)->GetListOfFunctions()->Add(acoBox2AMU);\r
-                       isACOOkAMU=kFALSE;\r
-\r
-               }\r
-               \r
-               \r
-               TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");\r
-               if (GetRawsData(3)->Integral()==0 || isACOOkAMU==kFALSE)\r
-               {\r
-                       acoMultiBoxAMU->SetFillColor(kRed);\r
-                       acoMultiBoxAMU->SetLineColor(kRed);\r
-                       acoMultiBoxAMU->SetLineWidth(2);\r
-                       acoMultiBoxAMU->AddText("ACO. Not O.K., Call the experts");\r
-                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
-               }\r
-/*             if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){\r
-                       acoMultiBox->SetFillColor(kYellow);\r
-                       acoMultiBox->SetLineColor(kYellow);\r
-                       acoMultiBox->SetLineWidth(2);\r
-                       acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");\r
-                       GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);\r
-               }\r
-*/\r
-               if (isACOOkAMU==kTRUE)\r
-               {\r
-                       acoMultiBoxAMU->SetFillColor(kGreen);\r
-                       acoMultiBoxAMU->SetLineColor(kGreen);\r
-                       acoMultiBoxAMU->SetLineWidth(2);\r
-                       acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K.");\r
-                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
-                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
-               }\r
-               if (isACOWarningAMU==kTRUE)\r
-               {\r
-                       acoMultiBoxAMU->SetFillColor(kYellow);\r
-                       acoMultiBoxAMU->SetLineColor(kYellow);\r
-                       acoMultiBoxAMU->SetLineWidth(2);\r
-                       acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");\r
-                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
-                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
-               }\r
-\r
-               // Checks if hits distribution from SL0 and AMU are equal\r
-               Float_t eff = 0.0;\r
-               Int_t effFlag = 0;\r
-               for (Int_t iModule = 0; iModule < 60; iModule++)\r
-               {\r
-                       if (GetRawsData(2)->GetBinContent(iModule)==0) \r
-                       {\r
-                               eff = 0.0;\r
-                               continue;\r
-                       }else\r
-                       {\r
-                               eff = GetRawsData(0)->GetBinContent(iModule)/GetRawsData(2)->GetBinContent(iModule);\r
-                               GetRawsData(4)->Fill(iModule,eff);\r
-                               if (eff!=1) effFlag++;\r
-                       }\r
-               }\r
-               \r
-               if (effFlag == 0)\r
-               {\r
-                       TPaveText *checkTriggerBox = new TPaveText(20,0.6,40,0.8,"b");\r
-                       checkTriggerBox->SetFillColor(kGreen);\r
-                       checkTriggerBox->SetLineColor(kGreen);\r
-                       checkTriggerBox->SetLineWidth(2);\r
-                       checkTriggerBox->AddText("FLAG MESSAGE: ACO. trigger O.K.");\r
-                       GetRawsData(4)->GetListOfFunctions()->Add(checkTriggerBox);\r
-               }else\r
-               {\r
-                       TPaveText *checkTriggerBox1 = new TPaveText(20,0.6,40,0.8,"b");\r
-                       checkTriggerBox1->SetFillColor(kYellow);\r
-                       checkTriggerBox1->SetLineColor(kYellow);\r
-                       checkTriggerBox1->SetLineWidth(2);\r
-                       checkTriggerBox1->AddText("FLAG MESSAGE: Warning, please check the ACO trigger configuration");\r
-                       GetRawsData(4)->GetListOfFunctions()->Add(checkTriggerBox1);\r
-\r
-               }\r
-\r
-               \r
-\r
-       } // end specie loop\r
+  ResetEventTrigClasses(); // reset triggers list to select all histos\r
+  // Update for DQM GUI\r
+  //\r
+  for (Int_t specie = 0; specie < AliRecoParam::kNSpecies ; specie++) {\r
+    if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) continue ;\r
+    // \r
+    // RS Set event specie\r
+    SetEventSpecie(AliRecoParam::ConvertIndex(specie));\r
+    //\r
+    for (int itc=-1;itc<GetNTrigClasses();itc++) { // RS Loop over the trigger classes\r
+      //\r
+      TObjArray &harr = *GetRawsDataOfTrigClass(itc);\r
+      //\r
+      if (!harr[0] || !harr[1]) continue;\r
+      TH1* h0 = GetRawsData(0,itc);\r
+      TH1* h1 = GetRawsData(1,itc);\r
+      double integral = 0;\r
+      if (itc==-1 && (h0&&h1 && !(integral=h0->Integral()))) { // default clone\r
+       printf("No entries in ACORDE Hits histograms for trigger class %d, fatal error, please check !!!\n",itc);\r
+       TPaveText *acoBoxFatal=new TPaveText(35,0.5,55,1,"b");\r
+       acoBoxFatal->SetFillColor(kRed);\r
+       acoBoxFatal->SetLineColor(kRed);\r
+       acoBoxFatal->SetLineWidth(2);\r
+       //acoBox2->SetTextSize(3);\r
+       //acoBox2->SetTextColor(kBlack);\r
+       acoBoxFatal->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+       acoBoxFatal->AddText("Blue line: mean of hits");\r
+       acoBoxFatal->AddText("Between GREEN lines: ACO. O.K.");\r
+       h0->GetListOfFunctions()->Add(acoBoxFatal);\r
        \r
-       // QA Checker standar (to be updated)\r
+       TPaveText *acoMultiBoxFatal = new TPaveText(20,0.5,40,1,"b");\r
+       acoMultiBoxFatal->SetFillColor(kRed);\r
+       acoMultiBoxFatal->SetLineColor(kRed);\r
+       acoMultiBoxFatal->SetLineWidth(2);\r
+       acoMultiBoxFatal->AddText("ACO. Not O.K., Call the experts");\r
+       h1->GetListOfFunctions()->Add(acoMultiBoxFatal);\r
+       continue;\r
+      }\r
+      Double_t mean = integral/60;\r
+      fhACOMean->SetY1(mean);\r
+      fhACOMean->SetY2(mean);\r
+      fhACOMin->SetY1(0.05*mean);\r
+      fhACOMin->SetY2(0.05*mean);\r
+      fhACOMax->SetY1(2.25*mean);\r
+      fhACOMax->SetY2(2.25*mean);\r
+      \r
+      // alarms\r
+      Double_t max = h0->GetMaximum();\r
+      if (max == 0) {\r
+       printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r
+       continue;\r
+      }\r
+      // Multiplicity histogram threshold\r
+      Double_t maxMulti = h1->GetMaximum();\r
+      if (maxMulti == 0) {\r
+       printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r
+       continue;\r
+      }\r
+      fhACOMulti->SetX1(1);\r
+      fhACOMulti->SetY1(1);\r
+      fhACOMulti->SetX2(1);\r
+      fhACOMulti->SetY2(maxMulti);\r
+      TPaveText *acoBox=new TPaveText(35,max-0.20*max,55,max,"b");\r
+      //acoBox->SetFillStyle(0);\r
+      TPaveText *acoBox1=new TPaveText(35,max-0.20*max,55,max,"b");\r
+      //acoBox1->SetFillStyle(0);\r
+      TPaveText *acoBox2=new TPaveText(35,max-0.20*max,55,max,"b");\r
+      //acoBox2->SetFillStyle(0);\r
+      Int_t flagACO_DQM = 0;\r
+      Bool_t isACOOk = kTRUE;\r
+      Bool_t isACOWarning = kFALSE;\r
+      for(Int_t iModule=0;iModule<60;iModule++)        {\r
+       if ((h0->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;\r
+      }\r
+      if (flagACO_DQM < 15) {\r
+       acoBox->SetFillColor(kGreen);\r
+       acoBox->SetLineColor(kGreen);\r
+       acoBox->SetLineWidth(2);\r
+       //acoBox->SetTextSize(3);\r
+       //acoBox->SetTextColor(kBlack);\r
+       acoBox->AddText("FLAG MESSAGE: O.K. !!!");\r
+       acoBox->AddText("Blue line: mean of hits");\r
+       acoBox->AddText("Between GREEN lines: ACO. O.K.");\r
+       h0->GetListOfFunctions()->Add(acoBox);  \r
+       //\r
+      } \r
+      else if (flagACO_DQM > 15 && flagACO_DQM<30) {\r
+       acoBox1->SetFillColor(kYellow);\r
+       acoBox1->SetLineColor(kYellow);\r
+       acoBox1->SetLineWidth(2);\r
+       //acoBox1->SetTextSize(3);\r
+       //acoBox1->SetTextColor(kBlack);\r
+       acoBox1->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");\r
+       acoBox1->AddText("Blue line: mean of hits");\r
+       acoBox1->AddText("Between GREEN lines: ACO. O.K.");\r
+       h0->GetListOfFunctions()->Add(acoBox1);\r
+       isACOWarning=kTRUE;     \r
+      }\r
+      else if (flagACO_DQM > 30) {\r
+       acoBox2->SetFillColor(kRed);\r
+       acoBox2->SetLineColor(kRed);\r
+       acoBox2->SetLineWidth(2);\r
+       //acoBox2->SetTextSize(3);\r
+       //acoBox2->SetTextColor(kBlack);\r
+       acoBox2->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+       acoBox2->AddText("Blue line: mean of hits");\r
+       acoBox2->AddText("Between GREEN lines: ACO. O.K.");\r
+       h0->GetListOfFunctions()->Add(acoBox2);\r
+       isACOOk=kFALSE; \r
+      }\r
+      //\r
+      \r
+      TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");\r
+      if (h1->Integral()==0 || isACOOk==kFALSE) {\r
+       acoMultiBox->SetFillColor(kRed);\r
+       acoMultiBox->SetLineColor(kRed);\r
+       acoMultiBox->SetLineWidth(2);\r
+       acoMultiBox->AddText("ACO. Not O.K., Call the experts");\r
+       h1->GetListOfFunctions()->Add(acoMultiBox);\r
+      }\r
+      /*    if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){\r
+           acoMultiBox->SetFillColor(kYellow);\r
+           acoMultiBox->SetLineColor(kYellow);\r
+           acoMultiBox->SetLineWidth(2);\r
+           acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");\r
+           GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);\r
+           }\r
+      */\r
+      if (isACOOk==kTRUE) {\r
+       acoMultiBox->SetFillColor(kGreen);\r
+       acoMultiBox->SetLineColor(kGreen);\r
+       acoMultiBox->SetLineWidth(2);\r
+       acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K.");\r
+       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+       h1->GetListOfFunctions()->Add(acoMultiBox);\r
+      }\r
+      if (isACOWarning==kTRUE) {\r
+       acoMultiBox->SetFillColor(kYellow);\r
+       acoMultiBox->SetLineColor(kYellow);\r
+       acoMultiBox->SetLineWidth(2);\r
+       acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");\r
+       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+       h1->GetListOfFunctions()->Add(acoMultiBox);\r
+      }\r
+      \r
+      // for AMU ACORDE trigger option\r
+      TH1* h2 = (TH1*)harr[2];\r
+      TH1* h3 = (TH1*)harr[3];\r
+      if (!h2 || !h3) continue;\r
+      Double_t integral1 = h2->Integral();\r
+      if (integral1==0) {\r
+       printf("No entries in ACORDE Hits histograms for trigger class %d --> fatal error, please check !!!\n",itc);\r
+       TPaveText *acoBoxFatalAMU=new TPaveText(35,0.5,55,1,"b");\r
+       acoBoxFatalAMU->SetFillColor(kRed);\r
+       acoBoxFatalAMU->SetLineColor(kRed);\r
+       acoBoxFatalAMU->SetLineWidth(2);\r
+       //acoBox2->SetTextSize(3);\r
+       //acoBox2->SetTextColor(kBlack);\r
+       acoBoxFatalAMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+       acoBoxFatalAMU->AddText("Blue line: mean of hits");\r
+       acoBoxFatalAMU->AddText("Between GREEN lines: ACO. O.K.");\r
+       h2->GetListOfFunctions()->Add(acoBoxFatalAMU);\r
+       \r
+       TPaveText *acoMultiBoxFatalAMU = new TPaveText(20,0.5,40,1,"b");\r
+       acoMultiBoxFatalAMU->SetFillColor(kRed);\r
+       acoMultiBoxFatalAMU->SetLineColor(kRed);\r
+       acoMultiBoxFatalAMU->SetLineWidth(2);\r
+       acoMultiBoxFatalAMU->AddText("ACO. Not O.K., Call the experts");\r
+       h3->GetListOfFunctions()->Add(acoMultiBoxFatalAMU);\r
+       \r
+       continue;\r
+      }\r
+      Double_t mean1 = integral1/60;\r
+      fhACOMeanAMU->SetY1(mean1);\r
+      fhACOMeanAMU->SetY2(mean1);\r
+      fhACOMinAMU->SetY1(0.05*mean1);\r
+      fhACOMinAMU->SetY2(0.05*mean1);\r
+      fhACOMaxAMU->SetY1(2.25*mean1);\r
+      fhACOMaxAMU->SetY2(2.25*mean1);\r
+      \r
+      // alarms\r
+      Double_t max1 = h2->GetMaximum();\r
+      if (max1 == 0) {\r
+       printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r
+       continue;\r
+      }\r
+      // Multiplicity histogram threshold\r
+      Double_t maxMulti1 = h3->GetMaximum();\r
+      if (maxMulti1 == 0) {\r
+       printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r
+       continue;\r
+      }\r
+      fhACOMultiAMU->SetX1(1);\r
+      fhACOMultiAMU->SetY1(1);\r
+      fhACOMultiAMU->SetX2(1);\r
+      fhACOMultiAMU->SetY2(maxMulti1);\r
+      TPaveText *acoBoxAMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");\r
+      //acoBox->SetFillStyle(0);\r
+      TPaveText *acoBox1AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");\r
+      //acoBox1->SetFillStyle(0);\r
+      TPaveText *acoBox2AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");\r
+      //acoBox2->SetFillStyle(0);\r
+      Int_t flagACO_DQMAMU = 0;\r
+      Bool_t isACOOkAMU = kTRUE;\r
+      Bool_t isACOWarningAMU = kFALSE;\r
+      for(Int_t iModule=0;iModule<60;iModule++) {\r
+       if ((h2->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;\r
+      }\r
+      if (flagACO_DQMAMU < 15) {\r
+       acoBoxAMU->SetFillColor(kGreen);\r
+       acoBoxAMU->SetLineColor(kGreen);\r
+       acoBoxAMU->SetLineWidth(2);\r
+       //acoBox->SetTextSize(3);\r
+       //acoBox->SetTextColor(kBlack);\r
+       acoBoxAMU->AddText("FLAG MESSAGE: O.K. !!!");\r
+       acoBoxAMU->AddText("Blue line: mean of hits");\r
+       acoBoxAMU->AddText("Between GREEN lines: ACO. O.K.");\r
+       h2->GetListOfFunctions()->Add(acoBoxAMU);       \r
+       //\r
+      }\r
+      else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30) {\r
+       acoBox1AMU->SetFillColor(kYellow);\r
+       acoBox1AMU->SetLineColor(kYellow);\r
+       acoBox1AMU->SetLineWidth(2);\r
+       //acoBox1->SetTextSize(3);\r
+       //acoBox1->SetTextColor(kBlack);\r
+       acoBox1AMU->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");\r
+       acoBox1AMU->AddText("Blue line: mean of hits");\r
+       acoBox1AMU->AddText("Between GREEN lines: ACO. O.K.");\r
+       h2->GetListOfFunctions()->Add(acoBox1AMU);\r
+       isACOWarningAMU=kTRUE;\r
+       //\r
+      } \r
+      else if (flagACO_DQMAMU > 30) {\r
+       acoBox2AMU->SetFillColor(kRed);\r
+       acoBox2AMU->SetLineColor(kRed);\r
+       acoBox2AMU->SetLineWidth(2);\r
+       //acoBox2->SetTextSize(3);\r
+       //acoBox2->SetTextColor(kBlack);\r
+       acoBox2AMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+       acoBox2AMU->AddText("Blue line: mean of hits");\r
+       acoBox2AMU->AddText("Between GREEN lines: ACO. O.K.");\r
+       h2->GetListOfFunctions()->Add(acoBox2AMU);\r
+       isACOOkAMU=kFALSE;\r
+      }\r
+      //\r
+      TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");\r
+      if (h3->Integral()==0 || isACOOkAMU==kFALSE) {\r
+       acoMultiBoxAMU->SetFillColor(kRed);\r
+       acoMultiBoxAMU->SetLineColor(kRed);\r
+       acoMultiBoxAMU->SetLineWidth(2);\r
+       acoMultiBoxAMU->AddText("ACO. Not O.K., Call the experts");\r
+       h3->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
+      }\r
+      /*              if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){\r
+                     acoMultiBox->SetFillColor(kYellow);\r
+                     acoMultiBox->SetLineColor(kYellow);\r
+                     acoMultiBox->SetLineWidth(2);\r
+                     acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");\r
+                     GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);\r
+                     }\r
+      */\r
+      if (isACOOkAMU==kTRUE) {\r
+       acoMultiBoxAMU->SetFillColor(kGreen);\r
+       acoMultiBoxAMU->SetLineColor(kGreen);\r
+       acoMultiBoxAMU->SetLineWidth(2);\r
+       acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K.");\r
+       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+       h3->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
+      }\r
+      if (isACOWarningAMU==kTRUE) {\r
+       acoMultiBoxAMU->SetFillColor(kYellow);\r
+       acoMultiBoxAMU->SetLineColor(kYellow);\r
+       acoMultiBoxAMU->SetLineWidth(2);\r
+       acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");\r
+       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+       h3->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
+      }\r
+      \r
+      // Checks if hits distribution from SL0 and AMU are equal\r
+      Float_t eff = 0.0;\r
+      Int_t effFlag = 0;\r
+      //\r
+      TH1* h4 = (TH1*)harr[4];\r
+      if (h4) {\r
+       for (Int_t iModule = 0; iModule < 60; iModule++) {\r
+         if (h2->GetBinContent(iModule)==0) {\r
+           eff = 0.0;\r
+           continue;\r
+         }\r
+         else {\r
+           eff = h0->GetBinContent(iModule)/h2->GetBinContent(iModule);\r
+           h4->Fill(iModule,eff);\r
+           if (eff!=1) effFlag++;\r
+         }\r
+       }\r
+       \r
+       if (effFlag == 0)       {\r
+         TPaveText *checkTriggerBox = new TPaveText(20,0.6,40,0.8,"b");\r
+         checkTriggerBox->SetFillColor(kGreen);\r
+         checkTriggerBox->SetLineColor(kGreen);\r
+         checkTriggerBox->SetLineWidth(2);\r
+         checkTriggerBox->AddText("FLAG MESSAGE: ACO. trigger O.K.");\r
+         h4->GetListOfFunctions()->Add(checkTriggerBox);\r
+       }\r
+       else {\r
+         TPaveText *checkTriggerBox1 = new TPaveText(20,0.6,40,0.8,"b");\r
+         checkTriggerBox1->SetFillColor(kYellow);\r
+         checkTriggerBox1->SetLineColor(kYellow);\r
+         checkTriggerBox1->SetLineWidth(2);\r
+         checkTriggerBox1->AddText("FLAG MESSAGE: Warning, please check the ACO trigger configuration");\r
+         h4->GetListOfFunctions()->Add(checkTriggerBox1);\r
+       }\r
+      } // h4\r
+    } // end of trigger classes loop\r
+  } // end specie loop\r
+  // QA Checker standar (to be updated)\r
+  //\r
   AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;\r
 }\r
 \r
@@ -454,99 +442,103 @@ void AliACORDEQADataMakerRec::InitRaws()
   const Bool_t expert   = kTRUE ; \r
   const Bool_t saveCorr = kTRUE ; \r
   const Bool_t image    = kTRUE ; \r
-/*  const char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",\r
+  /*\r
+  const char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",\r
                         "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",\r
                         "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",\r
                         "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",\r
                         "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",\r
                         "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};\r
-*/\r
-\r
- // TH1F *fhACORDEBitPattern[4];\r
-       //TH1F *fhACORDEBitPatternDQM;\r
-//  fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern\r
-//  fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern\r
-//  fhACORDEBitPattern[2] = new TH1F("ACORDEMultiplicityfromRAWSingle","Number of fired ACORDE modules;No. of fired ACORDE modules;No. of events in ACORDE",61,-1,60);//AcordeSingleMuon Multiplicity\r
-//  fhACORDEBitPattern[3] = new TH1F("ACORDEMultiplicityfromRAWMulti","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",61,-1,60);//AcordeMultiMuon Multiplicity\r
-       TH1F * fhACORDEBitPatternDQM = new TH1F("ACOHitsSL0_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode\r
-       TH1F * fhACORDEMultiplicitySL0DQM = new TH1F("ACOMultiSL0_DQM_Shifter","Multiplicity of ACORDE fired modules for DQM shifter; No. of fired modules; No. of events",62,-1,60); // Multiplicity histo. for QA-shifter ACO-SL0 trigger mode\r
-       TH1F * fhACORDEBitPatternAMUDQM = new TH1F("ACOHitsAMU_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode\r
-       TH1F * fhACORDEMultiplicityAMUDQM = new TH1F("ACOMultiAMU_DQM_Shifter","Multiplicity of ACORDE fired modules for DQM shifter; No. of fired modules; No. of events",62,-1,60); // Multiplicity histo. for QA-shifter ACO-SL0 trigger mode\r
-       TH1F * fhACORDEBitPatternCheckDQM = new TH1F("ACOHitsTriggerCheck_DQMExpert","Check distribution for ACORDE trigger configuration; No. of module; Trigger hits difference",60,-0.5,59.5); // Check the trigger status of ACORDE (SL0 vs AMU)\r
-       // Expert histograms\r
-//     for(Int_t i=0;i<4;i++) \r
-//    Add2RawsList(fhACORDEBitPattern[i],i,expert, !image, !saveCorr);\r
-       // Check the hits multiplicity from trigger configuration\r
-       Add2RawsList(fhACORDEBitPatternCheckDQM,4,expert,image,!saveCorr);\r
-       fhACORDEBitPatternCheckDQM->SetFillColor(kOrange);\r
-       // AMORE diplay settings for shifter on GUI\r
-       \r
-       // For SL0 ACO trigger mode\r
-       \r
-       Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);\r
-       Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);\r
-       \r
-       // For Hits distribution on ACORDE\r
-       \r
-       fhACORDEBitPatternDQM->SetFillColor(kCyan-7);\r
-       fhACOMean->SetLineColor(kBlue);\r
-       fhACOMean->SetLineStyle(2);\r
-       fhACOMean->SetLineWidth(4);\r
-       fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMean);\r
-       fhACOMin->SetLineColor(kGreen);\r
-       fhACOMin->SetLineStyle(2);\r
-       fhACOMin->SetLineWidth(4);\r
-       fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMin);\r
-       fhACOMax->SetLineColor(kGreen);\r
-       fhACOMax->SetLineStyle(2);\r
-       fhACOMax->SetLineWidth(4);\r
-       fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMax);\r
-       \r
-       // For ACORDE Multiplicity distribution of fired modules\r
-       \r
-       fhACORDEMultiplicitySL0DQM->SetFillColor(kBlue+1);\r
-       fhACOMulti->SetLineColor(kMagenta);\r
-       fhACOMulti->SetLineStyle(2);\r
-       fhACOMulti->SetLineWidth(4);\r
-       fhACORDEMultiplicitySL0DQM->GetListOfFunctions()->Add(fhACOMulti);\r
-       \r
-       // For AMU ACO trigger mode\r
-       \r
-       Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);\r
-       Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);\r
-       \r
-       // For Hits distribution on ACORDE\r
-       \r
-       fhACORDEBitPatternAMUDQM->SetFillColor(kCyan-7);\r
-       fhACOMeanAMU->SetLineColor(kBlue);\r
-       fhACOMeanAMU->SetLineStyle(2);\r
-       fhACOMeanAMU->SetLineWidth(4);\r
-       fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMeanAMU);\r
-       fhACOMinAMU->SetLineColor(kGreen);\r
-       fhACOMinAMU->SetLineStyle(2);\r
-       fhACOMinAMU->SetLineWidth(4);\r
-       fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMinAMU);\r
-       fhACOMaxAMU->SetLineColor(kGreen);\r
-       fhACOMaxAMU->SetLineStyle(2);\r
-       fhACOMaxAMU->SetLineWidth(4);\r
-       fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMaxAMU);\r
-       \r
-       // For ACORDE Multiplicity distribution of fired modules\r
-       \r
-       fhACORDEMultiplicityAMUDQM->SetFillColor(kBlue+1);\r
-       fhACOMultiAMU->SetLineColor(kMagenta);\r
-       fhACOMultiAMU->SetLineStyle(2);\r
-       fhACOMultiAMU->SetLineWidth(4);\r
-       fhACORDEMultiplicityAMUDQM->GetListOfFunctions()->Add(fhACOMultiAMU);\r
-               \r
-  /*\r
+  */\r
+  // TH1F *fhACORDEBitPattern[4];\r
+         //TH1F *fhACORDEBitPatternDQM;\r
+ //  fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern\r
+ //  fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern\r
+ //  fhACORDEBitPattern[2] = new TH1F("ACORDEMultiplicityfromRAWSingle","Number of fired ACORDE modules;No. of fired ACORDE modules;No. of events in ACORDE",61,-1,60);//AcordeSingleMuon Multiplicity\r
+ //  fhACORDEBitPattern[3] = new TH1F("ACORDEMultiplicityfromRAWMulti","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",61,-1,60);//AcordeMultiMuon Multiplicity\r
+         TH1F * fhACORDEBitPatternDQM = new TH1F("ACOHitsSL0_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode\r
+         TH1F * fhACORDEMultiplicitySL0DQM = new TH1F("ACOMultiSL0_DQM_Shifter","Multiplicity of ACORDE fired modules for DQM shifter; No. of fired modules; No. of events",62,-1,60); // Multiplicity histo. for QA-shifter ACO-SL0 trigger mode\r
+         TH1F * fhACORDEBitPatternAMUDQM = new TH1F("ACOHitsAMU_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode\r
+         TH1F * fhACORDEMultiplicityAMUDQM = new TH1F("ACOMultiAMU_DQM_Shifter","Multiplicity of ACORDE fired modules for DQM shifter; No. of fired modules; No. of events",62,-1,60); // Multiplicity histo. for QA-shifter ACO-SL0 trigger mode\r
+         TH1F * fhACORDEBitPatternCheckDQM = new TH1F("ACOHitsTriggerCheck_DQMExpert","Check distribution for ACORDE trigger configuration; No. of module; Trigger hits difference",60,-0.5,59.5); // Check the trigger status of ACORDE (SL0 vs AMU)\r
+         // Expert histograms\r
+ //      for(Int_t i=0;i<4;i++)\r
+ //    Add2RawsList(fhACORDEBitPattern[i],i,expert, !image, !saveCorr);\r
+         // Check the hits multiplicity from trigger configuration\r
+         Add2RawsList(fhACORDEBitPatternCheckDQM,4,expert,image,!saveCorr);\r
+         fhACORDEBitPatternCheckDQM->SetFillColor(kOrange);\r
+         // AMORE diplay settings for shifter on GUI\r
\r
+         // For SL0 ACO trigger mode\r
\r
+         Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);\r
+        ForbidCloning(fhACORDEBitPatternDQM);\r
+         Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);\r
+        ForbidCloning(fhACORDEMultiplicitySL0DQM);\r
+         // For Hits distribution on ACORDE\r
\r
+         fhACORDEBitPatternDQM->SetFillColor(kCyan-7);\r
+         fhACOMean->SetLineColor(kBlue);\r
+         fhACOMean->SetLineStyle(2);\r
+         fhACOMean->SetLineWidth(4);\r
+         fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMean);\r
+         fhACOMin->SetLineColor(kGreen);\r
+         fhACOMin->SetLineStyle(2);\r
+         fhACOMin->SetLineWidth(4);\r
+         fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMin);\r
+         fhACOMax->SetLineColor(kGreen);\r
+         fhACOMax->SetLineStyle(2);\r
+         fhACOMax->SetLineWidth(4);\r
+         fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMax);\r
\r
+         // For ACORDE Multiplicity distribution of fired modules\r
\r
+         fhACORDEMultiplicitySL0DQM->SetFillColor(kBlue+1);\r
+         fhACOMulti->SetLineColor(kMagenta);\r
+         fhACOMulti->SetLineStyle(2);\r
+         fhACOMulti->SetLineWidth(4);\r
+         fhACORDEMultiplicitySL0DQM->GetListOfFunctions()->Add(fhACOMulti);\r
\r
+         // For AMU ACO trigger mode\r
\r
+         Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);\r
+         Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);\r
\r
+         // For Hits distribution on ACORDE\r
\r
+         fhACORDEBitPatternAMUDQM->SetFillColor(kCyan-7);\r
+         fhACOMeanAMU->SetLineColor(kBlue);\r
+         fhACOMeanAMU->SetLineStyle(2);\r
+         fhACOMeanAMU->SetLineWidth(4);\r
+         fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMeanAMU);\r
+         fhACOMinAMU->SetLineColor(kGreen);\r
+         fhACOMinAMU->SetLineStyle(2);\r
+         fhACOMinAMU->SetLineWidth(4);\r
+         fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMinAMU);\r
+         fhACOMaxAMU->SetLineColor(kGreen);\r
+         fhACOMaxAMU->SetLineStyle(2);\r
+         fhACOMaxAMU->SetLineWidth(4);\r
+         fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMaxAMU);\r
\r
+         // For ACORDE Multiplicity distribution of fired modules\r
\r
+         fhACORDEMultiplicityAMUDQM->SetFillColor(kBlue+1);\r
+         fhACOMultiAMU->SetLineColor(kMagenta);\r
+         fhACOMultiAMU->SetLineStyle(2);\r
+         fhACOMultiAMU->SetLineWidth(4);\r
+         fhACORDEMultiplicityAMUDQM->GetListOfFunctions()->Add(fhACOMultiAMU);\r
\r
+        /*\r
   for (Int_t iModule = 0; iModule<60; iModule++)\r
   {\r
-       fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
-       fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
+    fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
+    fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
   }\r
-*/\r
+        */\r
+  //\r
+  ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line\r
 }\r
+\r
 //____________________________________________________________________________ \r
 void AliACORDEQADataMakerRec::InitDigits()\r
 {\r
@@ -566,6 +558,8 @@ void AliACORDEQADataMakerRec::InitDigits()
   fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60);\r
   Add2DigitsList(fhDigitsModule,0,!expert,image);\r
   for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]); \r
+  //\r
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line\r
 }\r
 \r
 //____________________________________________________________________________ \r
@@ -574,6 +568,8 @@ void AliACORDEQADataMakerRec::InitRecPoints()
 {\r
   // create cluster histograms in RecPoint subdir\r
   // Not needed for ACORDE by now !!!\r
+  //\r
+  ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line\r
 }\r
 \r
 //____________________________________________________________________________\r
@@ -608,14 +604,15 @@ void AliACORDEQADataMakerRec::InitESDs()
        fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);\r
        fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);\r
    }\r
-\r
-\r
+   //\r
+   ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line\r
 }\r
 //____________________________________________________________________________\r
 void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)\r
 {\r
   //fills QA histos for RAW\r
-\r
+  IncEvCountCycleRaws();\r
+  IncEvCountTotalRaws();\r
   rawReader->Reset();\r
   AliACORDERawStream rawStream(rawReader);\r
   size_t contSingle=0;\r
@@ -658,32 +655,34 @@ if(rawStream.Next())
                 tmpDy>>=1;\r
         }\r
         contSingle=0;\r
-       for(Int_t r=0;r<60;r++)\r
-               {\r
-                               if(kroSingle[r]==1)\r
-                               {\r
-                                       GetRawsData(0)->Fill(r);\r
-                                       //GetRawsData(4)->Fill(r);\r
-                                       contSingle++;\r
-                               }\r
-               }GetRawsData(1)->Fill(contSingle);//GetRawsData(5)->Fill(contSingle);\r
-               contMulti=0;\r
+       contMulti=0;\r
         for(Int_t r=0;r<60;r++)\r
         {\r
+                       if(kroSingle[r]==1)\r
+                       {\r
+                         FillRawsData(0,r);\r
+                         //FillRawsData(4,r);\r
+                         contSingle++;\r
+                       }\r
                        if(kroMulti[r]==1)\r
                        {\r
-                               GetRawsData(2)->Fill(r);\r
-                               //GetRawsData(6)->Fill(r);\r
-                               contMulti++;\r
+                         FillRawsData(2,r);\r
+                         //FillRawsData(6,r);\r
+                         contMulti++;\r
                        }\r
-\r
-        }GetRawsData(3)->Fill(contMulti);//GetRawsData(7)->Fill(contMulti);\r
+                       \r
+        } \r
+       FillRawsData(3,contSingle); \r
+       FillRawsData(7,contMulti);\r
 }\r
 }\r
 //____________________________________________________________________________\r
 void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)\r
 {\r
   //fills QA histos for Digits\r
+  IncEvCountCycleDigits();\r
+  IncEvCountTotalDigits();\r
+\r
   if (fDigitsArray) \r
     fDigitsArray->Clear() ; \r
   else \r
@@ -701,7 +700,7 @@ void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)
           AliError("The unchecked digit doesn't exist");\r
           continue ;\r
         }\r
-        GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);\r
+        FillDigitsData(0,AcoDigit->GetModule()-1);\r
       }\r
     }\r
   }\r
@@ -711,17 +710,19 @@ void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)
 void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)\r
 {\r
   //fills QA histos for ESD\r
-\r
+  IncEvCountCycleESDs();\r
+  IncEvCountTotalESDs();\r
+  //\r
   AliESDACORDE * fESDACORDE= esd->GetACORDEData();\r
   Int_t acoMulti=0;\r
   for(int i=0;i<60;i++)\r
   {\r
-       if(fESDACORDE->GetHitChannel(i)) \r
-       {\r
-               GetESDsData(0)->Fill(i+1);\r
-               GetESDsData(1)->Fill(i+1);\r
-               acoMulti++;\r
+    if(fESDACORDE->GetHitChannel(i)) \r
+         {\r
+         FillESDsData(0,i+1);\r
+         FillESDsData(1,i+1);\r
+         acoMulti++;\r
        }\r
-  }GetESDsData(2)->Fill(acoMulti);\r
+  } FillESDsData(2,acoMulti);\r
 \r
 }\r
index 2f8e633..3e51643 100755 (executable)
 
 #include "AliQADataMakerRec.h"
 #include <TLine.h>
+
 class AliACORDEQADataMakerRec: public AliQADataMakerRec {
 
 public:
   AliACORDEQADataMakerRec() ;          // constructor
   AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm) ;   
   AliACORDEQADataMakerRec& operator = (const AliACORDEQADataMakerRec& qadm) ;
-       virtual ~AliACORDEQADataMakerRec();// destructor
+  virtual ~AliACORDEQADataMakerRec(); // destructor
 
 private:
   virtual void   InitRaws() ;    //book Digit QA histo
@@ -46,22 +47,22 @@ private:
   virtual void   MakeRaws(AliRawReader* rawReader) ;
   virtual void   MakeESDs(AliESDEvent * esd) ;         //Fill hit QA histo
   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
-  virtual void   StartOfDetectorCycle() ;
-       
-       //For DQM shifter histogram
-       // SL0 ACO trigger mode
-       TLine* fhACOMean; 
-       TLine* fhACOMin; 
-       TLine* fhACOMax; 
-       TLine* fhACOMulti;
-       // AMU trigger mode
-       TLine* fhACOMeanAMU; 
-       TLine* fhACOMinAMU; 
-       TLine* fhACOMaxAMU; 
-       TLine* fhACOMultiAMU;
-       // Trigger check (4 words from hits multiplicity)
-       TLine* fhACOTriggerCheck;
-
+  virtual void   StartOfDetectorCycle();
+  //
+  //For DQM shifter histogram
+  // SL0 ACO trigger mode
+  TLine* fhACOMean;
+  TLine* fhACOMin;
+  TLine* fhACOMax;
+  TLine* fhACOMulti;
+  // AMU trigger mode
+  TLine* fhACOMeanAMU;
+  TLine* fhACOMinAMU;
+  TLine* fhACOMaxAMU;
+  TLine* fhACOMultiAMU;
+  // Trigger check (4 words from hits multiplicity)
+  TLine* fhACOTriggerCheck;
+  //
   ClassDef(AliACORDEQADataMakerRec,1)  // description 
 
 };
index f555b21..87c214b 100755 (executable)
@@ -72,6 +72,7 @@ void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj
 {
   //Detector specific actions at end of cycle
   // do the QA checking
+  ResetEventTrigClasses(); // reset triggers list to select all histos
   AliDebug(AliQAv1::GetQADebugLevel(), "ACORDE---->Detector specific actions at END of cycle\n................\n");
 
   AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
@@ -86,33 +87,34 @@ void AliACORDEQADataMakerSim::StartOfDetectorCycle()
 void AliACORDEQADataMakerSim::InitHits()
 {
   // create Hits histograms in Hits subdir
-       
+  
   const Bool_t expert   = kTRUE ; 
   const Bool_t image    = kTRUE ; 
   
   TH1F * fHitsACORDE;  
-
-       fHitsACORDE = new TH1F("ACORDEBitPatternfromHits","Distribution of ACORDE fired modules from HITS",60,1,60);
-       Add2HitsList(fHitsACORDE,0,!expert,image);
-
-      const char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",
-                        "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
-                        "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
-                        "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
-                        "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
-                        "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
-
-
-       fHitsACORDE->SetXTitle("Modules");
-        fHitsACORDE->SetYTitle("Counts");
-        for (Int_t i=0;i<60;i++)
-        {
-                fHitsACORDE->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
-        }
-
-
-
+  
+  fHitsACORDE = new TH1F("ACORDEBitPatternfromHits","Distribution of ACORDE fired modules from HITS",60,1,60);
+  Add2HitsList(fHitsACORDE,0,!expert,image);
+  
+  const char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",
+                            "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
+                            "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
+                            "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
+                            "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
+                            "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
+  
+  
+  fHitsACORDE->SetXTitle("Modules");
+  fHitsACORDE->SetYTitle("Counts");
+  for (Int_t i=0;i<60;i++)
+    {
+      fHitsACORDE->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
+    }
+  //
+  //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
 }
+
 //____________________________________________________________________________ 
 void AliACORDEQADataMakerSim::InitDigits()
 {
@@ -130,22 +132,24 @@ void AliACORDEQADataMakerSim::InitDigits()
                         "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
                         "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
                         "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
-
-
-       fhDigitsModule->SetXTitle("Modules");
-        fhDigitsModule->SetYTitle("Counts");
-        for (Int_t i=0;i<60;i++)
-        {
-                fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
-        }
-
-
+  
+  
+  fhDigitsModule->SetXTitle("Modules");
+  fhDigitsModule->SetYTitle("Counts");
+  for (Int_t i=0;i<60;i++)
+    {
+      fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
+    }
+    //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
-//____________________________________________________________________________
 
+//____________________________________________________________________________
 void AliACORDEQADataMakerSim::MakeHits(TTree *hitTree)
 {
   // Here we fill the QA histos for Hits declared above
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
 
        if (fHitsArray) 
        fHitsArray->Clear() ; 
@@ -169,7 +173,7 @@ void AliACORDEQADataMakerSim::MakeHits(TTree *hitTree)
                                        AliError("The unchecked hit doesn't exist");
                                        continue ;
                                }
-                               GetHitsData(0)->Fill(AcoHit->GetModule());
+                               FillHitsData(0,AcoHit->GetModule());
                        }                       
                }
        }
@@ -179,6 +183,9 @@ void AliACORDEQADataMakerSim::MakeHits(TTree *hitTree)
 void AliACORDEQADataMakerSim::MakeDigits( TTree *digitsTree)
 {
   //fills QA histos for Digits
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+
   if (fDigitsArray) 
     fDigitsArray->Clear() ; 
   else
@@ -197,7 +204,7 @@ void AliACORDEQADataMakerSim::MakeDigits( TTree *digitsTree)
           AliError("The unchecked digit doesn't exist");
           continue ;
         }
-        GetDigitsData(0)->Fill(AcoDigit->GetModule());
+        FillDigitsData(0,AcoDigit->GetModule());
       }
     }
   }
index eb58eed..a49e678 100644 (file)
@@ -186,6 +186,7 @@ void AliEMCALQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA
 //       GetRawsData(kNEventsPerTower)->Scale(1./fCycleCounter);
 
   // do the QA checking
+  ResetEventTrigClasses(); // reset triggers list to select all histos
   AliQAChecker::Instance()->Run(AliQAv1::kEMCAL, task, list) ;  
 }
 
@@ -264,7 +265,8 @@ void AliEMCALQADataMakerRec::InitESDs()
   TH1I * h4 = new TH1I("hESDCaloCellM", "ESDs CaloCell multiplicity in EMCAL;# of Clusters;Entries", 200, 0,  1000) ; 
   h4->Sumw2() ;
   Add2ESDsList(h4, kESDCaloCellM, !expert, image) ;
-       
+  //
+  ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line   
 }
 
 //____________________________________________________________________________ 
@@ -280,6 +282,8 @@ void AliEMCALQADataMakerRec::InitDigits()
   TH1I * h1 = new TH1I("hEmcalDigitsMul", "Digits multiplicity distribution in EMCAL;# of Digits;Entries", 200, 0, 2000) ; 
   h1->Sumw2() ;
   Add2DigitsList(h1, 1, !expert, image) ;
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -300,7 +304,8 @@ void AliEMCALQADataMakerRec::InitRecPoints()
   TH1I* h2 = new TH1I("hEMCALRpDigM","EMCAL RecPoint Digit Multiplicities;# of Digits;Entries",20,0,20);
   h2->Sumw2();
   Add2RecPointsList(h2,kRecPDigM, !expert, image);
-
+  //
+  ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -379,7 +384,7 @@ void AliEMCALQADataMakerRec::InitRaws()
   h15->SetDirectory(0);
   Add2RawsList(h15, k2DRatioAmp, !expert, image, !saveCorr) ;
 
-       TH1F * h16 = new TH1F("hRatioDist", "Amplitude_{current run}/Amplitude_{reference run} ratio distribution", nTot, 0., 2.);
+  TH1F * h16 = new TH1F("hRatioDist", "Amplitude_{current run}/Amplitude_{reference run} ratio distribution", nTot, 0., 2.);
   h16->SetMinimum(0.1); 
   h16->SetMaximum(100.);
   gStyle->SetOptStat(0);
@@ -489,6 +494,8 @@ void AliEMCALQADataMakerRec::InitRaws()
   Add2RawsList(hL11, kLEDMonRatioDist, !expert, image, !saveCorr) ;
   
   GetCalibRefFromOCDB();   
+  //
+  ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
 }
 
 //____________________________________________________________________________
@@ -500,26 +507,29 @@ void AliEMCALQADataMakerRec::MakeESDs(AliESDEvent * esd)
   for ( Int_t index = 0; index < esd->GetNumberOfCaloClusters() ; index++ ) {
     AliESDCaloCluster * clu = esd->GetCaloCluster(index) ;
     if( clu->IsEMCAL() ) {
-      GetESDsData(kESDCaloClusE)->Fill(clu->E()) ;
+      FillESDsData(kESDCaloClusE,clu->E()) ;
       nTot++ ;
     } 
   }
-  GetESDsData(kESDCaloClusM)->Fill(nTot) ;
+  FillESDsData(kESDCaloClusM,nTot) ;
 
   //fill calo cells
   AliESDCaloCells* cells = esd->GetEMCALCells();
-  GetESDsData(kESDCaloCellM)->Fill(cells->GetNumberOfCells()) ;
+  FillESDsData(kESDCaloCellM,cells->GetNumberOfCells()) ;
 
   for ( Int_t index = 0; index < cells->GetNumberOfCells() ; index++ ) {
-    GetESDsData(kESDCaloCellA)->Fill(cells->GetAmplitude(index)) ;
+    FillESDsData(kESDCaloCellA,cells->GetAmplitude(index)) ;
   }
-
+  //
+  IncEvCountCycleESDs();
+  IncEvCountTotalESDs();
 }
 
 //____________________________________________________________________________
 void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
 {
- // Check that all the reference histograms exist before we try to use them - otherwise call InitRaws
+  // Check that all the reference histograms exist before we try to use them - otherwise call InitRaws
+  // RS: Attention: the counters are increments after custom modification of eventSpecie
   if (!fCalibRefHistoPro || !fCalibRefHistoH2F || !fLEDMonRefHistoPro || !fHighEmcHistoH2F) {
     InitRaws();
   }
@@ -540,7 +550,7 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   if (rawReader->GetType() == AliRawEventHeaderBase::kCalibrationEvent) { 
     SetEventSpecie(AliRecoParam::kCalib) ;
   }
+  
   const Int_t nTowersPerSM = AliEMCALGeoParams::fgkEMCALRows * AliEMCALGeoParams::fgkEMCALCols; // number of towers in a SuperModule; 24x48
   const Int_t nRows        = AliEMCALGeoParams::fgkEMCALRows; // number of rows per SuperModule
   const Int_t nStripsPerSM = AliEMCALGeoParams::fgkEMCALLEDRefs; // number of strips per SuperModule
@@ -641,8 +651,8 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
                  if(iTRUIdInSM < n2x2PerTRU) {
                    Int_t iTRUAbsId = iTRUIdInSM + n2x2PerTRU * iTRUId;
                    // Fill the histograms
-                   GetRawsData(kNL0TRU)->Fill(iTRUAbsId);
-                   GetRawsData(kTimeL0TRU)->Fill(iTRUAbsId, startBin);
+                   FillRawsData(kNL0TRU,iTRUAbsId);
+                   FillRawsData(kTimeL0TRU,iTRUAbsId, startBin);
                  }
                }
              }
@@ -656,24 +666,24 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
            if ( in.IsLowGain() ) { 
              nTotalSMLG[iSM]++; 
              if ( (amp > fMinSignalLG) && (amp < fMaxSignalLG) ) { 
-               GetRawsData(kSigLG)->Fill(towerId, amp);
-               GetRawsData(kTimeLG)->Fill(towerId, time);
+               FillRawsData(kSigLG,towerId, amp);
+               FillRawsData(kTimeLG,towerId, time);
              }
              if (nPed > 0) {
                for (Int_t i=0; i<nPed; i++) {
-                 GetRawsData(kPedLG)->Fill(towerId, pedSamples[i]);
+                 FillRawsData(kPedLG,towerId, pedSamples[i]);
                }
              }
            } // gain==0
            else if ( in.IsHighGain() ) {               
              nTotalSMHG[iSM]++; 
              if ( (amp > fMinSignalHG) && (amp < fMaxSignalHG) ) { 
-               GetRawsData(kSigHG)->Fill(towerId, amp);
-               GetRawsData(kTimeHG)->Fill(towerId, time);
+               FillRawsData(kSigHG,towerId, amp);
+               FillRawsData(kTimeHG,towerId, time);
              } 
              if (nPed > 0) {
                for (Int_t i=0; i<nPed; i++) {
-                 GetRawsData(kPedHG)->Fill(towerId, pedSamples[i]);
+                 FillRawsData(kPedHG,towerId, pedSamples[i]);
                }
              }
            } // gain==1
@@ -686,12 +696,12 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
              + in.GetColumn();
            nTotalSMTRU[iSM]++; 
            if ( (amp > fMinSignalTRU) && (amp < fMaxSignalTRU) ) { 
-             GetRawsData(kSigTRU)->Fill(iTRU2x2Id, amp);
-             GetRawsData(kTimeTRU)->Fill(iTRU2x2Id, time);
+             FillRawsData(kSigTRU,iTRU2x2Id, amp);
+             FillRawsData(kTimeTRU,iTRU2x2Id, time);
            }
            if (nPed > 0) {
              for (Int_t i=0; i<nPed; i++) {
-               GetRawsData(kPedTRU)->Fill(iTRU2x2Id, pedSamples[i]);
+               FillRawsData(kPedTRU,iTRU2x2Id, pedSamples[i]);
              }
            }
          }
@@ -705,24 +715,24 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
            if ( gain == 0 ) { 
              nTotalSMLGLEDMon[iSM]++; 
              if ( (amp > fMinSignalLGLEDMon) && (amp < fMaxSignalLGLEDMon) ) { 
-               GetRawsData(kSigLGLEDMon)->Fill(stripId, amp);
-               GetRawsData(kTimeLGLEDMon)->Fill(stripId, time);
+               FillRawsData(kSigLGLEDMon,stripId, amp);
+               FillRawsData(kTimeLGLEDMon,stripId, time);
              }
              if (nPed > 0) {
                for (Int_t i=0; i<nPed; i++) {
-                 GetRawsData(kPedLGLEDMon)->Fill(stripId, pedSamples[i]);
+                 FillRawsData(kPedLGLEDMon,stripId, pedSamples[i]);
                }
              }
            } // gain==0
            else if ( gain == 1 ) {             
              nTotalSMHGLEDMon[iSM]++; 
              if ( (amp > fMinSignalHGLEDMon) && (amp < fMaxSignalHGLEDMon) ) { 
-               GetRawsData(kSigHGLEDMon)->Fill(stripId, amp);
-               GetRawsData(kTimeHGLEDMon)->Fill(stripId, time);
+               FillRawsData(kSigHGLEDMon,stripId, amp);
+               FillRawsData(kTimeHGLEDMon,stripId, time);
              }
              if (nPed > 0) {
                for (Int_t i=0; i<nPed; i++) {
-                 GetRawsData(kPedHGLEDMon)->Fill(stripId, pedSamples[i]);
+                 FillRawsData(kPedHGLEDMon,stripId, pedSamples[i]);
                }
              }
            } // low or high gain
@@ -735,58 +745,70 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
    
   }//end while over DDL's, of input stream 
 
- // TProfile * p = dynamic_cast<TProfile *>(GetRawsData(kSigHG)) ;
-  ConvertProfile2H(dynamic_cast<TProfile *>(GetRawsData(kSigHG)), fHighEmcHistoH2F) ;  
-  Double_t binContent = 0. ;
-  
   
   //calculate the ratio of the amplitude and fill the histograms, only if the events type is Calib
- if (rawReader->GetType() == AliRawEventHeaderBase::kCalibrationEvent) {
-               //reset ratio histograms
-               GetRawsData(k2DRatioAmp)->Reset("ICE"); 
-               GetRawsData(kRatioDist)->Reset("ICE"); 
-               GetRawsData(kLEDMonRatio)->Reset("ICE");        
-               GetRawsData(kLEDMonRatioDist)->Reset("ICE");
-               GetRawsData(k2DRatioAmp)->ResetStats(); 
-               GetRawsData(kRatioDist)->ResetStats();
-               GetRawsData(kLEDMonRatio)->ResetStats();
-               GetRawsData(kLEDMonRatioDist)->ResetStats();
-
-    for(Int_t ix = 1; ix <= fHighEmcHistoH2F->GetNbinsX(); ix++) {
-     for(Int_t iy = 1; iy <= fHighEmcHistoH2F->GetNbinsY(); iy++) {
-       if(fCalibRefHistoH2F->GetBinContent(ix, iy))binContent = fHighEmcHistoH2F->GetBinContent(ix, iy)/fCalibRefHistoH2F->GetBinContent(ix, iy) ;
-        GetRawsData(k2DRatioAmp)->SetBinContent(ix, iy, binContent);
-        GetRawsData(kRatioDist)->Fill(GetRawsData(k2DRatioAmp)->GetBinContent(ix, iy));
+  // RS: operation on the group of histos kSigHG,k2DRatioAmp,kRatioDist,kLEDMonRatio,kLEDMonRatio,kSigLGLEDMon
+  const int hGrp[] = {kSigHG,k2DRatioAmp,kRatioDist,kLEDMonRatio,kLEDMonRatio,kSigLGLEDMon};
+  if ( rawReader->GetType() == AliRawEventHeaderBase::kCalibrationEvent &&
+       CheckCloningConsistency(fRawsQAList, hGrp, sizeof(hGrp)/sizeof(int)) ) {  // RS converting original code to loop over all matching triggers
+    int nTrig =IsClonedPerTrigClass(kSigHG,fRawsQAList) ? GetNEventTrigClasses() : 0; // loop over triggers only if histos were cloned
+    //
+    for (int itr=-1;itr<nTrig;itr++) { // start from -1 to acknowledge original histos if they were kept
+      TObjArray* trArr = GetMatchingRawsHistosSet(hGrp, sizeof(hGrp)/sizeof(int) ,itr);
+      if (!trArr) continue;  // no histos for current trigger
+      //
+      Double_t binContent = 0.;
+      TProfile* prSigHG      = (TProfile *)trArr->At(0); //kSigHG
+      TH1* th2DRatioAmp      = (TH1*) trArr->At(1); //k2DRatioAmp
+      TH1* thRatioDist       = (TH1*) trArr->At(2); //kRatioDist
+      TH1* thLEDMonRatio     = (TH1*) trArr->At(3); //kLEDMonRatio
+      TH1* thLEDMonRatioDist = (TH1*) trArr->At(4); //kLEDMonRatio
+      TH1* hSigLGLEDMon      = (TH1*) trArr->At(5); //kSigLGLEDMon
+      th2DRatioAmp->Reset("ICE");
+      thRatioDist->Reset("ICE");
+      thLEDMonRatio->Reset("ICE");
+      thLEDMonRatioDist->Reset("ICE");
+      th2DRatioAmp->ResetStats();
+      thRatioDist->ResetStats();
+      thLEDMonRatio->ResetStats();
+      thLEDMonRatioDist->ResetStats();
+      ConvertProfile2H(prSigHG, fHighEmcHistoH2F);  
+      //
+      for(Int_t ix = 1; ix <= fHighEmcHistoH2F->GetNbinsX(); ix++) {
+       for(Int_t iy = 1; iy <= fHighEmcHistoH2F->GetNbinsY(); iy++) { 
+         if(fCalibRefHistoH2F->GetBinContent(ix, iy)) 
+           binContent = fHighEmcHistoH2F->GetBinContent(ix, iy)/fCalibRefHistoH2F->GetBinContent(ix, iy);
+         th2DRatioAmp->SetBinContent(ix, iy, binContent);
+         thRatioDist->Fill(binContent);
+       }
+      } 
+      //
+      //Now for LED monitor system, to calculate the ratio as well
+      Double_t binError = 0. ;
+      // for the binError, we add the relative errors, squared
+      Double_t relativeErrorSqr = 0. ;
+      //
+      for(int ib = 1; ib <= fLEDMonRefHistoPro->GetNbinsX(); ib++) {
+       //
+       if(fLEDMonRefHistoPro->GetBinContent(ib) != 0) {
+         binContent = hSigLGLEDMon->GetBinContent(ib) / fLEDMonRefHistoPro->GetBinContent(ib);
+         relativeErrorSqr = TMath::Power( (fLEDMonRefHistoPro->GetBinError(ib) / fLEDMonRefHistoPro->GetBinContent(ib)), 2);
+         if( hSigLGLEDMon->GetBinContent(ib) != 0) {
+           relativeErrorSqr += TMath::Power( (hSigLGLEDMon->GetBinError(ib)/hSigLGLEDMon->GetBinContent(ib)), 2);
+         }
+       }
+       else {
+         binContent = 0;
+         relativeErrorSqr = 0;
+       }
+       hSigLGLEDMon->SetBinContent(ib, binContent);
+       
+       binError = sqrt(relativeErrorSqr) * binContent;
+       thLEDMonRatio->SetBinError(ib, binError);
+       thLEDMonRatioDist->Fill(thLEDMonRatio->GetBinContent(ib));
       }
-    } 
-   
-               //Now for LED monitor system, to calculate the ratio as well
-               Double_t binError = 0. ;
-               // for the binError, we add the relative errors, squared
-               Double_t relativeErrorSqr = 0. ;
-  
-               for(int ib = 1; ib <= fLEDMonRefHistoPro->GetNbinsX(); ib++) {
-    
-                       if(fLEDMonRefHistoPro->GetBinContent(ib) != 0) {
-                               binContent = GetRawsData(kSigLGLEDMon)->GetBinContent(ib) / fLEDMonRefHistoPro->GetBinContent(ib);
-
-                               relativeErrorSqr = TMath::Power( (fLEDMonRefHistoPro->GetBinError(ib) / fLEDMonRefHistoPro->GetBinContent(ib)), 2);
-                               if(GetRawsData(kSigLGLEDMon)->GetBinContent(ib) != 0) {
-                       relativeErrorSqr += TMath::Power( (GetRawsData(kSigLGLEDMon)->GetBinError(ib)/GetRawsData(kSigLGLEDMon)->GetBinContent(ib)), 2);
-                               }
-                       }
-                       else {
-                               binContent = 0;
-                               relativeErrorSqr = 0;
-                       }
-                       GetRawsData(kLEDMonRatio)->SetBinContent(ib, binContent);
-    
-                       binError = sqrt(relativeErrorSqr) * binContent;
-                       GetRawsData(kLEDMonRatio)->SetBinError(ib, binError);
-                       GetRawsData(kLEDMonRatioDist)->Fill(GetRawsData(kLEDMonRatio)->GetBinContent(ib));
-               }
-  
-       } 
+    } // loop over eventual trigger clones
+  } 
   // let's also fill the SM and event counter histograms
   Int_t nTotalHG = 0;
   Int_t nTotalLG = 0;
@@ -799,24 +821,25 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
     nTotalTRU += nTotalSMTRU[iSM]; 
     nTotalLGLEDMon += nTotalSMLGLEDMon[iSM]; 
     nTotalHGLEDMon += nTotalSMHGLEDMon[iSM]; 
-    GetRawsData(kNsmodLG)->Fill(iSM, nTotalSMLG[iSM]); 
-    GetRawsData(kNsmodHG)->Fill(iSM, nTotalSMHG[iSM]); 
-    GetRawsData(kNsmodTRU)->Fill(iSM, nTotalSMTRU[iSM]); 
-    GetRawsData(kNsmodLGLEDMon)->Fill(iSM, nTotalSMLGLEDMon[iSM]); 
-    GetRawsData(kNsmodHGLEDMon)->Fill(iSM, nTotalSMHGLEDMon[iSM]); 
+    FillRawsData(kNsmodLG,iSM, nTotalSMLG[iSM]); 
+    FillRawsData(kNsmodHG,iSM, nTotalSMHG[iSM]); 
+    FillRawsData(kNsmodTRU,iSM, nTotalSMTRU[iSM]); 
+    FillRawsData(kNsmodLGLEDMon,iSM, nTotalSMLGLEDMon[iSM]); 
+    FillRawsData(kNsmodHGLEDMon,iSM, nTotalSMHGLEDMon[iSM]); 
   }
-  
-  GetRawsData(kNtotLG)->Fill(nTotalLG);
-  GetRawsData(kNtotHG)->Fill(nTotalHG);
-  GetRawsData(kNtotTRU)->Fill(nTotalTRU);
-  GetRawsData(kNtotLGLEDMon)->Fill(nTotalLGLEDMon);
-  GetRawsData(kNtotHGLEDMon)->Fill(nTotalHGLEDMon);
  
-
+  FillRawsData(kNtotLG,nTotalLG);
+  FillRawsData(kNtotHG,nTotalHG);
+  FillRawsData(kNtotTRU,nTotalTRU);
+  FillRawsData(kNtotLGLEDMon,nTotalLGLEDMon);
+  FillRawsData(kNtotHGLEDMon,nTotalHGLEDMon);
+  IncEvCountCycleESDs();
+  IncEvCountTotalESDs();
   SetEventSpecie(saveSpecie) ; 
   // just in case the next rawreader consumer forgets to reset; let's do it here again..
   rawReader->Reset() ;
-
+  
   return;
 }
 
@@ -824,34 +847,35 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader)
 void AliEMCALQADataMakerRec::MakeDigits()
 {
   // makes data from Digits
-
-  GetDigitsData(1)->Fill(fDigitsArray->GetEntriesFast()) ; 
+  FillDigitsData(1,fDigitsArray->GetEntriesFast()) ; 
   TIter next(fDigitsArray) ; 
   AliEMCALDigit * digit ; 
   while ( (digit = dynamic_cast<AliEMCALDigit *>(next())) ) {
-    GetDigitsData(0)->Fill( digit->GetAmplitude()) ;
+    FillDigitsData(0, digit->GetAmplitude()) ;
   }  
-  
+  //
 }
 
 //____________________________________________________________________________
 void AliEMCALQADataMakerRec::MakeDigits(TTree * digitTree)
 {
   // makes data from Digit Tree
+  // RS: Attention: the counters are increments in the MakeDigits()
   if (fDigitsArray) 
     fDigitsArray->Clear("C") ; 
   else
     fDigitsArray = new TClonesArray("AliEMCALDigit", 1000) ; 
   
   TBranch * branch = digitTree->GetBranch("EMCAL") ;
-  if ( ! branch ) {
-    AliWarning("EMCAL branch in Digit Tree not found") ; 
-  } else {
-    branch->SetAddress(&fDigitsArray) ;
-    branch->GetEntry(0) ; 
-    MakeDigits() ; 
-  }
-  
+  if ( ! branch ) { AliWarning("EMCAL branch in Digit Tree not found"); return; }
+  //
+  branch->SetAddress(&fDigitsArray) ;
+  branch->GetEntry(0) ; 
+  MakeDigits() ; 
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();  
+  //  
 }
 
 //____________________________________________________________________________
@@ -868,16 +892,17 @@ void AliEMCALQADataMakerRec::MakeRecPoints(TTree * clustersTree)
   emcbranch->SetAddress(&emcRecPoints);
   emcbranch->GetEntry(0);
   
-  GetRecPointsData(kRecPM)->Fill(emcRecPoints->GetEntriesFast()) ; 
+  FillRecPointsData(kRecPM,emcRecPoints->GetEntriesFast()) ; 
   TIter next(emcRecPoints) ; 
   AliEMCALRecPoint * rp ; 
   while ( (rp = dynamic_cast<AliEMCALRecPoint *>(next())) ) {
-    GetRecPointsData(kRecPE)->Fill(rp->GetEnergy()) ;
-    GetRecPointsData(kRecPDigM)->Fill(rp->GetMultiplicity());
+    FillRecPointsData(kRecPE,rp->GetEnergy()) ;
+    FillRecPointsData(kRecPDigM,rp->GetMultiplicity());
   }
   emcRecPoints->Delete();
   delete emcRecPoints;
-  
+  IncEvCountCycleRecPoints();
+  IncEvCountTotalRecPoints();
 }
 
 //____________________________________________________________________________ 
index b9e120f..467471a 100644 (file)
@@ -72,6 +72,7 @@ void AliEMCALQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA
 {
   //Detector specific actions at end of cycle
   // do the QA checking
+  ResetEventTrigClasses(); // reset triggers list to select all histos
   AliQAChecker::Instance()->Run(AliQAv1::kEMCAL, task, list) ;  
 }
 
@@ -88,6 +89,8 @@ void AliEMCALQADataMakerSim::InitHits()
   TH1I * h1  = new TH1I("hEmcalHitsMul", "Hits multiplicity distribution in EMCAL;# of Hits;Entries", 1000, 0, 10000) ; 
   h1->Sumw2() ;
   Add2HitsList(h1, 1, !expert, image) ;
+  //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -103,6 +106,8 @@ void AliEMCALQADataMakerSim::InitDigits()
   TH1I * h1 = new TH1I("hEmcalDigitsMul", "Digits multiplicity distribution in EMCAL;# of Digits;Entries", 200, 0, 2000) ; 
   h1->Sumw2() ;
   Add2DigitsList(h1, 1, !expert, image) ;
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -118,6 +123,8 @@ void AliEMCALQADataMakerSim::InitSDigits()
   TH1I * h1 = new TH1I("hEmcalSDigitsMul", "SDigits multiplicity distribution in EMCAL;# of SDigits;Entries", 500, 0,  5000) ; 
   h1->Sumw2() ;
   Add2SDigitsList(h1, 1, !expert, image) ;
+  //
+  ClonePerTrigClass(AliQAv1::kSDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________
@@ -125,70 +132,69 @@ void AliEMCALQADataMakerSim::MakeHits()
 {
   //make QA data from Hits
  
-  GetHitsData(1)->Fill(fHitsArray->GetEntriesFast()) ; 
+  FillHitsData(1,fHitsArray->GetEntriesFast()) ; 
   TIter next(fHitsArray) ; 
   AliEMCALHit * hit ; 
   while ( (hit = dynamic_cast<AliEMCALHit *>(next())) ) {
-    GetHitsData(0)->Fill( hit->GetEnergy()) ;
+    FillHitsData(0, hit->GetEnergy()) ;
   }
-
 }
 
 //____________________________________________________________________________
 void AliEMCALQADataMakerSim::MakeHits(TTree * hitTree)
 {
   // make QA data from Hit Tree
-  
   if (fHitsArray) 
     fHitsArray->Clear() ; 
   else
     fHitsArray = new TClonesArray("AliEMCALHit", 1000);
   
   TBranch * branch = hitTree->GetBranch("EMCAL") ;
-  if ( ! branch ) {
-    AliWarning("EMCAL branch in Hit Tree not found") ; 
-  } else {
-    branch->SetAddress(&fHitsArray) ;
-    for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
-      branch->GetEntry(ientry) ; 
-      MakeHits() ; 
-      fHitsArray->Clear() ; 
-    }
+  if ( ! branch ) { AliWarning("EMCAL branch in Hit Tree not found") ; return;}
+  //
+  branch->SetAddress(&fHitsArray) ;
+  for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
+    branch->GetEntry(ientry) ; 
+    MakeHits() ; 
+    fHitsArray->Clear() ; 
   }
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
+  //
 }
 
 //____________________________________________________________________________
 void AliEMCALQADataMakerSim::MakeDigits()
 {
   // makes data from Digits
-  GetDigitsData(1)->Fill(fDigitsArray->GetEntriesFast()) ; 
+
+  FillDigitsData(1,fDigitsArray->GetEntriesFast()) ; 
   TIter next(fDigitsArray) ; 
   AliEMCALDigit * digit ; 
   while ( (digit = dynamic_cast<AliEMCALDigit *>(next())) ) {
-    GetDigitsData(0)->Fill( digit->GetAmp()) ;
+    FillDigitsData(0, digit->GetAmp()) ;
   }  
-
 }
 
 //____________________________________________________________________________
 void AliEMCALQADataMakerSim::MakeDigits(TTree * digitTree)
 {
   // makes data from Digit Tree
+
   if (fDigitsArray) 
     fDigitsArray->Clear("C") ; 
   else
     fDigitsArray = new TClonesArray("AliEMCALDigit", 1000) ; 
   
   TBranch * branch = digitTree->GetBranch("EMCAL") ;
-  if ( ! branch ) {
-    AliWarning("EMCAL branch in Digit Tree not found") ; 
-  } else {
-    branch->SetAddress(&fDigitsArray) ;
-    branch->GetEntry(0) ; 
-    MakeDigits() ; 
-  }
-
+  if ( ! branch ) { AliWarning("EMCAL branch in Digit Tree not found") ; return; }
+  //
+  branch->SetAddress(&fDigitsArray) ;
+  branch->GetEntry(0) ; 
+  MakeDigits() ; 
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
 }
 
 //____________________________________________________________________________
@@ -200,13 +206,12 @@ void AliEMCALQADataMakerSim::MakeSDigits()
 
   AliEMCALSDigitizer* sDigitizer = new AliEMCALSDigitizer();
 
-  GetSDigitsData(1)->Fill(fSDigitsArray->GetEntriesFast()) ; 
+  FillSDigitsData(1,fSDigitsArray->GetEntriesFast()) ; 
   TIter next(fSDigitsArray) ; 
   AliEMCALDigit * sdigit ; 
   while ( (sdigit = dynamic_cast<AliEMCALDigit *>(next())) ) {
-    GetSDigitsData(0)->Fill( sDigitizer->Calibrate(sdigit->GetAmp())) ;
+    FillSDigitsData(0, sDigitizer->Calibrate(sdigit->GetAmp())) ;
   } 
-
   delete sDigitizer;
 }
 
@@ -220,14 +225,15 @@ void AliEMCALQADataMakerSim::MakeSDigits(TTree * sdigitTree)
     fSDigitsArray = new TClonesArray("AliEMCALDigit", 1000) ; 
   
   TBranch * branch = sdigitTree->GetBranch("EMCAL") ;
-  if ( ! branch ) {
-    AliWarning("EMCAL branch in SDigit Tree not found") ; 
-  } else {
-    branch->SetAddress(&fSDigitsArray) ;
-    branch->GetEntry(0) ;
-    MakeSDigits() ; 
-  }
-
+  if ( ! branch ) { AliWarning("EMCAL branch in SDigit Tree not found"); return;}
+  //
+  branch->SetAddress(&fSDigitsArray);
+  branch->GetEntry(0);
+  MakeSDigits(); 
+  //
+  IncEvCountCycleSDigits();
+  IncEvCountTotalSDigits();
+  //
 }
 
 //____________________________________________________________________________ 
index 3f63e8e..6f6ae2c 100644 (file)
@@ -108,6 +108,7 @@ AliFMDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task,
 {
   // Detector specific actions at end of cycle
   // do the QA checking
+  ResetEventTrigClasses(); // reset triggers list to select all histos
   AliLog::Message(5,"FMD: end of detector cycle",
                  "AliFMDQADataMakerRec","AliFMDQADataMakerRec",
                  "AliFMDQADataMakerRec::EndOfDetectorCycle",
@@ -179,7 +180,7 @@ void AliFMDQADataMakerRec::InitESDs()
   
   TH1* hist = MakeELossHist();
   Add2ESDsList(hist, 0, !expert, image);
-    
+  ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line    
 }
 
 //_____________________________________________________________________
@@ -191,9 +192,9 @@ void AliFMDQADataMakerRec::InitDigits()
   
   TH1* hist = MakeADCHist();
   Add2DigitsList(hist, 0, !expert, image);
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
-
 //_____________________________________________________________________ 
 void AliFMDQADataMakerRec::InitRecPoints()
 {
@@ -203,6 +204,7 @@ void AliFMDQADataMakerRec::InitRecPoints()
 
   TH1* hist = MakeELossHist();
   Add2RecPointsList(hist,0, !expert, image);
+  ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last linea
 }
 
 //_____________________________________________________________________ 
@@ -247,6 +249,8 @@ void AliFMDQADataMakerRec::InitRaws()
       }
     }
   }
+  //
+  ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
 }
 
 #if 0
@@ -260,7 +264,7 @@ struct FillESDHist : public AliESDFMD::ForOne
     // Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
     if(m == AliESDFMD::kInvalidMult) return true;
     
-    fM->GetESDsData(0)->Fill(m);    
+    fM->FillESDsData(0,m);
     return true;
   }
   AliFMDQADataMakerRec* fM;
@@ -304,12 +308,14 @@ void AliFMDQADataMakerRec::MakeESDs(AliESDEvent * esd)
          Float_t mult = fmd->Multiplicity(det,ring,sec,strip);
          if(mult == AliESDFMD::kInvalidMult) continue;
          
-         GetESDsData(0)->Fill(mult);
+         FillESDsData(0,mult);
        }
       }
     }
   }
 #endif
+  IncEvCountCycleESDs();
+  IncEvCountTotalESDs();
 }
 
 
@@ -325,7 +331,7 @@ void AliFMDQADataMakerRec::MakeDigits()
   for(Int_t i=0;i<fDigitsArray->GetEntriesFast();i++) {
     //Raw ADC counts
     AliFMDDigit* digit = static_cast<AliFMDDigit*>(fDigitsArray->At(i));
-    GetDigitsData(0)->Fill(digit->Counts());
+    FillDigitsData(0,digit->Counts());
   }
 }
 
@@ -338,7 +344,6 @@ void AliFMDQADataMakerRec::MakeDigits(TTree * digitTree)
   // Parameters:
   //    digitTree Tree of digits
   //
-  
   if (fDigitsArray) 
     fDigitsArray->Clear();
   else 
@@ -352,6 +357,9 @@ void AliFMDQADataMakerRec::MakeDigits(TTree * digitTree)
   branch->SetAddress(&fDigitsArray);
   branch->GetEntry(0); 
   MakeDigits();
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
 }
 
 //_____________________________________________________________________
@@ -388,15 +396,18 @@ void AliFMDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
     Short_t           board = pars->GetAltroMap()->Sector2Board(ring, sec);
     
     Int_t index1 = GetHalfringIndex(det, ring, 0, 1);
+    FillRawsData(index1,digit->Counts());
     Int_t index2 = GetHalfringIndex(det, ring, board/16,0);
-    // AliInfo(Form("FMD%d%c[0x%02x]->%2d,%2d", 
-    //              det, ring, board, index1, index2));
-    GetRawsData(index1)->Fill(digit->Counts());
-    GetRawsData(index2)->Fill(digit->Counts()); 
+    FillRawsData(index2,digit->Counts());
+    
   }
-  GetRawsData(1)->Fill(1, fmdReader.GetNErrors(0));
-  GetRawsData(1)->Fill(2, fmdReader.GetNErrors(1));
-  GetRawsData(1)->Fill(3, fmdReader.GetNErrors(2));
+  //
+  FillRawsData(1,1, fmdReader.GetNErrors(0));
+  FillRawsData(1,2, fmdReader.GetNErrors(1));
+  FillRawsData(1,3, fmdReader.GetNErrors(2));
+  //
+  IncEvCountCycleRaws();
+  IncEvCountTotalRaws();
 }
 
 //_____________________________________________________________________
@@ -419,11 +430,11 @@ void AliFMDQADataMakerRec::MakeRecPoints(TTree* clustersTree)
   TIter next(RecPointsAddress) ; 
   AliFMDRecPoint * rp ; 
   while ((rp = static_cast<AliFMDRecPoint*>(next()))) {
-    
-    GetRecPointsData(0)->Fill(rp->Edep()/pars->GetEdepMip()) ;
-  
+    FillRecPointsData(0,rp->Edep()/pars->GetEdepMip());
   }
-
+  IncEvCountCycleRecPoints();
+  IncEvCountTotalRecPoints();
+  //
 }
 
 //_____________________________________________________________________ 
index 250e3f1..9f69ff5 100644 (file)
@@ -82,6 +82,7 @@ void AliFMDQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task,
 {
   //Detector specific actions at end of cycle
   // do the QA checking
+  ResetEventTrigClasses(); // reset triggers list to select all histos
   AliLog::Message(5,"FMD: end of detector cycle",
                  "AliFMDQADataMakerSim","AliFMDQADataMakerSim",
                  "AliFMDQADataMakerSim::EndOfDetectorCycle",
@@ -101,6 +102,8 @@ void AliFMDQADataMakerSim::InitSDigits()
                              1024,0,1024);
   hADCCounts->SetXTitle("ADC counts");
   Add2SDigitsList(hADCCounts, 0, !expert, image);
+  //
+  ClonePerTrigClass(AliQAv1::kSDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________ 
@@ -116,6 +119,8 @@ void AliFMDQADataMakerSim::InitHits()
   hEnergyOfHits->SetXTitle("Edep");
   hEnergyOfHits->SetYTitle("Counts");
   Add2HitsList(hEnergyOfHits, 0, !expert, image);
+  //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
 }
 
 //_____________________________________________________________________
@@ -130,6 +135,8 @@ void AliFMDQADataMakerSim::InitDigits()
                              1024,0,1024);
   hADCCounts->SetXTitle("ADC counts");
   Add2DigitsList(hADCCounts, 0, !expert, image);
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //_____________________________________________________________________
@@ -141,8 +148,8 @@ void AliFMDQADataMakerSim::MakeHits()
 
   TIter next(fHitsArray);
   AliFMDHit * hit;
-  while ((hit = static_cast<AliFMDHit *>(next()))) 
-    GetHitsData(0)->Fill(hit->Edep()/hit->Length()*0.032);
+  while ((hit = static_cast<AliFMDHit *>(next()))) FillHitsData(0,hit->Edep()/hit->Length()*0.032);
+  //
 }
 
 //_____________________________________________________________________
@@ -164,12 +171,16 @@ void AliFMDQADataMakerSim::MakeHits(TTree * hitTree)
   }
     
   branch->SetAddress(&fHitsArray) ;
-  
+  //  
   for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
     branch->GetEntry(ientry);
     MakeHits();   //tmp); 
     fHitsArray->Clear() ; 
-  }    
+  } 
+  //
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
+  //   
 }
 
 //_____________________________________________________________________
@@ -184,8 +195,9 @@ void AliFMDQADataMakerSim::MakeDigits()
   for(Int_t i = 0 ; i < fDigitsArray->GetEntriesFast() ; i++) {
     //Raw ADC counts
     AliFMDDigit* digit = static_cast<AliFMDDigit*>(fDigitsArray->At(i));
-    GetDigitsData(0)->Fill(digit->Counts());
+    FillDigitsData(0,digit->Counts());
   }
+  //
 }
 
 //_____________________________________________________________________
@@ -195,6 +207,7 @@ void AliFMDQADataMakerSim::MakeDigits(TTree * digitTree)
   // 
   // Parameters: 
   //    digitTree    Tree holding digits. 
+  // RS: counters are incremented in MakeDigits()
   
   if (!fDigitsArray) 
     fDigitsArray = new TClonesArray("AliFMDDigit", 1000) ; 
@@ -211,6 +224,10 @@ void AliFMDQADataMakerSim::MakeDigits(TTree * digitTree)
 
   branch->GetEntry(0) ; 
   MakeDigits() ; 
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+  //
 }
 
 //_____________________________________________________________________
@@ -222,11 +239,12 @@ void AliFMDQADataMakerSim::MakeSDigits()
   //   none 
   if(!fSDigitsArray) return;
   
-   for(Int_t i = 0 ; i < fSDigitsArray->GetEntriesFast() ; i++) {
+  for(Int_t i = 0 ; i < fSDigitsArray->GetEntriesFast() ; i++) {
     //Raw ADC counts
     AliFMDSDigit* sdigit = static_cast<AliFMDSDigit*>(fSDigitsArray->At(i));
-    GetSDigitsData(0)->Fill(sdigit->Counts());
+    FillSDigitsData(0,sdigit->Counts());
   }
+  //
 }
 
 //_____________________________________________________________________
@@ -236,7 +254,7 @@ void AliFMDQADataMakerSim::MakeSDigits(TTree * sdigitTree)
   // 
   // Parameters: 
   //    digitTree    Tree holding digits. 
-  
+  //
   if (!fSDigitsArray) 
     fSDigitsArray = new TClonesArray("AliFMDSDigit", 1000) ; 
   fSDigitsArray->Clear() ;
@@ -249,6 +267,10 @@ void AliFMDQADataMakerSim::MakeSDigits(TTree * sdigitTree)
   branch->SetAddress(&fSDigitsArray) ;
   branch->GetEntry(0) ; 
   MakeSDigits() ; 
+  //
+  IncEvCountCycleSDigits();
+  IncEvCountTotalSDigits();
+  //
 }
 
 //_____________________________________________________________________ 
index 1b58f12..7b95bd1 100644 (file)
@@ -59,20 +59,27 @@ void AliHLTTPCQADataMaker::StartOfDetectorCycle()
 void AliHLTTPCQADataMaker::EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray** /*list*/)
 {
   // see header file for class documentation
-  
-  if(GetESDsData(kPHLT)->GetEntries()){
-    GetESDsData(kPRatio)->Sumw2();
-    GetESDsData(kPRatio)->Add(GetESDsData(kPOffline));
-    GetESDsData(kPRatio)->Divide(GetESDsData(kPHLT));
-  }
-  
-  if(GetESDsData(kPHLTFired)->GetEntries()){ 
-    GetESDsData(kPRatioFired)->Sumw2(); 
-    GetESDsData(kPRatioFired)->Add(GetESDsData(kPOfflineFired)); 
-    GetESDsData(kPRatioFired)->Divide(GetESDsData(kPHLTFired));
+  for (int itc=-1;itc=GetNTrigClasses();itc++) {
+    TH1* hp = GetESDsData(kPHLT,itc);
+    TH1* hr = GetESDsData(kPRatio,itc);
+    TH1* ho = GetESDsData(kPOffline,itc);
+    //
+    if (hp && hr && ho && hp->GetEntries()) {
+      hp->Sumw2();
+      hr->Add(ho);
+      hr->Divide(hp);
+    }
+    //
+    hp = GetESDsData(kPHLTFired,itc);
+    hr = GetESDsData(kPRatioFired,itc);
+    ho = GetESDsData(kPOfflineFired,itc);
+    //
+    if (hp && hr && ho && hp->GetEntries()) {
+      hp->Sumw2();
+      hr->Add(ho);
+      hr->Divide(hp);
+    }
   } 
-  
-
 }
 
 void AliHLTTPCQADataMaker::MakeRaws(AliRawReader * rawReader)
@@ -275,28 +282,28 @@ void AliHLTTPCQADataMaker::MakeESDs(AliESDEvent * esd, AliESDEvent* hltesd)
 
   const Int_t nESDTracks = esd->GetNumberOfTracks();
   const Int_t nHLTesdTracks = hltesd->GetNumberOfTracks();
-  GetESDsData(kMultiplicity)->Fill(nESDTracks, nHLTesdTracks);
+  FillESDsData(kMultiplicity,nESDTracks, nHLTesdTracks);
 
   Int_t nClsHLT = 0;
   Int_t nClsOffline = 0;
   
   for(Int_t i = 0; i < nESDTracks; i++){
     AliESDtrack *  esdTrk = esd->GetTrack(i);
-    GetESDsData(kPOffline)->Fill(esdTrk->P());
-    GetESDsData(kPtOffline)->Fill(esdTrk->GetSignedPt());
-    GetESDsData(kNClsPerTrkOffline)->Fill(esdTrk->GetTPCNcls());
-    GetESDsData(kPhiOffline)->Fill(esdTrk->Phi()*TMath::RadToDeg());
-    GetESDsData(kEtaOffline)->Fill(esdTrk->Eta());
+    FillESDsData(kPOffline,esdTrk->P());
+    FillESDsData(kPtOffline,esdTrk->GetSignedPt());
+    FillESDsData(kNClsPerTrkOffline,esdTrk->GetTPCNcls());
+    FillESDsData(kPhiOffline,esdTrk->Phi()*TMath::RadToDeg());
+    FillESDsData(kEtaOffline,esdTrk->Eta());
     nClsOffline+=esdTrk->GetTPCNcls();
   }
 
   for(Int_t i = 0; i < nHLTesdTracks; i++){ 
     AliESDtrack *  hltEsdTrk = hltesd->GetTrack(i); 
-    GetESDsData(kPHLT)->Fill(hltEsdTrk->P()); 
-    GetESDsData(kPtHLT)->Fill(hltEsdTrk->GetSignedPt());
-    GetESDsData(kNClsPerTrkHLT)->Fill(hltEsdTrk->GetTPCNcls());
-    GetESDsData(kPhiHLT)->Fill(hltEsdTrk->Phi()*TMath::RadToDeg());
-    GetESDsData(kEtaHLT)->Fill(hltEsdTrk->Eta());
+    FillESDsData(kPHLT,hltEsdTrk->P()); 
+    FillESDsData(kPtHLT,hltEsdTrk->GetSignedPt());
+    FillESDsData(kNClsPerTrkHLT,hltEsdTrk->GetTPCNcls());
+    FillESDsData(kPhiHLT,hltEsdTrk->Phi()*TMath::RadToDeg());
+    FillESDsData(kEtaHLT,hltEsdTrk->Eta());
     nClsHLT += hltEsdTrk->GetTPCNcls();
   } 
   
@@ -305,29 +312,29 @@ void AliHLTTPCQADataMaker::MakeESDs(AliESDEvent * esd, AliESDEvent* hltesd)
   if(nHLTesdTracks)
     nClsHLT /= nHLTesdTracks;
 
-  GetESDsData(kNCls)->Fill(nClsOffline, nClsHLT);
+  FillESDsData(kNCls,nClsOffline, nClsHLT);
 
 
   if(hltesd->IsHLTTriggerFired()){
-    GetESDsData(kMultiplicityFired)->Fill(nESDTracks, nHLTesdTracks);
-    GetESDsData(kNClsFired)->Fill(nClsOffline, nClsHLT);
+    FillESDsData(kMultiplicityFired,nESDTracks, nHLTesdTracks);
+    FillESDsData(kNClsFired,nClsOffline, nClsHLT);
     
     for(Int_t i = 0; i < nESDTracks; i++){ 
       AliESDtrack *  esdTrk = esd->GetTrack(i); 
-      GetESDsData(kPOfflineFired)->Fill(esdTrk->P()); 
-      GetESDsData(kPtOfflineFired)->Fill(esdTrk->GetSignedPt());
-      GetESDsData(kNClsPerTrkOfflineFired)->Fill(esdTrk->GetTPCNcls());
-      GetESDsData(kPhiOfflineFired)->Fill(esdTrk->Phi()*TMath::RadToDeg());
-      GetESDsData(kEtaOfflineFired)->Fill(esdTrk->Eta());
+      FillESDsData(kPOfflineFired,esdTrk->P()); 
+      FillESDsData(kPtOfflineFired,esdTrk->GetSignedPt());
+      FillESDsData(kNClsPerTrkOfflineFired,esdTrk->GetTPCNcls());
+      FillESDsData(kPhiOfflineFired,esdTrk->Phi()*TMath::RadToDeg());
+      FillESDsData(kEtaOfflineFired,esdTrk->Eta());
     } 
    
     for(Int_t i = 0; i < nHLTesdTracks; i++){  
       AliESDtrack *  hltEsdTrk = hltesd->GetTrack(i);  
-      GetESDsData(kPHLTFired)->Fill(hltEsdTrk->P());  
-      GetESDsData(kPtHLTFired)->Fill(hltEsdTrk->GetSignedPt());
-      GetESDsData(kNClsPerTrkHLTFired)->Fill(hltEsdTrk->GetTPCNcls());
-      GetESDsData(kPhiHLTFired)->Fill(hltEsdTrk->Phi()*TMath::RadToDeg());
-      GetESDsData(kEtaHLTFired)->Fill(hltEsdTrk->Eta());
+      FillESDsData(kPHLTFired,hltEsdTrk->P());  
+      FillESDsData(kPtHLTFired,hltEsdTrk->GetSignedPt());
+      FillESDsData(kNClsPerTrkHLTFired,hltEsdTrk->GetTPCNcls());
+      FillESDsData(kPhiHLTFired,hltEsdTrk->Phi()*TMath::RadToDeg());
+      FillESDsData(kEtaHLTFired,hltEsdTrk->Eta());
     }  
 
     
index a50547e..6ac16a8 100644 (file)
@@ -68,41 +68,45 @@ AliHMPIDQADataMaker& AliHMPIDQADataMaker::operator = (const AliHMPIDQADataMaker&
 void AliHMPIDQADataMaker::InitHits()
 {
   // create Hits histograms in Hits subdir
-     TH1F *hHitQdc=new TH1F("HitQdc","HMPID Hit Qdc all chamber;QDC",500,0,4000);
-     Add2HitsList(hHitQdc,0);
-     TH2F *hHitMap[7];
-     for(Int_t iCh=0;iCh<7;iCh++) {
-     hHitMap[iCh]=new TH2F(Form("HMPID HitMap%i",iCh),Form("Ch%i;x_{Hit};y_{Hit}",iCh),162,-1,161,146,-1,145);   
+  TH1F *hHitQdc=new TH1F("HitQdc","HMPID Hit Qdc all chamber;QDC",500,0,4000);
+  Add2HitsList(hHitQdc,0);
+  TH2F *hHitMap[7];
+  for(Int_t iCh=0;iCh<7;iCh++) {
+    hHitMap[iCh]=new TH2F(Form("HMPID HitMap%i",iCh),Form("Ch%i;x_{Hit};y_{Hit}",iCh),162,-1,161,146,-1,145);   
     Add2HitsList(hHitMap[iCh],iCh+1);
-    }
-
+  }
+  //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line  
 }
 
 //____________________________________________________________________________ 
 void AliHMPIDQADataMaker::InitDigits()
 {
   // create Digits histograms in Digits subdir
-      TH1F *hDigPcEvt = new TH1F("hDigPcEvt","PC occupancy",156,-1,77);
-      TH1F *hDigQ     = new TH1F("Q        ","Charge of digits (ADC)     ",3000,0,3000);
-      TH1F *hDigChEvt = new TH1F("hDigChEvt","Chamber occupancy per event",AliHMPIDParam::kMaxCh+1,AliHMPIDParam::kMinCh,AliHMPIDParam::kMaxCh+1);
-
-      TProfile *tDigHighQ = new TProfile("tDigHighQ","Highest charge in chamber  ",AliHMPIDParam::kMaxCh+1,AliHMPIDParam::kMinCh,AliHMPIDParam::kMaxCh+1);
-      TProfile *tDigChEvt = new TProfile("tDigChEvt","Chamber occupancy per event (profile)",AliHMPIDParam::kMaxCh+1,AliHMPIDParam::kMinCh,AliHMPIDParam::kMaxCh+1);
-
-Add2DigitsList(hDigPcEvt,0);
-Add2DigitsList(hDigQ    ,1);
-Add2DigitsList(hDigChEvt,2);
-Add2DigitsList(tDigHighQ,3);
-Add2DigitsList(tDigChEvt,4);
+  TH1F *hDigPcEvt = new TH1F("hDigPcEvt","PC occupancy",156,-1,77);
+  TH1F *hDigQ     = new TH1F("Q        ","Charge of digits (ADC)     ",3000,0,3000);
+  TH1F *hDigChEvt = new TH1F("hDigChEvt","Chamber occupancy per event",AliHMPIDParam::kMaxCh+1,AliHMPIDParam::kMinCh,AliHMPIDParam::kMaxCh+1);
+  
+  TProfile *tDigHighQ = new TProfile("tDigHighQ","Highest charge in chamber  ",AliHMPIDParam::kMaxCh+1,AliHMPIDParam::kMinCh,AliHMPIDParam::kMaxCh+1);
+  TProfile *tDigChEvt = new TProfile("tDigChEvt","Chamber occupancy per event (profile)",AliHMPIDParam::kMaxCh+1,AliHMPIDParam::kMinCh,AliHMPIDParam::kMaxCh+1);
+  
+  Add2DigitsList(hDigPcEvt,0);
+  Add2DigitsList(hDigQ    ,1);
+  Add2DigitsList(hDigChEvt,2);
+  Add2DigitsList(tDigHighQ,3);
+  Add2DigitsList(tDigChEvt,4);
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
 void AliHMPIDQADataMaker::InitSDigits()
 {
   // create SDigits histograms in SDigits subdir
-   TH1F   *hSDigits     = new TH1F("hHmpidSDigits",    "SDigits Q  distribution in HMPID",  500, 0., 5000.) ; 
-
-Add2SDigitsList(hSDigits,0);
+  TH1F   *hSDigits     = new TH1F("hHmpidSDigits",    "SDigits Q  distribution in HMPID",  500, 0., 5000.) ; 
+  Add2SDigitsList(hSDigits,0);
+  //
+  ClonePerTrigClass(AliQAv1::kSDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -122,14 +126,16 @@ void AliHMPIDQADataMaker::InitRecPoints()
   Add2RecPointsList(hCluFlg , 2);
   Add2RecPointsList(hCluSize, 3);
   Add2RecPointsList(hCluQ   , 4);
+  //
+  ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
 }
 //____________________________________________________________________________
 
 void AliHMPIDQADataMaker::InitRaws()
 {
-//
-// Booking QA histo for Raw data
-//
+  //
+  // Booking QA histo for Raw data
+  //
   TH1F *hqPad[14];
   for(Int_t iddl =0; iddl<14; iddl++) {
   hqPad[iddl] = new TH1F(Form("hqPadDDL%i",iddl), Form("Pad Q Entries at DDL %i",iddl), 500,0,5000);
@@ -147,7 +153,9 @@ void AliHMPIDQADataMaker::InitRaws()
   hSumErr->GetXaxis()->SetBinLabel((2*ilabel+1),Form("%i  %s",ilabel+1,hnames[ilabel]));
 
   }
-Add2RawsList(hSumErr,14);
+  Add2RawsList(hSumErr,14);
+  //
+  ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
 }
 
 //____________________________________________________________________________
@@ -155,22 +163,24 @@ void AliHMPIDQADataMaker::InitESDs()
 {
   //
   //Booking ESDs histograms
-   TH2F*  hCkovP  = new TH2F("CkovP" , "#theta_{c}, [rad];P, [GeV]"   , 150,      0,  7  ,100, 0, 1)   ;
-   TH2F*  hSigP   = new TH2F("SigP"  ,"#sigma_{#theta_c} [mrad];[GeV]", 150,      0,  7  ,100, 0, 1)   ;
-   TH2F*  hMipXY  = new TH2F("MipXY" ,"mip position"                  , 260,      0,130  ,252, 0,126)  ;
-   TH2F*  hDifXY  = new TH2F("DifXY" ,"diff"                          , 200,    -10, 10  ,200,-10,10)  ;
-   TH1F*  hPid[5];
-   hPid[0] = new TH1F("PidE" ,"electron response"              , 101, -0.005,1.005)             ;
-   hPid[1] = new TH1F("PidMu","#mu response"                   , 101, -0.005,1.005)             ;
-   hPid[2] = new TH1F("PidPi","#pi response"                   , 101, -0.005,1.005)             ;
-   hPid[3] = new TH1F("PidK" ,"K response"                     , 101, -0.005,1.005)             ;
-   hPid[4] = new TH1F("PidP" ,"p response"                         ,101, -0.005,1.005)             ;
-
-Add2ESDsList(hCkovP,0);
-Add2ESDsList(hSigP ,1);
-Add2ESDsList(hMipXY,2);
-Add2ESDsList(hDifXY,3);
-for(Int_t i=0; i< 5; i++) Add2ESDsList(hPid[i],i+4);
+  TH2F*  hCkovP  = new TH2F("CkovP" , "#theta_{c}, [rad];P, [GeV]"   , 150,      0,  7  ,100, 0, 1)   ;
+  TH2F*  hSigP   = new TH2F("SigP"  ,"#sigma_{#theta_c} [mrad];[GeV]", 150,      0,  7  ,100, 0, 1)   ;
+  TH2F*  hMipXY  = new TH2F("MipXY" ,"mip position"                  , 260,      0,130  ,252, 0,126)  ;
+  TH2F*  hDifXY  = new TH2F("DifXY" ,"diff"                          , 200,    -10, 10  ,200,-10,10)  ;
+  TH1F*  hPid[5];
+  hPid[0] = new TH1F("PidE" ,"electron response"              , 101, -0.005,1.005)             ;
+  hPid[1] = new TH1F("PidMu","#mu response"                   , 101, -0.005,1.005)             ;
+  hPid[2] = new TH1F("PidPi","#pi response"                   , 101, -0.005,1.005)             ;
+  hPid[3] = new TH1F("PidK" ,"K response"                     , 101, -0.005,1.005)             ;
+  hPid[4] = new TH1F("PidP" ,"p response"                         ,101, -0.005,1.005)             ;
+  
+  Add2ESDsList(hCkovP,0);
+  Add2ESDsList(hSigP ,1);
+  Add2ESDsList(hMipXY,2);
+  Add2ESDsList(hDifXY,3);
+  for(Int_t i=0; i< 5; i++) Add2ESDsList(hPid[i],i+4);
+  //
+  ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
 }
 //____________________________________________________________________________
 
@@ -186,11 +196,11 @@ void AliHMPIDQADataMaker::MakeHits(TClonesArray * data)
     TIter next(hits); 
     AliHMPIDHit * hit ; 
     while ( (hit = dynamic_cast<AliHMPIDHit *>(next())) ) {
-      if(hit->Pid()<500000) GetHitsData(0)->Fill(hit->Q()) ;
-      if(hit->Pid()<500000) GetHitsData(hit->Ch()+1)->Fill(hit->LorsX(),hit->LorsY());
+      if(hit->Pid()<500000) FillHitsData(0,hit->Q()) ;
+      if(hit->Pid()<500000) FillHitsData(hit->Ch()+1,hit->LorsX(),hit->LorsY());
     }
   } 
-
+  //
 }
 //___________________________________________________________________________
 void AliHMPIDQADataMaker::MakeHits(TTree * data)
@@ -203,7 +213,12 @@ void AliHMPIDQADataMaker::MakeHits(TTree * data)
     data->GetEntry(iEnt);
     MakeHits(pHits);
   }//entries loop
+  //
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
+  //
 }
+
 //____________________________________________________________________________
 void AliHMPIDQADataMaker::MakeDigits(TClonesArray * data)
 {
@@ -217,18 +232,17 @@ void AliHMPIDQADataMaker::MakeDigits(TClonesArray * data)
     for(Int_t i =0; i< chamber->GetEntries(); i++)
       {
        TClonesArray * digits = dynamic_cast<TClonesArray*>(chamber->At(i)); 
-       GetDigitsData(2)->Fill(i,digits->GetEntriesFast()/(48.*80.*6.));
-        GetDigitsData(4)->Fill(i,digits->GetEntriesFast()/(48.*80.*6.));
+       FillDigitsData(2,i,digits->GetEntriesFast()/(48.*80.*6.));
+        FillDigitsData(4,i,digits->GetEntriesFast()/(48.*80.*6.));
         Double_t highQ=0;
        TIter next(digits); 
        AliHMPIDDigit * digit; 
        while ( (digit = dynamic_cast<AliHMPIDDigit *>(next())) ) {
-         GetDigitsData(0)->Fill(10.*i+digit->Pc(),1./(48.*80.));
-         GetDigitsData(1)->Fill(digit->Q());
+         FillDigitsData(0,10.*i+digit->Pc(),1./(48.*80.));
+         FillDigitsData(1,digit->Q());
           if(digit->Q()>highQ) highQ = digit->Q();
        }  
-      GetDigitsData(3)->Fill(i,highQ);
+       FillDigitsData(3,i,highQ);      
       }
   }
 }
@@ -251,8 +265,13 @@ void AliHMPIDQADataMaker::MakeDigits(TTree * data)
   }
   data->GetEntry(0);
 
-   MakeDigits((TClonesArray *)pObjDig);
+  MakeDigits((TClonesArray *)pObjDig);
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+  //
 }
+
 //____________________________________________________________________________
 
 void AliHMPIDQADataMaker::MakeRaws(AliRawReader *rawReader)
@@ -263,15 +282,14 @@ void AliHMPIDQADataMaker::MakeRaws(AliRawReader *rawReader)
   for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
     AliHMPIDRawStream stream(rawReader);
     while(stream.Next())
-    {
-
+      {
       UInt_t ddl=stream.GetDDLNumber(); //returns 0,1,2 ... 13
       if((UInt_t)(2*iCh)==ddl || (UInt_t)(2*iCh+1)==ddl) {
        for(Int_t row = 1; row <= AliHMPIDRawStream::kNRows; row++){
         for(Int_t dil = 1; dil <= AliHMPIDRawStream::kNDILOGICAdd; dil++){
           for(Int_t pad = 0; pad < AliHMPIDRawStream::kNPadAdd; pad++){
             if(stream.GetCharge(ddl,row,dil,pad) < 1) continue;
-              GetRawsData(ddl)->Fill(stream.GetCharge(ddl,row,dil,pad));
+              FillRawsData(ddl,stream.GetCharge(ddl,row,dil,pad));
 //              Printf("charge %i",stream.GetCharge(ddl,row,dil,pad));
             }//pad
           }//dil
@@ -281,12 +299,16 @@ void AliHMPIDQADataMaker::MakeRaws(AliRawReader *rawReader)
     for(Int_t iErr =1; iErr<(Int_t)AliHMPIDRawStream::kSumErr; iErr++){
       Int_t errflag = stream.GetErrors(iErr);
 
-       if(errflag < 0) GetRawsData(14)->Fill((Int_t)AliHMPIDRawStream::kSumErr+0.5);
-       else if(errflag == 0) GetRawsData(14)->Fill((Int_t)AliHMPIDRawStream::kSumErr-0.5);
-       else GetRawsData(14)->Fill(iErr-0.5);
+       if(errflag < 0) FillRawsData(14,(Int_t)AliHMPIDRawStream::kSumErr+0.5);
+       else if(errflag == 0) FillRawsData(14,(Int_t)AliHMPIDRawStream::kSumErr-0.5);
+       else FillRawsData(14,iErr-0.5);
      }
     stream.Delete();
   }//chamber loop
+  //
+  IncEvCountCycleRaws();
+  IncEvCountTotalRaws();
+  //
 }
 
 //___________________________________________________________________________
@@ -303,17 +325,17 @@ void AliHMPIDQADataMaker::MakeSDigits(TClonesArray * data)
     TIter next(sdigits) ; 
     AliHMPIDDigit * sdigit ; 
     while ( (sdigit = dynamic_cast<AliHMPIDDigit *>(next())) ) {
-           GetSDigitsData(0)->Fill(sdigit->Q());
+           FillSDigitsData(0,sdigit->Q());
     } 
   }
 }
 //___________________________________________________________________________
 void AliHMPIDQADataMaker::MakeSDigits(TTree * data)
 {
- //
- // Opening the SDigit Tree
- //
- TClonesArray * sdigits = new TClonesArray("AliHMPIDDigit", 1000) ;
+  //
+  // Opening the SDigit Tree
+  //
+  TClonesArray * sdigits = new TClonesArray("AliHMPIDDigit", 1000) ;
 
   TBranch * branch = data->GetBranch("HMPID") ;
   if ( ! branch ) {
@@ -323,6 +345,10 @@ void AliHMPIDQADataMaker::MakeSDigits(TTree * data)
   branch->SetAddress(&sdigits) ;
   branch->GetEntry(0) ;
   MakeSDigits(sdigits) ;
+  //
+  IncEvCountCycleSDigits();
+  IncEvCountTotalSDigits();
+  //
 }
 //____________________________________________________________________________
 void AliHMPIDQADataMaker::MakeRecPoints(TTree * clustersTree)
@@ -336,19 +362,22 @@ void AliHMPIDQADataMaker::MakeRecPoints(TTree * clustersTree)
     branch->SetAddress(&clusters);
     branch->GetEntry(0);
 
-    GetRecPointsData(0)->Fill(i,clusters->GetEntries());
+    FillRecPointsData(0,i,clusters->GetEntries());
     TIter next(clusters);
     AliHMPIDCluster *clu;
     while ( (clu = dynamic_cast<AliHMPIDCluster *>(next())) ) {
-      GetRecPointsData(1)->Fill(clu->Chi2());
-      GetRecPointsData(2)->Fill(clu->Status());
-      GetRecPointsData(3)->Fill(clu->Size());
-      GetRecPointsData(4)->Fill(clu->Q()); 
+      FillRecPointsData(1,clu->Chi2());
+      FillRecPointsData(2,clu->Status());
+      FillRecPointsData(3,clu->Size());
+      FillRecPointsData(4,clu->Q()); 
     }
   }
 
   clusters->Delete();
   delete clusters;
+  IncEvCountCycleRecPoints();
+  IncEvCountTotalRecPoints();
+  //
 }
 
 //____________________________________________________________________________
@@ -359,19 +388,22 @@ void AliHMPIDQADataMaker::MakeESDs(AliESDEvent * esd)
   //
   for(Int_t iTrk = 0 ; iTrk < esd->GetNumberOfTracks() ; iTrk++){
     AliESDtrack *pTrk = esd->GetTrack(iTrk) ;
-    GetESDsData(0)->Fill(pTrk->GetP(),pTrk->GetHMPIDsignal());
-    GetESDsData(1)->Fill( pTrk->GetP(),TMath::Sqrt(pTrk->GetHMPIDchi2()));
+    FillESDsData(0,pTrk->GetP(),pTrk->GetHMPIDsignal());
+    FillESDsData(1, pTrk->GetP(),TMath::Sqrt(pTrk->GetHMPIDchi2()));
     Float_t xm,ym; Int_t q,np;  
     pTrk->GetHMPIDmip(xm,ym,q,np);                       //mip info
-    GetESDsData(2)->Fill(xm,ym);
+    FillESDsData(2,xm,ym);
     Float_t xRad,yRad,th,ph;        
     pTrk->GetHMPIDtrk(xRad,yRad,th,ph);              //track info at the middle of the radiator
     Float_t xPc = xRad+9.25*TMath::Tan(th)*TMath::Cos(ph); // temporar: linear extrapol (B=0!)
     Float_t yPc = yRad+9.25*TMath::Tan(th)*TMath::Sin(ph); // temporar:          "
-    GetESDsData(3)->Fill(xm-xPc,ym-yPc); //track info
+    FillESDsData(3,xm-xPc,ym-yPc); //track info
     Double_t pid[5] ;      pTrk->GetHMPIDpid(pid) ;
-    for(Int_t i = 0 ; i < 5 ; i++) GetESDsData(4+i)->Fill(pid[i]) ;
+    for(Int_t i = 0 ; i < 5 ; i++) FillESDsData(4+i,pid[i]) ;
   }
+  IncEvCountCycleESDs();
+  IncEvCountTotalESDs();
+  //
 }
 //____________________________________________________________________________
 void AliHMPIDQADataMaker::StartOfDetectorCycle()
index 57232d7..ec03b4e 100644 (file)
@@ -52,7 +52,7 @@ ClassImp(AliHMPIDQADataMakerRec)
            
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   AliHMPIDQADataMakerRec::AliHMPIDQADataMakerRec() : 
-  AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kHMPID), "HMPID Quality Assurance Data Maker"),fEvtRaw(0), fLineDdlDatSizeLow(0x0), fLineDdlDatSizeUp(0x0), fLineDdlPadOCcLow(0x0), fLineDdlPadOCcUp(0x0), fChannel(0) 
+  AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kHMPID), "HMPID Quality Assurance Data Maker"), fLineDdlDatSizeLow(0x0), fLineDdlDatSizeUp(0x0), fLineDdlPadOCcLow(0x0), fLineDdlPadOCcUp(0x0), fChannel(0) 
 {
   // ctor
   for(Int_t i=0; i<6; i++) fModline[i]=0x0;
@@ -60,7 +60,7 @@ ClassImp(AliHMPIDQADataMakerRec)
 
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 AliHMPIDQADataMakerRec::AliHMPIDQADataMakerRec(const AliHMPIDQADataMakerRec& qadm) :
-  AliQADataMakerRec(),fEvtRaw(qadm.fEvtRaw), fLineDdlDatSizeLow(qadm.fLineDdlDatSizeLow), fLineDdlDatSizeUp(qadm.fLineDdlDatSizeUp), fLineDdlPadOCcLow(qadm.fLineDdlPadOCcLow), fLineDdlPadOCcUp(qadm.fLineDdlPadOCcUp), fChannel(qadm.fChannel)
+  AliQADataMakerRec(),fLineDdlDatSizeLow(qadm.fLineDdlDatSizeLow), fLineDdlDatSizeUp(qadm.fLineDdlDatSizeUp), fLineDdlPadOCcLow(qadm.fLineDdlPadOCcLow), fLineDdlPadOCcUp(qadm.fLineDdlPadOCcUp), fChannel(qadm.fChannel)
 {
   //copy ctor 
   for(Int_t i=0; i<6; i++) fModline[i]=qadm.fModline[i];
@@ -99,6 +99,8 @@ void AliHMPIDQADataMakerRec::InitDigits()
   Add2DigitsList(hDigPcEvt,1,expert, !image);
   for(Int_t iMap=0; iMap < 7; iMap++) Add2DigitsList(hDigMap[iMap],2+iMap,expert, !image);
   for(Int_t iH =0; iH < 42 ; iH++) Add2DigitsList(hDigQ[iH]    ,9+iH,expert,!image);
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -133,7 +135,10 @@ void AliHMPIDQADataMakerRec::InitRecPoints()
       Add2RecPointsList(hCluQSect[iCh*6+iSect],2+14+42+iCh*6+iSect, !expert, image);
     }  
   }
+  //
+  ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
 }
+
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDQADataMakerRec::InitRaws()
 {
@@ -234,9 +239,9 @@ void AliHMPIDQADataMakerRec::InitRaws()
   for(Int_t iddl=0;iddl<14;iddl++)  fHmpPadOccPrf->GetXaxis()->SetBinLabel(iddl+1,Form("DDL_%d",1535+iddl+1));
   fHmpPadOccPrf->SetStats(0);fHmpPadOccPrf->SetMinimum(0);fHmpPadOccPrf->SetMarkerStyle(20);
   Add2RawsList(fHmpPadOccPrf,14+14+42+42+6,expert,!image,saveCorr);       //expert, no image
-
-  
   //___ for DQM shifter and eLogBook ___ stop
+  //
+  ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDQADataMakerRec::InitESDs()
@@ -262,6 +267,8 @@ void AliHMPIDQADataMakerRec::InitESDs()
   Add2ESDsList(hDifXY,2, !expert, image);
   Add2ESDsList(hMvsP,3, expert, !image);
   for(Int_t i=0; i< 5; i++) Add2ESDsList(hPid[i],i+4, expert, !image);
+  //
+  ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDQADataMakerRec::MakeRaws(AliRawReader *rawReader)
@@ -286,42 +293,47 @@ void AliHMPIDQADataMakerRec::MakeRaws(AliRawReader *rawReader)
        UInt_t ddl=stream.GetDDLNumber(); //returns 0,1,2 ... 13   
        if(ddl > 13) continue;
  
-     //  GetRawsData(14+14+42+42+1)->Fill(ddl+1,stream.GetDdlDataSize());
-       GetRawsData(14+14+42+42+5)->Fill(ddl+1,stream.GetDdlDataSize());
+     //  FillRawsData(14+14+42+42+1,ddl+1,stream.GetDdlDataSize());
+       FillRawsData(14+14+42+42+5,ddl+1,stream.GetDdlDataSize());
        if(stream.GetDdlDataSize() > 0) 
         {
           isHMPin++;
           //___ fill error histo
            for(Int_t iErr =1; iErr<(Int_t)AliHMPIDRawStream::kSumErr; iErr++){
             Int_t numOfErr = stream.GetErrors(ddl,iErr);
-            GetRawsData(ddl)->Fill(iErr,numOfErr);
-            ((TH2I*)GetRawsData(14+14+42+42))->Fill(iErr,ddl,iErr); //
+            FillRawsData(ddl,iErr,numOfErr);
+            FillRawsData(14+14+42+42,iErr,ddl,iErr); //
            }
           
           numPadsInDdl= stream.GetNPads();
            ddlOcc[ddl] = numPadsInDdl;
-           GetRawsData(14+14+42+42+6)->Fill(ddl+1,numPadsInDdl/11520.0*100.0);
+           FillRawsData(14+14+42+42+6,ddl+1,numPadsInDdl/11520.0*100.0);
             
           //___ loop on pads from raw data from a ddl
           for(Int_t iPad=0;iPad<numPadsInDdl;iPad++) {
             AliHMPIDDigit dig(stream.GetPadArray()[iPad],stream.GetChargeArray()[iPad]);dig.Raw(word,Nddl,r,d,a);    
             //for DQM shifter 
-            ((TH2F*)GetRawsData(14+14+42+42+3))->Fill(dig.PadChX(), dig.Ch()*144+dig.PadChY(),dig.Q());
-            ((TH2F*)GetRawsData(14+14+42+42+4))->Fill(dig.Q(),(ddl/2*6)+dig.PadChY()/24,dig.Q());
+            FillRawsData(14+14+42+42+3,dig.PadChX(), dig.Ch()*144+dig.PadChY(),dig.Q());
+            FillRawsData(14+14+42+42+4,dig.Q(),(ddl/2*6)+dig.PadChY()/24,dig.Q());
             
-            GetRawsData(ddl+14)->Fill(r,d);
-            GetRawsData(28+stream.Pc(Nddl,r,d,a)+6*AliHMPIDParam::DDL2C(ddl))->Fill(stream.PadPcX(Nddl,r,d,a),stream.PadPcY(Nddl,r,d,a));
-            GetRawsData(70+stream.Pc(Nddl,r,d,a)+6*AliHMPIDParam::DDL2C(ddl))->Fill(stream.GetChargeArray()[iPad]);
-            // GetRawsData(14+14+42+42+6)->Fill(ddl+1,1);
+            FillRawsData(ddl+14,r,d);
+            FillRawsData(28+stream.Pc(Nddl,r,d,a)+6*AliHMPIDParam::DDL2C(ddl),stream.PadPcX(Nddl,r,d,a),stream.PadPcY(Nddl,r,d,a));
+            FillRawsData(70+stream.Pc(Nddl,r,d,a)+6*AliHMPIDParam::DDL2C(ddl),stream.GetChargeArray()[iPad]);
+            // FillRawsData(14+14+42+42+6,ddl+1,1);
           }//pad loop
          }     
      }//next
     
     
-    if(isHMPin > 0) fEvtRaw++;
+    if(isHMPin > 0) { // RS: instead of former fEvtRaw
+      IncEvCountCycleRaws();
+      IncEvCountTotalRaws();
+    }
      
     
 }//MakeRaws
+
+
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDQADataMakerRec::MakeDigits()
 {
@@ -330,13 +342,13 @@ void AliHMPIDQADataMakerRec::MakeDigits()
   //
 
   Int_t i = fChannel ; 
-  GetDigitsData(0)->Fill(i,fDigitsArray->GetEntriesFast()/(48.*80.*6.));
+  FillDigitsData(0,i,fDigitsArray->GetEntriesFast()/(48.*80.*6.));
   TIter next(fDigitsArray); 
   AliHMPIDDigit * digit; 
   while ( (digit = dynamic_cast<AliHMPIDDigit *>(next())) ) {
-    GetDigitsData(1)->Fill(10.*i+digit->Pc(),1./(48.*80.));
-    GetDigitsData(2+i)->Fill(digit->PadChX(),digit->PadChY());
-    GetDigitsData(9+i*6+digit->Pc())->Fill(digit->Q());
+    FillDigitsData(1,10.*i+digit->Pc(),1./(48.*80.));
+    FillDigitsData(2+i,digit->PadChX(),digit->PadChY());
+    FillDigitsData(9+i*6+digit->Pc(),digit->Q());
   }  
 }  
   
@@ -360,6 +372,10 @@ void AliHMPIDQADataMakerRec::MakeDigits(TTree * digTree)
     branch->GetEntry(0); 
     MakeDigits();
   }
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+  //
 }
 
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -379,21 +395,25 @@ void AliHMPIDQADataMakerRec::MakeRecPoints(TTree * clustersTree)
     TBranch *branch = clustersTree->GetBranch(Form("HMPID%d",iCh));
     branch->SetAddress(&fRecPointsArray);
     branch->GetEntry(0);
-    GetRecPointsData(0)->Fill(iCh,fRecPointsArray->GetEntries());
+    FillRecPointsData(0,iCh,fRecPointsArray->GetEntries());
     TIter next(fRecPointsArray);
     AliHMPIDCluster *clu;
     while ( (clu = dynamic_cast<AliHMPIDCluster *>(next())) ) {
-      GetRecPointsData(1)->Fill(clu->Status(),iCh);
+      FillRecPointsData(1,clu->Status(),iCh);
       Int_t sect =  pPar->InHVSector(clu->Y());
-      if(clu->Q()>100) GetRecPointsData(2+iCh)->Fill(clu->Size());
+      if(clu->Q()>100) FillRecPointsData(2+iCh,clu->Size());
       else {
-        GetRecPointsData(2+7+iCh)->Fill(clu->Size());
-        GetRecPointsData(2+14+iCh*6+sect)->Fill(clu->Q());
+        FillRecPointsData(2+7+iCh,clu->Size());
+        FillRecPointsData(2+14+iCh*6+sect,clu->Q());
       }    
-      GetRecPointsData(2+14+42+iCh*6+sect)->Fill(clu->Q());
+      FillRecPointsData(2+14+42+iCh*6+sect,clu->Q());
     }
   }
+  IncEvCountCycleRecPoints();
+  IncEvCountTotalRecPoints();
+  //
 }
+
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDQADataMakerRec::MakeESDs(AliESDEvent * esd)
 {
@@ -403,26 +423,31 @@ void AliHMPIDQADataMakerRec::MakeESDs(AliESDEvent * esd)
  
   for(Int_t iTrk = 0 ; iTrk < esd->GetNumberOfTracks() ; iTrk++){
     AliESDtrack *pTrk = esd->GetTrack(iTrk) ;
-    GetESDsData(0)->Fill(pTrk->GetP(),pTrk->GetHMPIDsignal());
-    GetESDsData(1)->Fill( pTrk->GetP(),TMath::Sqrt(pTrk->GetHMPIDchi2()));
+    FillESDsData(0,pTrk->GetP(),pTrk->GetHMPIDsignal());
+    FillESDsData(1, pTrk->GetP(),TMath::Sqrt(pTrk->GetHMPIDchi2()));
     Float_t xm,ym; Int_t q,np;  
     pTrk->GetHMPIDmip(xm,ym,q,np);                       //mip info
     Float_t xRad,yRad,th,ph;        
     pTrk->GetHMPIDtrk(xRad,yRad,th,ph);              //track info at the middle of the radiator
     Float_t xPc = xRad+9.25*TMath::Tan(th)*TMath::Cos(ph); // temporar: linear extrapol (B=0!)
     Float_t yPc = yRad+9.25*TMath::Tan(th)*TMath::Sin(ph); // temporar:          "
-    GetESDsData(2)->Fill(xm-xPc,ym-yPc); //track info
+    FillESDsData(2,xm-xPc,ym-yPc); //track info
     if(pTrk->GetHMPIDsignal()>0) {
      Double_t a = 1.292*1.292*TMath::Cos(pTrk->GetHMPIDsignal())*TMath::Cos(pTrk->GetHMPIDsignal())-1.;
      if(a > 0) {
     Double_t mass = pTrk->P()*TMath::Sqrt(1.292*1.292*TMath::Cos(pTrk->GetHMPIDsignal())*TMath::Cos(pTrk->GetHMPIDsignal())-1.);
-    GetESDsData(3)->Fill( pTrk->GetP(),mass);
+    FillESDsData(3, pTrk->GetP(),mass);
      }
     }
    Double_t pid[5] ;      pTrk->GetHMPIDpid(pid) ;
-    for(Int_t i = 0 ; i < 5 ; i++) GetESDsData(4+i)->Fill(pid[i]) ;
+    for(Int_t i = 0 ; i < 5 ; i++) FillESDsData(4+i,pid[i]) ;
   }
+  //
+  IncEvCountCycleESDs();
+  IncEvCountTotalESDs();
+  //
 }
+
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDQADataMakerRec::StartOfDetectorCycle()
 {
@@ -435,48 +460,48 @@ void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA
 {
   //Detector specific actions at end of cycle
   // do the QA checking
-  if(task==AliQAv1::kRAWS) {
-    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-      if (! IsValidEventSpecie(specie, histos) )
-        continue ;
-      for(Int_t iddl=0;iddl<14;iddl++) {
-        TH1F *h = (TH1F*)histos[specie]->At(14+iddl); //ddl histos scaled by the number of events 
-        if(fEvtRaw>0) h->Scale(1.0/(Float_t)fEvtRaw);
-      }//ddl loop
-       
-      TH2F *h2 = (TH2F*)histos[specie]->At(14+14+42+42+3);
-      if(fEvtRaw>0) h2->Scale(1.0/(Float_t)fEvtRaw);     
-          
-      TH2F *h3 = (TH2F*)histos[specie]->At(14+14+42+42+4);
-      if(fEvtRaw>0) h3->Scale(1.0/(Float_t)fEvtRaw);
-      
-          
-      Double_t binval=0,binerr=0;
-      
-      TH1F *h4 = (TH1F*)histos[specie]->At(14+14+42+42+1);
-      TProfile *h4prf = (TProfile*)histos[specie]->At(14+14+42+42+5);
-      for(Int_t iddl=1;iddl<=14;iddl++) 
-        {
-          binval=h4prf->GetBinContent(iddl);  binerr=h4prf->GetBinError(iddl);
-          h4->SetBinContent(iddl,binval);     h4->SetBinError(iddl,binerr);
-         }
-      //if(fEvtRaw>0) h4->Scale(1./(Float_t)fEvtRaw);
-                  
-      TH1F *h5 = (TH1F*)histos[specie]->At(14+14+42+42+2);
-      TProfile *h5prf = (TProfile*)histos[specie]->At(14+14+42+42+6);
-      for(Int_t iddl=1;iddl<=14;iddl++) 
-       {
-         binval=h5prf->GetBinContent(iddl);  binerr=h5prf->GetBinError(iddl);
-         h5->SetBinContent(iddl,binval);     h5->SetBinError(iddl,binerr);
-       }
-
-      //if(fEvtRaw>0) h5->Scale(1./(Float_t)fEvtRaw/11520.0*100.0);
-           
-     }//specie loop     
-  }//RAWS
-   
+  ResetEventTrigClasses(); // reset triggers list to select all histos
+  TH1* htmp = 0;
+  //
+  for (int itc=-1;itc<GetNTrigClasses();itc++) { // RS: loop over eventual clones per trigger class
+    //
+    if(task==AliQAv1::kRAWS) {
+      for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+       if (! IsValidEventSpecie(specie, histos) ) continue;
+       SetEventSpecie(AliRecoParam::ConvertIndex(specie));
+       Int_t nEvtRaw = GetEvCountCycleRaws(itc);
+       if (nEvtRaw>0) {
+         //ddl histos scaled by the number of events 
+         for(Int_t iddl=0;iddl<14;iddl++) if ( (htmp=GetData(histos, 14+iddl,itc)) ) htmp->Scale(1.0/(Float_t)nEvtRaw);
+         if ( (htmp=GetData(histos, 14+14+42+42+3, itc)) ) htmp->Scale(1.0/(Float_t)nEvtRaw);
+         if ( (htmp=GetData(histos, 14+14+42+42+4, itc)) ) htmp->Scale(1.0/(Float_t)nEvtRaw);
+       }      
+       Double_t binval=0,binerr=0;     
+       TH1F     *h4    = (TH1F*)    GetData(histos, 14+14+42+42+1, itc);
+       TProfile *h4prf = (TProfile*)GetData(histos, 14+14+42+42+5, itc);
+       if (h4 && h4prf) {
+         for(Int_t iddl=1;iddl<=14;iddl++) {
+           binval=h4prf->GetBinContent(iddl);  binerr=h4prf->GetBinError(iddl);
+           h4->SetBinContent(iddl,binval);     h4->SetBinError(iddl,binerr);
+         }
+       }
+       //if (nEvtRaw>0) h4->Scale(1./(Float_t)nEvtRaw);
+       //
+       TH1F     *h5    = (TH1F*)    GetData(histos, 14+14+42+42+2, itc);
+       TProfile *h5prf = (TProfile*)GetData(histos, 14+14+42+42+6, itc);
+       if (h4 && h4prf) {
+         for(Int_t iddl=1;iddl<=14;iddl++) {
+           binval=h5prf->GetBinContent(iddl);  binerr=h5prf->GetBinError(iddl);
+           h5->SetBinContent(iddl,binval);     h5->SetBinError(iddl,binerr);
+         }
+       }
+       //if(nEvtRaw>0) h5->Scale(1./(Float_t)nEvtRaw/11520.0*100.0);           
+      }//specie loop     
+    }//RAWS
+    //
+  } // RS: loop over eventual clones per trigger class
+  //
   AliQAChecker::Instance()->Run(AliQAv1::kHMPID, task, histos);
-   
-   
+  //
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
index 72c7e53..9bbf76f 100644 (file)
@@ -42,7 +42,6 @@ private:
   virtual void   MakeESDs(AliESDEvent * esd) ;         //Fill hit QA histo
   virtual void   StartOfDetectorCycle() ;
   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** obj) ;
-  Int_t   fEvtRaw;    //!internal event counter for raw 
   TLine  *fLineDdlDatSizeLow;  // line for minimum data size limit 
   TLine  *fLineDdlDatSizeUp;   // line for maximum data size limit
   TLine  *fLineDdlPadOCcLow;   // line for minimum occupancy limit
@@ -51,7 +50,7 @@ private:
   Int_t   fChannel ; //!
     
   
-  ClassDef(AliHMPIDQADataMakerRec,3)  // description 
+  ClassDef(AliHMPIDQADataMakerRec,4)  // description 
 
 };
 
index 1ad28e1..677f7fb 100644 (file)
@@ -84,6 +84,8 @@ void AliHMPIDQADataMakerSim::InitHits()
     hHitMap[iCh]=new TH2F(Form("HMPID HitMap%i",iCh),Form("Ch%i;x_{Hit};y_{Hit};Entries",iCh),162,-1,161,146,-1,145);   
     Add2HitsList(hHitMap[iCh],iCh+1,expert,!image);
   }
+  //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -108,6 +110,8 @@ void AliHMPIDQADataMakerSim::InitDigits()
   Add2DigitsList(hDigPcEvt,1,expert, !image);
   for(Int_t iMap=0; iMap < 7; iMap++) Add2DigitsList(hDigMap[iMap],2+iMap,expert, !image);
   for(Int_t iH =0; iH < 42 ; iH++) Add2DigitsList(hDigQ[iH]    ,9+iH,expert,!image);
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -119,6 +123,8 @@ void AliHMPIDQADataMakerSim::InitSDigits()
 
   TH1F   *hSDigits     = new TH1F("hHmpidSDigits",    "SDigits Q  distribution in HMPID;QDC;Entries",  500, 0., 5000.) ; 
   Add2SDigitsList(hSDigits,0, !expert, image);
+  //
+  ClonePerTrigClass(AliQAv1::kSDIGITS); // this should be the last line}
 }
 
 //____________________________________________________________________________ 
@@ -132,8 +138,8 @@ void AliHMPIDQADataMakerSim::MakeHits()
   TIter next(fHitsArray); 
   AliHMPIDHit * hit ; 
   while ( (hit = dynamic_cast<AliHMPIDHit *>(next())) ) {
-    if(hit->Pid()<500000) GetHitsData(0)->Fill(hit->Q()) ;
-    if(hit->Pid()<500000) GetHitsData(hit->Ch()+1)->Fill(hit->LorsX(),hit->LorsY());
+    if(hit->Pid()<500000) FillHitsData(0,hit->Q()) ;
+    if(hit->Pid()<500000) FillHitsData(hit->Ch()+1,hit->LorsX(),hit->LorsY());
   }
 } 
 
@@ -161,13 +167,13 @@ void AliHMPIDQADataMakerSim::MakeDigits()
   //
    
   Int_t i = fChannel ; 
-  GetDigitsData(0)->Fill(i,fDigitsArray->GetEntriesFast()/(48.*80.*6.));
+  FillDigitsData(0,i,fDigitsArray->GetEntriesFast()/(48.*80.*6.));
   TIter next(fDigitsArray); 
   AliHMPIDDigit * digit; 
   while ( (digit = dynamic_cast<AliHMPIDDigit *>(next())) ) {
-    GetDigitsData(1)->Fill(10.*i+digit->Pc(),1./(48.*80.));
-    GetDigitsData(2+i)->Fill(digit->PadChX(),digit->PadChY());
-    GetDigitsData(9+i*6+digit->Pc())->Fill(digit->Q());
+    FillDigitsData(1,10.*i+digit->Pc(),1./(48.*80.));
+    FillDigitsData(2+i,digit->PadChX(),digit->PadChY());
+    FillDigitsData(9+i*6+digit->Pc(),digit->Q());
   }  
 }  
 //___________________________________________________________________________
@@ -202,7 +208,7 @@ void AliHMPIDQADataMakerSim::MakeSDigits()
   TIter next(fSDigitsArray) ; 
   AliHMPIDDigit * sdigit ; 
   while ( (sdigit = dynamic_cast<AliHMPIDDigit *>(next())) ) {
-    GetSDigitsData(0)->Fill(sdigit->Q());
+    FillSDigitsData(0,sdigit->Q());
   } 
 }
 //___________________________________________________________________________
@@ -236,6 +242,7 @@ void AliHMPIDQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA
 {
   //Detector specific actions at end of cycle
   // do the QA checking
+  ResetEventTrigClasses(); // reset triggers list to select all histos
   AliQAChecker::Instance()->Run(AliQAv1::kHMPID, task, obj) ;  
 }
 
index c8b6fab..fc47204 100644 (file)
@@ -56,34 +56,34 @@ ClassImp(AliITSQADataMakerRec)
 //____________________________________________________________________________ 
 AliITSQADataMakerRec::AliITSQADataMakerRec(Bool_t kMode, Short_t subDet, Short_t ldc) :
 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kITS), "ITS Quality Assurance Data Maker"),
-fkOnline(kMode),
-fSubDetector(subDet),
-fLDC(ldc),
-fRunNumber(0),
-fEventNumber(0),
-fSelectedTaskIndex(AliQAv1::kNULLTASKINDEX),
-fSPDDataMaker(NULL),
-fSDDDataMaker(NULL),
-fSSDDataMaker(NULL)
+  fkOnline(kMode),
+  fSubDetector(subDet),
+  fLDC(ldc),
+  fRunNumber(0),
+  fEventNumber(0),
+  fSelectedTaskIndex(AliQAv1::kNULLTASKINDEX),
+  fSPDDataMaker(NULL),
+  fSDDDataMaker(NULL),
+  fSSDDataMaker(NULL)
 
 {
   //ctor used to discriminate OnLine-Offline analysis
   if(fSubDetector < 0 || fSubDetector > 3) {
-       AliError("Error: fSubDetector number out of range; return\n");
+    AliError("Error: fSubDetector number out of range; return\n");
   }
 
   // Initialization for RAW data 
   if(fSubDetector == 0 || fSubDetector == 1) {
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SPD DataMakerRec\n");
-       fSPDDataMaker = new AliITSQASPDDataMakerRec(this,fkOnline);
+    fSPDDataMaker = new AliITSQASPDDataMakerRec(this,fkOnline);
   }
   if(fSubDetector == 0 || fSubDetector == 2) {
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SDD DataMakerRec\n");
-       fSDDDataMaker = new AliITSQASDDDataMakerRec(this,fkOnline);
+    fSDDDataMaker = new AliITSQASDDDataMakerRec(this,fkOnline);
   }
   if(fSubDetector == 0 || fSubDetector == 3) {
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SSD DataMakerRec\n");
-       fSSDDataMaker = new AliITSQASSDDataMakerRec(this,fkOnline);
+    fSSDDataMaker = new AliITSQASSDDataMakerRec(this,fkOnline);
   }
 }
 
@@ -97,16 +97,16 @@ AliITSQADataMakerRec::~AliITSQADataMakerRec(){
 
 //____________________________________________________________________________ 
 AliITSQADataMakerRec::AliITSQADataMakerRec(const AliITSQADataMakerRec& qadm) :
-AliQADataMakerRec(),
-fkOnline(qadm.fkOnline),
-fSubDetector(qadm.fSubDetector),
-fLDC(qadm.fLDC),
-fRunNumber(qadm.fRunNumber),
-fEventNumber(qadm.fEventNumber),
-fSelectedTaskIndex(qadm.fSelectedTaskIndex),
-fSPDDataMaker(NULL),
-fSDDDataMaker(NULL),
-fSSDDataMaker(NULL)
+  AliQADataMakerRec(),
+  fkOnline(qadm.fkOnline),
+  fSubDetector(qadm.fSubDetector),
+  fLDC(qadm.fLDC),
+  fRunNumber(qadm.fRunNumber),
+  fEventNumber(qadm.fEventNumber),
+  fSelectedTaskIndex(qadm.fSelectedTaskIndex),
+  fSPDDataMaker(NULL),
+  fSDDDataMaker(NULL),
+  fSSDDataMaker(NULL)
 
 {
   //copy ctor 
@@ -128,6 +128,9 @@ void AliITSQADataMakerRec::StartOfDetectorCycle()
 {
   //Detector specific actions at start of cycle
   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of ITS Cycle\n");
+  ResetEventTrigClasses(); // reset triggers list to select all histos
+  ResetEvCountCycle();
+  //  
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle();
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle();
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle();
@@ -145,52 +148,55 @@ void AliITSQADataMakerRec::StartOfCycle(AliQAv1::TASKINDEX_t task, Int_t run, co
 void AliITSQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list)
 {
   // launch the QA checking
-
+  ResetEventTrigClasses();
+  //
   AliInfo(Form("End of Dedetctor Cycle called for %s\n",AliQAv1::GetTaskName(task).Data() ));
+  //
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-
-       if(AliQAv1::Instance()->IsEventSpecieSet(specie)){
-         Int_t idnumber=list[specie]->GetUniqueID();
-         //printf("specie %s \t id number == %d\n",AliRecoParam::GetEventSpecieName(specie),idnumber);
-         if(idnumber==40||idnumber==0){
-             //AliInfo(Form("No check for %s\n",AliQAv1::GetTaskName(task).Data() ))
-           continue;
-         } //skip kDigitsR and not filled TobjArray specie
-         else{
-           AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list[specie])\n"); 
-           if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[/*GetEventSpecie()*/specie]);
-           if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[/*GetEventSpecie()*/specie]);
-           if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[/*GetEventSpecie()*/specie]);
-           
-           
-           AliQAChecker *qac = AliQAChecker::Instance();
-           AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
-           Int_t subdet=GetSubDet();
-           qacb->SetSubDet(subdet);
-         
-           if(subdet== 0 ){
-             qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task,specie), fSDDDataMaker->GetOffset(task,specie), fSSDDataMaker->GetOffset(task,specie)); //Setting the offset for the QAChecker list
-             qacb->SetHisto(fSPDDataMaker->GetTaskHisto(task), fSDDDataMaker->GetTaskHisto(task), fSSDDataMaker->GetTaskHisto(task));
-           }
-           else
-             if(subdet!=0){
-               Int_t offset=GetDetTaskOffset(subdet, task,specie);
-               qacb->SetDetTaskOffset(subdet,offset);
-               Int_t histo=GetDetTaskHisto(subdet, task);
-               qacb->SetDetHisto(subdet,histo);
-             }
-           
-           qac->Run( AliQAv1::kITS , task, list);
-           
-         }//end else unique id
-       }//end else event specie
+    //
+    if(!AliQAv1::Instance()->IsEventSpecieSet(specie)) continue;
+    SetEventSpecie(AliRecoParam::ConvertIndex(specie));
+    Int_t idnumber=list[specie]->GetUniqueID();
+    //printf("specie %s \t id number == %d\n",AliRecoParam::GetEventSpecieName(specie),idnumber);
+    if(idnumber==40||idnumber==0){
+      //AliInfo(Form("No check for %s\n",AliQAv1::GetTaskName(task).Data() ))
+      continue;
+    } //skip kDigitsR and not filled TobjArray specie
+    else{
+      AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list[specie])\n"); 
+      if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list);//[/*GetEventSpecie()*/specie]);
+      if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);//[/*GetEventSpecie()*/specie]);
+      if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);//[/*GetEventSpecie()*/specie]);
+      
+      
+      AliQAChecker *qac = AliQAChecker::Instance();
+      AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
+      Int_t subdet=GetSubDet();
+      qacb->SetSubDet(subdet);
+      
+      if(subdet== 0 ){
+       qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task,specie), fSDDDataMaker->GetOffset(task,specie), fSSDDataMaker->GetOffset(task,specie)); //Setting the offset for the QAChecker list
+       qacb->SetHisto(fSPDDataMaker->GetTaskHisto(task), fSDDDataMaker->GetTaskHisto(task), fSSDDataMaker->GetTaskHisto(task));
+      }
+      else
+       if(subdet!=0){
+         Int_t offset=GetDetTaskOffset(subdet, task,specie);
+         qacb->SetDetTaskOffset(subdet,offset);
+         Int_t histo=GetDetTaskHisto(subdet, task);
+         qacb->SetDetHisto(subdet,histo);
+       }
+      
+      qac->Run( AliQAv1::kITS , task, list);
+      
+    }//end else unique id
+    
   }//end for
 }
 
 //____________________________________________________________________________ 
 //void AliITSQADataMakerRec::EndOfDetectorCycle(const char * /*fgDataName*/)
 //{
-  //eventually used for different  AliQAChecker::Instance()->Run
+//eventually used for different  AliQAChecker::Instance()->Run
 //}
 
 //____________________________________________________________________________ 
@@ -199,8 +205,6 @@ void AliITSQADataMakerRec::InitRaws() {
 
   //if(fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()) return;
        
-
-
   if(fSubDetector == 0 || fSubDetector == 1) {
     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRaws\n");
     fSPDDataMaker->InitRaws();
@@ -218,7 +222,8 @@ void AliITSQADataMakerRec::InitRaws() {
     fSSDDataMaker->InitRaws();
   }
   fRawsQAList[AliRecoParam::AConvert(fEventSpecie)]->SetUniqueID(10);
-
+  //
+  ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
 }
 
 //____________________________________________________________________________
@@ -238,7 +243,10 @@ void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   }
 
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader);
-
+  //
+  IncEvCountCycleRaws();
+  IncEvCountTotalRaws();
+  //
 }
 
 //____________________________________________________________________________ 
@@ -264,6 +272,8 @@ void AliITSQADataMakerRec::InitDigits()
     fSSDDataMaker->InitDigits();
   }
   fDigitsQAList[AliRecoParam::AConvert(fEventSpecie)]->SetUniqueID(40);
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -282,6 +292,10 @@ void AliITSQADataMakerRec::MakeDigits(TTree * digitsTree)
   }
   
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digitsTree);
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+  //
 }
 
 //____________________________________________________________________________ 
@@ -292,38 +306,38 @@ void AliITSQADataMakerRec::InitRecPoints()
 
 
   //if(fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries()) return;
-       if(fSubDetector == 0 || fSubDetector == 1) {
-               AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRecPoints\n");
-               fSPDDataMaker->InitRecPoints();
-       }
-       if(fSubDetector == 0 || fSubDetector == 2) {
-               AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRecPoints\n");
-               fSDDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(), AliRecoParam::AConvert(fEventSpecie));
-               fSDDDataMaker->InitRecPoints();
-       }
-       if(fSubDetector == 0 || fSubDetector == 3) {
-               AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRecPoints\n");
-               fSSDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
-               fSSDDataMaker->InitRecPoints();
-       }
+  if(fSubDetector == 0 || fSubDetector == 1) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRecPoints\n");
+    fSPDDataMaker->InitRecPoints();
+  }
+  if(fSubDetector == 0 || fSubDetector == 2) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRecPoints\n");
+    fSDDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(), AliRecoParam::AConvert(fEventSpecie));
+    fSDDDataMaker->InitRecPoints();
+  }
+  if(fSubDetector == 0 || fSubDetector == 3) {
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRecPoints\n");
+    fSSDDataMaker->SetOffset(AliQAv1::kRECPOINTS, fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
+    fSSDDataMaker->InitRecPoints();
+  }
 
   fRecPointsQAList[AliRecoParam::AConvert(fEventSpecie)]->SetUniqueID(20);
-       if(fSubDetector == 0){
-         Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
-         const Bool_t expert   = kTRUE ; 
-         const Bool_t image    = kTRUE ; 
-         TH2F* hPhiEta[6];
-         for (Int_t iLay=0;iLay<6;iLay++) {
-           hPhiEta[iLay]=new TH2F(Form("Phi_vs_Eta_ITS_Layer%d",iLay+1),Form("Phi_vs_Eta_ITS_Layer%d",iLay+1),30,-1.5,1.5,200,0.,2*TMath::Pi());
-           hPhiEta[iLay]->GetXaxis()->SetTitle("Pseudorapidity");
-           hPhiEta[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
-           Add2RecPointsList(hPhiEta[iLay], iLay + offset, !expert, image);
-           
-           //delete hPhiEta[iLay];
-         }
+  if(fSubDetector == 0){
+    Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
+    const Bool_t expert   = kTRUE ; 
+    const Bool_t image    = kTRUE ; 
+    TH2F* hPhiEta[6];
+    for (Int_t iLay=0;iLay<6;iLay++) {
+      hPhiEta[iLay]=new TH2F(Form("Phi_vs_Eta_ITS_Layer%d",iLay+1),Form("Phi_vs_Eta_ITS_Layer%d",iLay+1),30,-1.5,1.5,200,0.,2*TMath::Pi());
+      hPhiEta[iLay]->GetXaxis()->SetTitle("Pseudorapidity");
+      hPhiEta[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
+      Add2RecPointsList(hPhiEta[iLay], iLay + offset, !expert, image);     
+      //delete hPhiEta[iLay];
+    }
          
-       }
-       
+  }
+  //
+  ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line      
 }
 
 //____________________________________________________________________________ 
@@ -380,31 +394,34 @@ void AliITSQADataMakerRec::MakeRecPoints(TTree * clustersTree)
          else { eta = -TMath::Log(TMath::Tan(theta/2.));}
        }
        //      printf("=========================>hlt   rcp->GetLayer() = %d \n",rcp->GetLayer());
-       (GetRecPointsData( rcp->GetLayer() + offset - 6))->Fill(eta,phi);
+       FillRecPointsData(rcp->GetLayer() + offset - 6,eta,phi);
       }
     }
   }
-  
+  //
+  IncEvCountCycleRecPoints();
+  IncEvCountTotalRecPoints();
+  //
 }
 
 //____________________________________________________________________________ 
 void AliITSQADataMakerRec::FillRecPoint(AliITSRecPoint rcp)
 {
 
-       // Fill QA for recpoints
-       Float_t cluGlo[3] = {0.,0.,0.};
-       Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
+  // Fill QA for recpoints
+  Float_t cluGlo[3] = {0.,0.,0.};
+  Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
   // Check id histograms already created for this Event Specie
-       rcp.GetGlobalXYZ(cluGlo);
-       Double_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]+cluGlo[2]*cluGlo[2]);
-       Double_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
-       Double_t theta = TMath::ACos(cluGlo[2]/rad);
-       Double_t eta = 100.;
-       if(AreEqual(rad,0.)==kFALSE) {
-         if(theta<=1.e-14){eta=30.;}
-         else    {eta = -TMath::Log(TMath::Tan(theta/2.));}
-       }
-       (GetRecPointsData( rcp.GetLayer() + offset - 6))->Fill(eta,phi);        
+  rcp.GetGlobalXYZ(cluGlo);
+  Double_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]+cluGlo[2]*cluGlo[2]);
+  Double_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
+  Double_t theta = TMath::ACos(cluGlo[2]/rad);
+  Double_t eta = 100.;
+  if(AreEqual(rad,0.)==kFALSE) {
+    if(theta<=1.e-14){eta=30.;}
+    else    {eta = -TMath::Log(TMath::Tan(theta/2.));}
+  }
+  FillRecPointsData( rcp.GetLayer() + offset - 6, eta,phi);    
 
 }
 
@@ -412,8 +429,8 @@ void AliITSQADataMakerRec::FillRecPoint(AliITSRecPoint rcp)
 TH2F *AliITSQADataMakerRec::GetITSGlobalHisto(Int_t layer)
 {
 
-       Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
-       return ((TH2F *) GetRecPointsData( layer + offset - 6));//local distribution
+  Int_t offset = fRecPointsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries();
+  return ((TH2F *) GetRecPointsData( layer + offset - 6));//local distribution
 }
 
 //____________________________________________________________________________ 
@@ -527,7 +544,7 @@ void AliITSQADataMakerRec::InitESDs()
 
   TH2F* hSPDTrackletsvsFiredChips0 = 
     new TH2F("hSPDTrackletsvsFiredChips0","N SPD Tracklets vs N FiredChips Layer0",
-              300,0.,300.,300,0.,300.);
+            300,0.,300.,300,0.,300.);
   hSPDTrackletsvsFiredChips0->GetXaxis()->SetTitle("N FiredChips Layer0"); 
   hSPDTrackletsvsFiredChips0->GetYaxis()->SetTitle("N SPD Tracklets"); 
   hSPDTrackletsvsFiredChips0->Sumw2();
@@ -535,7 +552,7 @@ void AliITSQADataMakerRec::InitESDs()
 
   TH2F* hSPDTrackletsvsFiredChips1 = 
     new TH2F("hSPDTrackletsvsFiredChips1","N SPD Tracklets vs N FiredChips Layer1",
-              300,0.,300.,300,0.,300.);
+            300,0.,300.,300,0.,300.);
   hSPDTrackletsvsFiredChips1->GetXaxis()->SetTitle("N FiredChips Layer1"); 
   hSPDTrackletsvsFiredChips1->GetYaxis()->SetTitle("N SPD Tracklets"); 
   hSPDTrackletsvsFiredChips1->Sumw2();
@@ -543,7 +560,7 @@ void AliITSQADataMakerRec::InitESDs()
 
   TH2F* hSPDFiredChips1vsFiredChips0 = 
     new TH2F("hSPDFiredChips1vsFiredChips0","N FiredChips Layer1 vs N FiredChips Layer0",
-              300,0.,300.,300,0.,300.);
+            300,0.,300.,300,0.,300.);
   hSPDFiredChips1vsFiredChips0->GetXaxis()->SetTitle("N FiredChips Layer0"); 
   hSPDFiredChips1vsFiredChips0->GetYaxis()->SetTitle("N FiredChips Layer1"); 
   hSPDFiredChips1vsFiredChips0->Sumw2();
@@ -578,7 +595,8 @@ void AliITSQADataMakerRec::InitESDs()
   Add2ESDsList(hESDSkippedLayers, 23, expertHistogram);
 
   fESDsQAList[AliRecoParam::AConvert(fEventSpecie)]->SetUniqueID(30);
-  return;
+  //
+  ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
 }
 
 //____________________________________________________________________________
@@ -587,8 +605,8 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
   // Make QA data from ESDs
 
   // Check id histograms already created for this Event Specie
-//  if ( ! GetESDsData(0) )
-//    InitESDs() ;
+  //  if ( ! GetESDsData(0) )
+  //    InitESDs() ;
  
   const Int_t nESDTracks = esd->GetNumberOfTracks();
   Int_t nITSrefit5 = 0; 
@@ -611,23 +629,23 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
     if(nclsITS>=5 && itsrefit) nITSrefit5++;
 
     if(tpcin) {
-      GetESDsData(0)->Fill(nclsITS);
+      FillESDsData(0,nclsITS);
     }
     if(itsin && !tpcin){
-      GetESDsData(2)->Fill(nclsITS);
+      FillESDsData(2,nclsITS);
     }
 
     for(Int_t layer=0; layer<6; layer++) {
 
       if(TESTBIT(track->GetITSClusterMap(),layer)) {
        if(tpcin) {
-         GetESDsData(1)->Fill(layer);
+         FillESDsData(1,layer);
        } else {
-         GetESDsData(3)->Fill(layer);
+         FillESDsData(3,layer);
        }
       }
       track->GetITSModuleIndexInfo(layer,idet,status,xloc,zloc);
-      if(status==3) GetESDsData(23)->SetBinContent(layer,1);
+      if(status==3) SetESDsDataBinContent(23,layer,1);
     }     
 
   } // end loop on tracks
@@ -639,38 +657,38 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
   Int_t mult = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfTracklets();
   AliInfo(Form("Multiplicity %d ; Number of SPD vert contributors %d",mult,vtxSPD->GetNContributors()));
   if(mult>0)
-    GetESDsData(7)->Fill((Float_t)(vtxSPD->GetNContributors())/(Float_t)mult);
+    FillESDsData(7,(Float_t)(vtxSPD->GetNContributors())/(Float_t)mult);
 
   if(nITSrefit5>0)
-    GetESDsData(11)->Fill((Float_t)(vtxTrk->GetNIndices())/(Float_t)nITSrefit5);
+    FillESDsData(11,(Float_t)(vtxTrk->GetNIndices())/(Float_t)nITSrefit5);
 
   if(vtxSPD->GetNContributors()>0) {
-    GetESDsData(4)->Fill(vtxSPD->GetXv());
-    GetESDsData(5)->Fill(vtxSPD->GetYv());
-    GetESDsData(6)->Fill(vtxSPD->GetZv());
+    FillESDsData(4,vtxSPD->GetXv());
+    FillESDsData(5,vtxSPD->GetYv());
+    FillESDsData(6,vtxSPD->GetZv());
   }
 
   if(vtxTrk->GetNContributors()>0) {
-    GetESDsData(8)->Fill(vtxTrk->GetXv());
-    GetESDsData(9)->Fill(vtxTrk->GetYv());
-    GetESDsData(10)->Fill(vtxTrk->GetZv());
+    FillESDsData(8,vtxTrk->GetXv());
+    FillESDsData(9,vtxTrk->GetYv());
+    FillESDsData(10,vtxTrk->GetZv());
   }
 
   if(vtxSPD->GetNContributors()>0 && 
      vtxTrk->GetNContributors()>0) {
-    GetESDsData(12)->Fill(vtxSPD->GetXv()-vtxTrk->GetXv());
-    GetESDsData(13)->Fill(vtxSPD->GetYv()-vtxTrk->GetYv());
-    GetESDsData(14)->Fill(vtxSPD->GetZv()-vtxTrk->GetZv());
+    FillESDsData(12,vtxSPD->GetXv()-vtxTrk->GetXv());
+    FillESDsData(13,vtxSPD->GetYv()-vtxTrk->GetYv());
+    FillESDsData(14,vtxSPD->GetZv()-vtxTrk->GetZv());
   }
 
   // SPD Tracklets
-  GetESDsData(15)->Fill(mult);
+  FillESDsData(15,mult);
 
   Short_t nFiredChips0 = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfFiredChips(0);
   Short_t nFiredChips1 = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfFiredChips(1);
-  GetESDsData(16)->Fill(nFiredChips0,mult);
-  GetESDsData(17)->Fill(nFiredChips1,mult);
-  GetESDsData(18)->Fill(nFiredChips0,nFiredChips1);
+  FillESDsData(16,nFiredChips0,mult);
+  FillESDsData(17,nFiredChips1,mult);
+  FillESDsData(18,nFiredChips0,nFiredChips1);
 
   // Loop over tracklets
   for (Int_t itr=0; itr<mult; ++itr) {
@@ -678,13 +696,15 @@ void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
     Float_t deThetaTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetDeltaTheta(itr);
     Float_t phiTr   = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetPhi(itr);
     Float_t thetaTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetTheta(itr);
-    GetESDsData(19)->Fill(dePhiTr);
-    GetESDsData(20)->Fill(phiTr);
-    GetESDsData(21)->Fill(deThetaTr);
-    GetESDsData(22)->Fill(thetaTr);
+    FillESDsData(19,dePhiTr);
+    FillESDsData(20,phiTr);
+    FillESDsData(21,deThetaTr);
+    FillESDsData(22,thetaTr);
   } // end loop on tracklets
-
-  return;
+  //
+  IncEvCountCycleESDs();
+  IncEvCountTotalESDs();
+  //
 }
 
 //_________________________________________________________________
@@ -780,7 +800,6 @@ AliITSDDLModuleMapSDD *AliITSQADataMakerRec::GetDDLSDDModuleMap()
 }
 
 //____________________________________________________________________
-
 Bool_t AliITSQADataMakerRec::ListExists(AliQAv1::TASKINDEX_t task) const
 {
   //Check the existence of a list for a given task
index 57ba4e8..a56d3bc 100644 (file)
@@ -105,7 +105,9 @@ void AliITSQADataMakerSim::StartOfDetectorCycle()
 {
   //Detector specific actions at start of cycle
   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of ITS Cycle\n");
-
+  ResetEventTrigClasses(); // reset triggers list to select all histos
+  ResetEvCountCycle();
+  //  
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle();
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle();
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle();
@@ -114,48 +116,45 @@ void AliITSQADataMakerSim::StartOfDetectorCycle()
 //____________________________________________________________________________ 
 void AliITSQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list)
 {
-
+  //
   AliInfo(Form("End of Dedetctor Cycle called for %s\n",AliQAv1::GetTaskName(task).Data() ));
-
+  ResetEventTrigClasses(); // reset triggers list to select all histos
+  //
   // launch the QA checking
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-    if (! IsValidEventSpecie(specie, list) ){
-      continue ; 
-    }
+    if (! IsValidEventSpecie(specie, list) ) continue; 
+    SetEventSpecie(AliRecoParam::ConvertIndex(specie));
+    //
+    Int_t idnumber=list[specie]->GetUniqueID();
+    //printf("specie %s \t id number == %d\n",AliRecoParam::GetEventSpecieName(specie),idnumber);
+    if(idnumber==0) {
+      //AliInfo(Form("No check for %s\n",AliQAv1::GetTaskName(task).Data() ))
+      continue;
+    } //skip kDigitsR and not filled TobjArray specie
     else{
-      Int_t idnumber=list[specie]->GetUniqueID();
-      //printf("specie %s \t id number == %d\n",AliRecoParam::GetEventSpecieName(specie),idnumber);
-      if(idnumber==0)
-       {
-         //AliInfo(Form("No check for %s\n",AliQAv1::GetTaskName(task).Data() ))
-           continue;
-       } //skip kDigitsR and not filled TobjArray specie
-      else{
-       AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
-       if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
-       if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
-       if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]);
-       
-       
-       AliQAChecker *qac = AliQAChecker::Instance();
-       AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
-       Int_t subdet=GetSubDet();
-       qacb->SetSubDet(subdet);
-       
-       if(subdet== 0 ){
-         qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task,specie),fSDDDataMaker->GetOffset(task,specie),fSSDDataMaker->GetOffset(task,specie)); //Setting the offset for the QAChecker list
+      AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
+      if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list); //[specie]);
+      if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list); //[specie]);
+      if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list); //[specie]);
+      //
+      AliQAChecker *qac = AliQAChecker::Instance();
+      AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
+      Int_t subdet=GetSubDet();
+      qacb->SetSubDet(subdet);
+      
+      if(subdet== 0 ){
+       qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task,specie),fSDDDataMaker->GetOffset(task,specie),fSSDDataMaker->GetOffset(task,specie)); //Setting the offset for the QAChecker list
        qacb->SetHisto(fSPDDataMaker->GetTaskHisto(task), fSDDDataMaker->GetTaskHisto(task), fSSDDataMaker->GetTaskHisto(task));        
+      }
+      else
+       if(subdet!=0){
+         Int_t offset=GetDetTaskOffset(subdet, task);
+         qacb->SetDetTaskOffset(subdet,offset);
+         Int_t histo=GetDetTaskHisto(subdet, task);
+         qacb->SetDetHisto(subdet,histo);
        }
-       else
-         if(subdet!=0){
-           Int_t offset=GetDetTaskOffset(subdet, task);
-           qacb->SetDetTaskOffset(subdet,offset);
-           Int_t histo=GetDetTaskHisto(subdet, task);
-           qacb->SetDetHisto(subdet,histo);
-         }
-       qac->Run( AliQAv1::kITS , task, list);
-      }//end else unique id 
-    }//end else event specie
+      qac->Run( AliQAv1::kITS , task, list);
+    }//end else unique id 
   }//end for
 }
 
@@ -182,33 +181,34 @@ void AliITSQADataMakerSim::InitDigits()
     fSSDDataMaker->SetOffset(AliQAv1::kDIGITS, fDigitsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
     fSSDDataMaker->InitDigits();
   }
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________
 void AliITSQADataMakerSim::MakeDigits()
 { 
   // Fill QA for digits   
-  if(fSubDetector == 0 || fSubDetector == 1) 
-    fSPDDataMaker->MakeDigits() ; 
-
-  
-  if(fSubDetector == 0 || fSubDetector == 2) 
-    fSDDDataMaker->MakeDigits() ; 
-
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(); 
+  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(); 
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits();
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+  //
 }
 
 //____________________________________________________________________________
 void AliITSQADataMakerSim::MakeDigits(TTree * digits)
 { 
   // Fill QA for digits   
-  if(fSubDetector == 0 || fSubDetector == 1) 
-    fSPDDataMaker->MakeDigits(digits) ; 
-
-  if(fSubDetector == 0 || fSubDetector == 2)
-    fSDDDataMaker->MakeDigits(digits) ; 
-
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digits); 
+  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digits); 
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digits);
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+  //
 }
 
 //____________________________________________________________________________ 
@@ -233,36 +233,34 @@ void AliITSQADataMakerSim::InitSDigits()
     fSSDDataMaker->SetOffset(AliQAv1::kSDIGITS, fSDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
     fSSDDataMaker->InitSDigits();
   }
+  //
+  ClonePerTrigClass(AliQAv1::kSDIGITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
 void AliITSQADataMakerSim::MakeSDigits()
 {
   // Fill QA for sdigits
-  if(fSubDetector == 0 || fSubDetector == 1)
-    fSPDDataMaker->MakeSDigits() ; 
-
-  
-  if(fSubDetector == 0 || fSubDetector == 2) 
-    fSDDDataMaker->MakeSDigits() ; 
-
-
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(); 
+  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeSDigits(); 
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits();
+  //
+  IncEvCountCycleSDigits();
+  IncEvCountTotalSDigits();
+  //
 }
 
 //____________________________________________________________________________ 
 void AliITSQADataMakerSim::MakeSDigits(TTree * sdigits)
 {
   // Fill QA for recpoints
-  if(fSubDetector == 0 || fSubDetector == 1){
-    fSPDDataMaker->MakeSDigits(sdigits) ; 
- }
-  
-  if(fSubDetector == 0 || fSubDetector == 2){
-    fSDDDataMaker->MakeSDigits(sdigits) ; 
-  }
-
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(sdigits); 
+  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeSDigits(sdigits); 
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(sdigits);
+  //
+  IncEvCountCycleSDigits();
+  IncEvCountTotalSDigits();
+  //
 }
 
 //____________________________________________________________________________ 
@@ -286,35 +284,34 @@ void AliITSQADataMakerSim::InitHits()
     fSSDDataMaker->SetOffset(AliQAv1::kHITS, fHitsQAList[AliRecoParam::AConvert(fEventSpecie)]->GetEntries(),AliRecoParam::AConvert(fEventSpecie));
     fSSDDataMaker->InitHits();
   }
+  //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
 void AliITSQADataMakerSim::MakeHits()
 {
   // Fill QA for hits
-  if(fSubDetector == 0 || fSubDetector == 1) {
-    fSPDDataMaker->MakeHits() ; 
-    }
-  
-  if(fSubDetector == 0 || fSubDetector == 2) {
-    fSDDDataMaker->MakeHits() ; 
-  }
-
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeHits(); 
+  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeHits(); 
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits();
+  //
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
+  //
 }
 
 //____________________________________________________________________________ 
 void AliITSQADataMakerSim::MakeHits(TTree * hits)
 {
   // Fill QA for hits
-  if(fSubDetector == 0 || fSubDetector == 1) {
-    fSPDDataMaker->MakeHits(hits) ; 
-   }
-  if(fSubDetector == 0 || fSubDetector == 2) {
-    fSDDDataMaker->MakeHits(hits) ; 
-  }
-
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeHits(hits);
+  if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeHits(hits);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits(hits);
+  //
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
+  //
 }
 
 //_________________________________________________________________
@@ -324,7 +321,6 @@ Int_t AliITSQADataMakerSim::GetDetTaskOffset(Int_t subdet,AliQAv1::TASKINDEX_t t
   //return the offset for each subdetector
   switch(subdet)
     {
-
       Int_t offset;
     case 1:
       offset=fSPDDataMaker->GetOffset(task);
index 71aab2a..9fe16c4 100644 (file)
@@ -27,7 +27,7 @@
 // --- ROOT system ---
 
 #include <TProfile2D.h>
-#include <TH2D.h>
+#include <TH2F.h>
 #include <TH1F.h>
 #include <TBranch.h>
 #include <TTree.h>
@@ -83,8 +83,6 @@ fGenRawsOffset(0),
 fGenDigitsOffset(0),
 fGenRecPointsOffset(0),
 fTimeBinSize(1),
-fNEvent(0),
-fNEventRP(0),
 fDDLModuleMap(0),
 fCalibration(0),
 fHistoCalibration(0)
@@ -120,8 +118,6 @@ fGenRawsOffset(qadm.fGenRawsOffset),
 fGenDigitsOffset(qadm.fGenDigitsOffset),
 fGenRecPointsOffset(qadm.fGenRecPointsOffset),
 fTimeBinSize(qadm.fTimeBinSize),
-fNEvent(qadm.fNEvent),
-fNEventRP(qadm.fNEventRP),
 fDDLModuleMap(qadm.fDDLModuleMap),
 fCalibration(qadm.fCalibration),
 fHistoCalibration(qadm.fHistoCalibration)
@@ -152,253 +148,255 @@ void AliITSQASDDDataMakerRec::StartOfDetectorCycle()
 {
 
   //Start of a QA cycle
-
+  //
   AliDebug(AliQAv1::GetQADebugLevel(),Form("Start of SDD Cycle with event specie %s for task %s\n",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie()),AliQAv1::GetTaskName(fAliITSQADataMakerRec->GetTaskIndexSelected()).Data()));
-  if(!fCalibration) 
-    {
-      //fAliITSQADataMakerRec->GetRawsData(9+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-      CreateTheCalibration();
+  if(!fCalibration) {
+    //fAliITSQADataMakerRec->GetRawsData(9+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
+    CreateTheCalibration();
   }
 
   if(fAliITSQADataMakerRec->GetEventSpecie()==0) return;//not the kDefault EventSpecie
-    //Detector specific actions at start of cycle
-    if(fAliITSQADataMakerRec->GetTaskIndexSelected()==AliQAv1::kRAWS){
-      AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SDD Cycle\n");
-      if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRAWS)==kFALSE)return;
-
-       AliDebug(AliQAv1::GetQADebugLevel(),Form("Reset of Raw Data normalized histograms with eventspecie %s ",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie())));
-       fAliITSQADataMakerRec->GetRawsData(10+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();  
-       fAliITSQADataMakerRec->GetRawsData(3+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-       fAliITSQADataMakerRec->GetRawsData(4+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-       fAliITSQADataMakerRec->GetRawsData(5+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-      
-    }
-    if(fAliITSQADataMakerRec->GetTaskIndexSelected()==AliQAv1::kRECPOINTS){
-      if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRECPOINTS)==kFALSE)return;
-
-       AliDebug(AliQAv1::GetQADebugLevel(),Form("Reset of RecPoints normalized histograms with eventspecie %s ",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie())));
-
-       fAliITSQADataMakerRec->GetRecPointsData(9+  fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-       fAliITSQADataMakerRec->GetRecPointsData(10+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-       fAliITSQADataMakerRec->GetRecPointsData(11+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-       fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-
-      }
+  //Detector specific actions at start of cycle
+  if(fAliITSQADataMakerRec->GetTaskIndexSelected()==AliQAv1::kRAWS){
+    AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SDD Cycle\n");
+    if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRAWS)==kFALSE)return;
+    //
+    int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
+    AliDebug(AliQAv1::GetQADebugLevel(),Form("Reset of Raw Data normalized histograms with eventspecie %s ",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie())));
+    fAliITSQADataMakerRec->ResetRawsData(10+offsRW );
+    fAliITSQADataMakerRec->ResetRawsData(3+ offsRW);
+    fAliITSQADataMakerRec->ResetRawsData(4+ offsRW);
+    fAliITSQADataMakerRec->ResetRawsData(5+ offsRW);
+    //
+  }
+  if(fAliITSQADataMakerRec->GetTaskIndexSelected()==AliQAv1::kRECPOINTS){
+    if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRECPOINTS)==kFALSE)return;
+    
+    AliDebug(AliQAv1::GetQADebugLevel(),Form("Reset of RecPoints normalized histograms with eventspecie %s ",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie())));
+    int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
+    fAliITSQADataMakerRec->ResetRecPointsData(9+  offsRP);
+    fAliITSQADataMakerRec->ResetRecPointsData(10+ offsRP);
+    fAliITSQADataMakerRec->ResetRecPointsData(11+ offsRP);
+    fAliITSQADataMakerRec->ResetRecPointsData(27+ offsRP);
+    
+  }
 }
 
 //____________________________________________________________________________ 
-void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray* /*list*/)
+void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** /*list*/)
 {
   //end of a QA cycle
+
   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
   
   Double_t entriescalibration1= 0.;
   Double_t entriescalibrationL3=0.;
   Double_t entriescalibrationL4=0.;
-  
+  int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
+  int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
+  //
   if(fHistoCalibration){
-    entriescalibration1= ((TH1D*)(fHistoCalibration->At(0)))->GetEntries();
-    entriescalibrationL3=((TH2D*)(fHistoCalibration->At(1)))->GetEntries();
-    entriescalibrationL4=((TH2D*)(fHistoCalibration->At(2)))->GetEntries();
+    entriescalibration1= ((TH1F*)(fHistoCalibration->At(0)))->GetEntries();
+    entriescalibrationL3=((TH2F*)(fHistoCalibration->At(1)))->GetEntries();
+    entriescalibrationL4=((TH2F*)(fHistoCalibration->At(2)))->GetEntries();
   }
   else{ AliWarning("Calibration TObjArray is NULL! No Normalization and calibtaion plot will be filled\n");}
-  if(task==AliQAv1::kRAWS){
-    //   printf("fNevent %d \n",fNEvent);
-    
-    ((TH1F*)fAliITSQADataMakerRec->GetRawsData(10+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(1,fNEvent);
-    
-    if(fNEvent!=0){
-      
-      Double_t entriesmodpattern=((TH1D*)fAliITSQADataMakerRec->GetRawsData(0 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetEntries();
-      Double_t entriesL3=((TH2D*)fAliITSQADataMakerRec->GetRawsData(1 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetEntries();
-      Double_t entriesL4=((TH2D*)fAliITSQADataMakerRec->GetRawsData(2 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetEntries();
-      
-      Double_t normentriesmodpattern=0.; 
-      Double_t normentriesL3= 0.;       
-      Double_t normentriesL4= 0.;     
-      
-      if(entriescalibration1!=0.)normentriesmodpattern=entriesmodpattern/(entriescalibration1*fNEvent);
-      if(entriesL3!=0.)   normentriesL3= entriesL3/(entriescalibrationL3*fNEvent);
-      if(entriesL4!=0.)   normentriesL4= entriesL4/(entriescalibrationL4*fNEvent);
-      
-      ((TH1F*)fAliITSQADataMakerRec->GetRawsData(10+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(2,normentriesmodpattern);
-      ((TH1F*)fAliITSQADataMakerRec->GetRawsData(10+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(3,normentriesL3);
-      ((TH1F*)fAliITSQADataMakerRec->GetRawsData(10+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(4,normentriesL4);
-      
-      if(fHistoCalibration){
-       ((TH1D*)fAliITSQADataMakerRec->GetRawsData(3 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH1D*)fAliITSQADataMakerRec->GetRawsData(0 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH1D*) (fHistoCalibration->At(0))),1.,(Double_t)fNEvent);
-       
-       ((TH2D*)fAliITSQADataMakerRec->GetRawsData(4 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH2D*)fAliITSQADataMakerRec->GetRawsData(1 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH2D*)(fHistoCalibration->At(1))),1.,(Double_t)fNEvent);
-       
-       ((TH2D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH2D*)fAliITSQADataMakerRec->GetRawsData(2 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH2D*)(fHistoCalibration->At(2))),1.,(Double_t)fNEvent);
-      }
-    }    
-    Int_t xbin3 = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(4 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-    Int_t ybin3 = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(4 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-    
-    for(Int_t i=0; i<xbin3; i++) {
-      for(Int_t j=0; j<ybin3; j++) {
-       ((TH1D*)fAliITSQADataMakerRec->GetRawsData(6 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Fill(((TH1D*)fAliITSQADataMakerRec->GetRawsData(4 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetBinContent(i,j));
-      }
-    }
-    
-    Int_t xbin4 = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-    Int_t ybin4 = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-    
-    for(Int_t i=0; i<xbin4; i++) {
-      for(Int_t j=0; j<ybin4; j++) {
-       ((TH1D*)fAliITSQADataMakerRec->GetRawsData(7 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Fill(((TH1D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetBinContent(i,j));
+  //
+  for (int trCl=-1;trCl<fAliITSQADataMakerRec->GetNTrigClasses();trCl++) { // RS Loop over all trigger classes (+ global counter, -1)
+    //
+    if(task==AliQAv1::kRAWS) {
+      TObjArray &harr = *fAliITSQADataMakerRec->GetRawsDataOfTrigClass(trCl);
+      int nEvent = GetNumberOfEvents(AliQAv1::kRAWS,trCl);
+      //         printf("fNevent %d \n",nEvent);
+      TH1* h10 = (TH1*)harr[10+offsRW];
+      if (h10) h10->SetBinContent(1,nEvent);
+      //
+      if(nEvent!=0) {
+       if (h10 && harr[0+offsRW] && harr[1+offsRW] && harr[2]) { // were they all cloned?
+         //
+         Double_t entriesmodpattern = ((TH1*)harr[0+offsRW])->GetEntries();
+         Double_t entriesL3         = ((TH1*)harr[1+offsRW])->GetEntries();
+         Double_t entriesL4         = ((TH1*)harr[2+offsRW])->GetEntries();
+         //      
+         Double_t normentriesmodpattern=0.; 
+         Double_t normentriesL3= 0.;       
+         Double_t normentriesL4= 0.;     
+         
+         if(entriescalibration1!=0.)normentriesmodpattern=entriesmodpattern/(entriescalibration1*nEvent);
+         if(entriesL3!=0.)   normentriesL3= entriesL3/(entriescalibrationL3*nEvent);
+         if(entriesL4!=0.)   normentriesL4= entriesL4/(entriescalibrationL4*nEvent);
+         //
+         h10->SetBinContent(2,normentriesmodpattern);
+         h10->SetBinContent(3,normentriesL3);
+         h10->SetBinContent(4,normentriesL4);
+         //    
+         if(fHistoCalibration){
+           if (harr[3+offsRW] && harr[0+offsRW]) ((TH1*)harr[3+offsRW])->Divide( (TH1*)harr[0+offsRW],((TH1F*)(fHistoCalibration->At(0))),1.,nEvent);
+           if (harr[4+offsRW] && harr[1+offsRW]) ((TH1*)harr[4+offsRW])->Divide( (TH1*)harr[1+offsRW],((TH1F*)(fHistoCalibration->At(1))),1.,nEvent);
+           if (harr[5+offsRW] && harr[2+offsRW]) ((TH1*)harr[5+offsRW])->Divide( (TH1*)harr[2+offsRW],((TH1F*)(fHistoCalibration->At(2))),1.,nEvent);
+         }
+       }         
       }
-    }
-    
-    if(fHistoCalibration){
-      for(Int_t inumb=8;inumb<10;inumb++)
-       {
-         for(Int_t ii=1; ii<fAliITSQADataMakerRec->GetRawsData(inumb + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetNbinsX()+1;ii++)
-           {
-             for(Int_t jj=1; jj<fAliITSQADataMakerRec->GetRawsData(inumb+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetNbinsY()+1;jj++)
-               {
-                 
-                 if(((TH1D*)(fHistoCalibration->At(inumb-7)))->GetBinContent(ii,jj) != 0. )
-                   {
-                     fAliITSQADataMakerRec->GetRawsData(inumb+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->SetBinContent(ii,jj,1);
-                   }
-                 else if(((TH1D*)(fHistoCalibration->At(inumb-7)))->GetBinContent(ii,jj) == 0. )
-                   {
-                     fAliITSQADataMakerRec->GetRawsData(inumb+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->SetBinContent(ii,jj,0);
-                   }   
-                 //printf("%d \t %d \t %d \t %02f \n",inumb,ii,jj,fAliITSQADataMakerRec->GetRawsData(inumb+ fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetBinContent(ii,jj));
-               }//end x axis
-           }//end y axis
+      //
+      TH1* htmp4 = (TH1*)harr[4+offsRW];
+      Int_t xbin3 = htmp4 ? ((TH1*)harr[4+offsRW])->GetNbinsX() : 0;
+      Int_t ybin3 = htmp4 ? ((TH1*)harr[4+offsRW])->GetNbinsY() : 0;
+      //
+      TH1* htmp6 = ((TH1*)harr[6+offsRW]);
+      if (htmp6 && htmp4) for(Int_t i=0; i<xbin3; i++) for(Int_t j=0; j<ybin3; j++) htmp6->Fill(htmp4->GetBinContent(i,j));
+      //
+      TH1* htmp5 = (TH1*)harr[5+offsRW];
+      Int_t xbin4 = htmp5 ? htmp5->GetNbinsX() : 0;
+      Int_t ybin4 = htmp5 ? htmp5->GetNbinsY() : 0;
+      //
+      TH1* htmp7 = (TH1*)harr[7+offsRW];
+      if (htmp7 && htmp5) for(Int_t i=0; i<xbin4; i++) for(Int_t j=0; j<ybin4; j++) htmp7->Fill(htmp5->GetBinContent(i,j));
+      //
+      if(fHistoCalibration){
+       for(Int_t inumb=8;inumb<10;inumb++) {
+         TH1* htmp = (TH1*)harr[inumb + offsRW];
+         if (!htmp) continue;
+         TH1* hcal = (TH1*)fHistoCalibration->At(inumb-7);
+         for(Int_t ii=1; ii<htmp->GetNbinsX()+1;ii++) {
+           for(Int_t jj=1; jj<htmp->GetNbinsY()+1;jj++) {            
+             if( hcal->GetBinContent(ii,jj) != 0. ) htmp->SetBinContent(ii,jj,1);
+             else if( hcal->GetBinContent(ii,jj) == 0. ) htmp->SetBinContent(ii,jj,0);
+           }//end x axis
+         }//end y axis
        }//end for inumb
-    }
-    
-    
-  }//end raws
-  
-  if(task==AliQAv1::kRECPOINTS){
-    
-    
-    Double_t chargeL3=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(0+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMean();
-    Double_t errchargeL3=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(0+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMeanError();
-    
-    Double_t chargeL4=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(1+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMean();
-    Double_t errchargeL4=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(1+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMeanError();
-    
-    
-    Double_t radiusL3=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(13+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMean();
-    Double_t errradiusL3=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(13+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMeanError();
-    
-    Double_t radiusL4=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(14+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMean();
-    Double_t errradiusL4=((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(14+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetMeanError();
-    
-    
-    
-    //   printf("fNeventRP %d \n",fNEventRP);
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(1,fNEventRP);
-    
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(31,chargeL3);
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinError(31,errchargeL3);
-    
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(47,chargeL4);
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinError(47,errchargeL4);
-    
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(32,radiusL3);
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinError(32,errradiusL3);
-    
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(48,radiusL4);
-    ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinError(48,errradiusL4);
-    
-    
-    Double_t entriesmodpattern=((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(6 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetEntries();
-    Double_t entriesL3=((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(7 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetEntries();
-    Double_t entriesL4=((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(8 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetEntries();
+      }
+      //      
+    }//end raws
+    //
+    //
+    if(task==AliQAv1::kRECPOINTS) {
+      //
+      TObjArray &harr = *fAliITSQADataMakerRec->GetRecPointsDataOfTrigClass(trCl);
+      //
+      TH1* htmp0  = (TH1*)harr[0+offsRP];
+      TH1* htmp1  = (TH1*)harr[1+offsRP];
+      TH1* htmp13 = (TH1*)harr[13+offsRP];
+      TH1* htmp14 = (TH1*)harr[14+offsRP];
+      //
+      int nEventRP = GetNumberOfEvents(AliQAv1::kRECPOINTS,trCl);
+      if (htmp0 && htmp1 && htmp13 && htmp14) {
+       Double_t chargeL3    = htmp0->GetMean();
+       Double_t errchargeL3 = htmp0->GetMeanError();
+       //
+       Double_t chargeL4    = htmp1->GetMean();
+       Double_t errchargeL4 = htmp1->GetMeanError();
+       //
+       Double_t radiusL3    = htmp13->GetMean();
+       Double_t errradiusL3 = htmp13->GetMeanError();
+       
+       Double_t radiusL4= htmp14->GetMean();
+       Double_t errradiusL4= htmp14->GetMeanError();
+       //
+       // printf("fNeventRP %d \n",nEventRP);
+       TH1* htmp27 = (TH1*)harr[27+offsRP];
+       if (htmp27) {
+         htmp27->SetBinContent(1,nEventRP);
+         
+         htmp27->SetBinContent(31,chargeL3);
+         htmp27->SetBinError(31,errchargeL3);
+         
+         htmp27->SetBinContent(47,chargeL4);
+         htmp27->SetBinError(47,errchargeL4);
+         
+         htmp27->SetBinContent(32,radiusL3);
+         htmp27->SetBinError(32,errradiusL3);
+         
+         htmp27->SetBinContent(48,radiusL4);
+         htmp27->SetBinError(48,errradiusL4);
+       }
+       //
+       TH1 *htmp6=(TH1*)harr[6+offsRP],*htmp7=(TH1*)harr[7+offsRP],*htmp8=(TH1*)harr[8+offsRP];
+       Double_t entriesmodpattern = htmp6 ? htmp6->GetEntries() : 0;
+       Double_t entriesL3         = htmp7 ? htmp7->GetEntries() : 0;
+       Double_t entriesL4         = htmp8 ? htmp8->GetEntries() : 0;
     
-    //printf("entries modpatternrp = %02f \t L3= %02f \t L4 =%02f \n",entriesmodpattern,entriesL3,entriesL4 );
+       //printf("entries modpatternrp = %02f \t L3= %02f \t L4 =%02f \n",entriesmodpattern,entriesL3,entriesL4 );
     
-    if(fNEventRP!=0){
-      
-      
-      
-      Double_t normentriesmodpattern=0.; 
-      Double_t normentriesL3= 0.;       
-      Double_t normentriesL4= 0.;     
-      
-      if(entriescalibration1!=0.)normentriesmodpattern=entriesmodpattern/(entriescalibration1*fNEventRP);
-      if(entriesL3!=0.)   normentriesL3= entriesL3/(entriescalibrationL3*fNEventRP);
-      if(entriesL4!=0.)   normentriesL4= entriesL4/(entriescalibrationL4*fNEventRP);
-      
-      ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(2,normentriesmodpattern);
-      ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(3,normentriesL3);
-      ((TH1F*)fAliITSQADataMakerRec->GetRecPointsData(27+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->SetBinContent(4,normentriesL4);            
-      
-      // printf("NORM entries modpatternrp = %02f \t L3= %02f \t L4 =%02f \n",normentriesmodpattern,normentriesL3,normentriesL4 );
-      
-      if(fHistoCalibration){
-       ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(9 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(6 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH1D*) (fHistoCalibration->At(0))),1.,(Double_t)fNEventRP);
-       
-       ((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(10+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(7 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH2D*)(fHistoCalibration->At(1))),1.,(Double_t)fNEventRP);
-       
-       ((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(11+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(8 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH2D*)(fHistoCalibration->At(2))),1.,(Double_t)fNEventRP);
+       if(nEventRP!=0) {
+         Double_t normentriesmodpattern=0.; 
+         Double_t normentriesL3= 0.;       
+         Double_t normentriesL4= 0.;     
+         
+         if(entriescalibration1!=0.) normentriesmodpattern=entriesmodpattern/(entriescalibration1*nEventRP);
+         if(entriesL3!=0.)           normentriesL3= entriesL3/(entriescalibrationL3*nEventRP);
+         if(entriesL4!=0.)           normentriesL4= entriesL4/(entriescalibrationL4*nEventRP);
       
-      //  ((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(21+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(7 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH2D*)(fHistoCalibration->At(1))),1.,(Double_t)fNEventRP);
+         if (htmp27) {
+           htmp27->SetBinContent(2,normentriesmodpattern);
+           htmp27->SetBinContent(3,normentriesL3);
+           htmp27->SetBinContent(4,normentriesL4);           
+         }
+         // printf("NORM entries modpatternrp = %02f \t L3= %02f \t L4 =%02f \n",normentriesmodpattern,normentriesL3,normentriesL4 );
       
-      // ((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(22+ fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(8 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]),((TH2D*)(fHistoCalibration->At(2))),1.,(Double_t)fNEventRP);
-      }
-    }
-    Int_t xbin3 = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(10 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-    Int_t ybin3 = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(10 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-    
-    for(Int_t i=0; i<xbin3; i++) {
-      for(Int_t j=0; j<ybin3; j++) {
-       ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(19 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Fill(((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(10 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetBinContent(i,j));
-      }
-    }
-    
-    Int_t xbin4 = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(11 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-    Int_t ybin4 = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(11 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-    
-    for(Int_t i=0; i<xbin4; i++) {
-      for(Int_t j=0; j<ybin4; j++) {
-       ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(20 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Fill(((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(11 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetBinContent(i,j));
-      }
-    }
-    
-    // RecPoints 2 Raws Ratio
-    if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRAWS)==kTRUE)
-      {
-       Int_t xbin3RP = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(21 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-       Int_t ybin3RP = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(21 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-       Int_t xbin3R  = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(4 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-       Int_t ybin3R  = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(4 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-       if((xbin3RP == xbin3R) && (ybin3RP == ybin3R)) {
-         ((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(21 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide(((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(10 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])),((TH2D*)fAliITSQADataMakerRec->GetRawsData(4 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])));
-         for(Int_t i=0; i<xbin3R; i++) {
-           for(Int_t j=0; j<ybin3R; j++) {
-             ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(23 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Fill(((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(21 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetBinContent(i,j));
-           }
+         if(fHistoCalibration) {
+           if (harr[9 +offsRP] && htmp6) ((TH1*)harr[9 +offsRP])->Divide(htmp6, (TH1*)fHistoCalibration->At(0),nEventRP);
+           if (harr[10+offsRP] && htmp7) ((TH1*)harr[10+offsRP])->Divide(htmp7, (TH1*)fHistoCalibration->At(1),nEventRP);
+           if (harr[11+offsRP] && htmp8) ((TH1*)harr[11+offsRP])->Divide(htmp8, (TH1*)fHistoCalibration->At(2),nEventRP);
+           //if (harr[21+offsRP] && htmp7) ((TH1*)harr[21+offsRP])->Divide(htmp7, (TH1*)fHistoCalibration->At(1),nEventRP);
+           //if (harr[22+offsRP] && htmp8) ((TH1*)harr[22+offsRP])->Divide(htmp8, (TH1*)fHistoCalibration->At(2),nEventRP);
          }
-       } else 
-         AliWarning("Number of bins for Raws and RecPoints (Layer 3) do not match\n");
-       
-       Int_t xbin4RP = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(22 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-       Int_t ybin4RP = ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(22 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-       Int_t xbin4R = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsX();
-       Int_t ybin4R = ((TH1D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetNbinsY();
-       if((xbin4RP == xbin4R) && (ybin4RP == ybin4R)) {
-         ((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(22 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide(((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(11 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])),((TH2D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])));
-         //                  ((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(22 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Divide(((TH2D*)fAliITSQADataMakerRec->GetRawsData(5 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])));
-         for(Int_t i=0; i<xbin4R; i++) {
-           for(Int_t j=0; j<ybin4R; j++) {
-             ((TH1D*)fAliITSQADataMakerRec->GetRecPointsData(24 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->Fill(((TH2D*)fAliITSQADataMakerRec->GetRecPointsData(22 + fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]))->GetBinContent(i,j));
-           }
+       }
+       TH1* htmp10 = (TH1*)harr[10+offsRP];
+       Int_t xbin3 = htmp10 ? htmp10->GetNbinsX() : 0;
+       Int_t ybin3 = htmp10 ? htmp10->GetNbinsY() : 0;
+       //
+       TH1* htmp19 = (TH1*)harr[19+offsRP];    
+       if (htmp19&&htmp10) for(Int_t i=0; i<xbin3; i++) for(Int_t j=0; j<ybin3; j++) htmp19->Fill(htmp10->GetBinContent(i,j));
+       //
+       TH1* htmp11 = (TH1*)harr[11+offsRP];
+       Int_t xbin4 = htmp11 ? htmp11->GetNbinsX() : 0;
+       Int_t ybin4 = htmp11 ? htmp11->GetNbinsY() : 0;
+       //
+       TH1* htmp20 = (TH1*)harr[20+offsRP];
+       if (htmp11&&htmp20) for(Int_t i=0; i<xbin4; i++) for(Int_t j=0; j<ybin4; j++) htmp20->Fill(htmp11->GetBinContent(i,j));
+      }
+      //
+      
+      // RecPoints 2 Raws Ratio
+      if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRAWS)==kTRUE) {
+       //
+       TH1* htmp21  = (TH1*)harr[21+offsRP];
+       TH1* htmp23  = (TH1*)harr[23+offsRP];
+       TH1* htmp10  = (TH1*)harr[10+offsRP];
+       TH1* htmp4rw =  fAliITSQADataMakerRec->GetRawsData(4 + offsRW,trCl);
+       if (htmp21 && htmp23 && htmp10 && htmp4rw) {
+         Int_t xbin3RP = htmp21->GetNbinsX();
+         Int_t ybin3RP = htmp21->GetNbinsY();
+         Int_t xbin3R  = htmp4rw->GetNbinsX();
+         Int_t ybin3R  = htmp4rw->GetNbinsY();
+         if((xbin3RP == xbin3R) && (ybin3RP == ybin3R)) {
+           htmp21->Divide(htmp10,htmp4rw);
+           for(Int_t i=0; i<xbin3R; i++) for(Int_t j=0; j<ybin3R; j++) htmp23->Fill(htmp21->GetBinContent(i,j));
          }
-       } else 
-         AliWarning("Number of bins for Raws and RecPoints (Layer 4) do not match\n");
+         else AliWarning("Number of bins for Raws and RecPoints (Layer 3) do not match\n");
+       }
+       //
+       TH1* htmp22  = (TH1*)harr[22+offsRP];
+       TH1* htmp24  = (TH1*)harr[24+offsRP];
+       TH1* htmp11  = (TH1*)harr[11+offsRP];
+       TH1* htmp5rw =  fAliITSQADataMakerRec->GetRawsData(5 + offsRW,trCl);
+       if (htmp22 && htmp24 && htmp11 && htmp5rw) {
+         Int_t xbin4RP = htmp22->GetNbinsX();
+         Int_t ybin4RP = htmp22->GetNbinsY();
+         Int_t xbin4R  = htmp5rw->GetNbinsX();
+         Int_t ybin4R  = htmp5rw->GetNbinsY();
+         if((xbin4RP == xbin4R) && (ybin4RP == ybin4R)) {
+           htmp22->Divide(htmp11,htmp5rw);
+           for(Int_t i=0; i<xbin4R; i++) for(Int_t j=0; j<ybin4R; j++) htmp24->Fill(htmp22->GetBinContent(i,j));
+         } 
+         else AliWarning("Number of bins for Raws and RecPoints (Layer 4) do not match\n");
+       }
       }
-    else{AliWarning("Ratio between RecPoints and Raws not executed because the raw list has not been created\n");}
-  }//end recpoints
-  
+      else{AliWarning("Ratio between RecPoints and Raws not executed because the raw list has not been created\n");}
+    }//end recpoints
+    //
+  } // RS Loop over all trigger classes (+ global counter, -1)
+  //
 }
 
 //____________________________________________________________________________ 
@@ -414,37 +412,37 @@ Int_t AliITSQASDDDataMakerRec::InitRaws()
   Int_t lay, lad, det;
   Int_t indexlast = 0;
   Int_t index1 = 0;
-
-       fSDDhRawsTask = 0;
-       if(fkOnline){AliInfo("Book Online Histograms for SDD\n");}
+  int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
+  fSDDhRawsTask = 0;
+  if(fkOnline){AliInfo("Book Online Histograms for SDD\n");}
   else {AliInfo("Book Offline Histograms for SDD\n ");}
-  TH1D *h0 = new TH1D("SDDModPattern","HW Modules pattern",fgknSDDmodules,239.5,499.5); //0
+  TH1F *h0 = new TH1F("SDDModPattern","HW Modules pattern",fgknSDDmodules,239.5,499.5); //0
   h0->GetXaxis()->SetTitle("Module Number");
   h0->GetYaxis()->SetTitle("Counts");
   h0->SetOption("bar1");
   h0->SetBarOffset(0.01);
   h0->SetBarWidth(0.95);
   h0->SetFillColor(45);
-  rv = fAliITSQADataMakerRec->Add2RawsList(h0,0+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr);
+  rv = fAliITSQADataMakerRec->Add2RawsList(h0,0+offsRW, expert, !image, !saveCorr);
   fSDDhRawsTask++;
   
   //zPhi distribution using ladder and modules numbers
-  TH2D *hphil3 = new TH2D("SDDphizL3","SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);//1
+  TH2F *hphil3 = new TH2F("SDDphizL3","SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);//1
   hphil3->GetXaxis()->SetTitle("z[Module Number L3 ]");
   hphil3->GetYaxis()->SetTitle("#varphi[ Ladder Number L3]");
   hphil3->SetStats(0);
-  rv = fAliITSQADataMakerRec->Add2RawsList(hphil3,1+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image, !saveCorr); 
+  rv = fAliITSQADataMakerRec->Add2RawsList(hphil3,1+offsRW, !expert, image, !saveCorr); 
   fSDDhRawsTask++;
   
-  TH2D *hphil4 = new TH2D("SDDphizL4","SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5); //2
+  TH2F *hphil4 = new TH2F("SDDphizL4","SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5); //2
   hphil4->GetXaxis()->SetTitle("z[Module Number L4]");
   hphil4->GetYaxis()->SetTitle("#varphi[Ladder Number L4]");
   hphil4->SetStats(0);
-   rv = fAliITSQADataMakerRec->Add2RawsList(hphil4,2+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image, !saveCorr); 
+   rv = fAliITSQADataMakerRec->Add2RawsList(hphil4,2+offsRW, !expert, image, !saveCorr); 
   fSDDhRawsTask++;
   
   //normalized histograms
-  TH1D *h0norm = new TH1D("SDDModPatternNORM","NORM HW Modules pattern",fgknSDDmodules,239.5,499.5); //3
+  TH1F *h0norm = new TH1F("SDDModPatternNORM","NORM HW Modules pattern",fgknSDDmodules,239.5,499.5); //3
   h0norm->GetXaxis()->SetTitle("Module Number");
   h0norm->GetYaxis()->SetTitle("Counts");
   h0norm->SetOption("bar1");
@@ -452,50 +450,50 @@ Int_t AliITSQASDDDataMakerRec::InitRaws()
   h0norm->SetBarWidth(0.95);
   h0norm->SetFillColor(46);
   //h0norm->SetStats(0);
-  rv = fAliITSQADataMakerRec->Add2RawsList(h0norm,3+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr);
+  rv = fAliITSQADataMakerRec->Add2RawsList(h0norm,3+offsRW, expert, !image, !saveCorr);
   fSDDhRawsTask++;
   
   //zPhi distribution using ladder and modules numbers
-  TH2D *hphil3norm = new TH2D("SDDphizL3NORM","NORM SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);//4
+  TH2F *hphil3norm = new TH2F("SDDphizL3NORM","NORM SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);//4
   hphil3norm->GetXaxis()->SetTitle("z[Module Number L3 ]");
   hphil3norm->GetYaxis()->SetTitle("#varphi[ Ladder Number L3]");
   hphil3norm->SetStats(0);
-  rv = fAliITSQADataMakerRec->Add2RawsList(hphil3norm,4+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr); 
+  rv = fAliITSQADataMakerRec->Add2RawsList(hphil3norm,4+offsRW, expert, !image, !saveCorr); 
   fSDDhRawsTask++;
   
-  TH2D *hphil4norm = new TH2D("SDDphizL4NORM","NORM SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5); //5
+  TH2F *hphil4norm = new TH2F("SDDphizL4NORM","NORM SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5); //5
   hphil4norm->GetXaxis()->SetTitle("z[Module Number L4]");
   hphil4norm->GetYaxis()->SetTitle("#varphi[Ladder Number L4]");
   hphil4norm->SetStats(0);
-  rv = fAliITSQADataMakerRec->Add2RawsList(hphil4norm,5+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr); 
+  rv = fAliITSQADataMakerRec->Add2RawsList(hphil4norm,5+offsRW, expert, !image, !saveCorr); 
   fSDDhRawsTask++;
 
        
   Float_t hMax = 0.2;
   
   TH1F *oL3 = new TH1F("SDDL3_RelativeOccupancy","Layer 3 Relative Occupancy",200,0.,hMax);
-  rv = fAliITSQADataMakerRec->Add2RawsList(oL3,6+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr); //6  
+  rv = fAliITSQADataMakerRec->Add2RawsList(oL3,6+offsRW, expert, !image, !saveCorr); //6  
   fSDDhRawsTask++;
   
   TH1F *oL4 = new TH1F("SDDL4_RelativeOccupancy","Layer 4 Relative Occupancy",200,0.,hMax);
-  rv = fAliITSQADataMakerRec->Add2RawsList(oL4,7+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr); //7   
+  rv = fAliITSQADataMakerRec->Add2RawsList(oL4,7+offsRW, expert, !image, !saveCorr); //7   
   fSDDhRawsTask++;
   
   //zPhi distribution using ladder and modules numbers
-  TH2D *hcalibl3 = new TH2D("SDDphizCalibL3","SDDCalibL3 ",12,0.5,6.5,14,0.5,14.5);//8
+  TH2F *hcalibl3 = new TH2F("SDDphizCalibL3","SDDCalibL3 ",12,0.5,6.5,14,0.5,14.5);//8
   hcalibl3->GetXaxis()->SetTitle("z[Module Number L3]");
   hcalibl3->GetYaxis()->SetTitle("#varphi[ Ladder Number L3]");
   hcalibl3->SetStats(0);
   hcalibl3->SetMaximum(2);
-  rv = fAliITSQADataMakerRec->Add2RawsList(hcalibl3,8+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image, !saveCorr); 
+  rv = fAliITSQADataMakerRec->Add2RawsList(hcalibl3,8+offsRW, !expert, image, !saveCorr); 
   fSDDhRawsTask++;
   
-  TH2D *hcalibl4 = new TH2D("SDDphizCalibL4","SDDCalibL4 ",16,0.5,8.5,22,0.5,22.5); //9
+  TH2F *hcalibl4 = new TH2F("SDDphizCalibL4","SDDCalibL4 ",16,0.5,8.5,22,0.5,22.5); //9
   hcalibl4->GetXaxis()->SetTitle("z[Module Number L4]");
   hcalibl4->GetYaxis()->SetTitle("#varphi[Ladder Number L4]");
   hcalibl4->SetStats(0);
   hcalibl4->SetMaximum(2);
-  rv = fAliITSQADataMakerRec->Add2RawsList(hcalibl4,9+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image, !saveCorr); 
+  rv = fAliITSQADataMakerRec->Add2RawsList(hcalibl4,9+offsRW, !expert, image, !saveCorr); 
   fSDDhRawsTask++;
 
   TH1F *hsummarydata = new TH1F("SDDRawDataCheck","SDDRawDataCheck",46,-0.5,45.5);//10 summary of raw data checks
@@ -573,17 +571,17 @@ Int_t AliITSQASDDDataMakerRec::InitRaws()
   hsummarydata->GetXaxis()->SetBinLabel(46,"dr_overthl4");
   hsummarydata->GetXaxis()->LabelsOption("v");
 
-  rv = fAliITSQADataMakerRec->Add2RawsList(hsummarydata,10+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr); 
+  rv = fAliITSQADataMakerRec->Add2RawsList(hsummarydata,10+offsRW, expert, !image, !saveCorr); 
   fSDDhRawsTask++;
   fOnlineOffsetRaws = fSDDhRawsTask;
 
   //online part
   if(fkOnline){
       //DDL Pattern 
-    TH2D *hddl = new TH2D("SDDDDLPattern","SDD DDL Pattern ",24,-0.5,11.5,24,-0.5,23.5); //11
+    TH2F *hddl = new TH2F("SDDDDLPattern","SDD DDL Pattern ",24,-0.5,11.5,24,-0.5,23.5); //11
     hddl->GetXaxis()->SetTitle("Channel");
     hddl->GetYaxis()->SetTitle("DDL Number");
-    rv = fAliITSQADataMakerRec->Add2RawsList(hddl,fOnlineOffsetRaws+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr);
+    rv = fAliITSQADataMakerRec->Add2RawsList(hddl,fOnlineOffsetRaws+offsRW, expert, !image, !saveCorr);
     fSDDhRawsTask++;
     Int_t indexlast1 = 0;
     
@@ -597,7 +595,7 @@ Int_t AliITSQASDDDataMakerRec::InitRaws()
        TProfile2D *fModuleChargeMapFSE = new TProfile2D(Form("SDDchargeMapFSE_L%d_%d_%d_%d",lay,lad,det,iside),Form("SDDChargeMapForSingleEvent_L%d_%d_%d_%d",lay,lad,det,iside)  ,256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
        fModuleChargeMapFSE->GetXaxis()->SetTitle("Time Bin");
        fModuleChargeMapFSE->GetYaxis()->SetTitle("Anode");
-       rv = fAliITSQADataMakerRec->Add2RawsList(fModuleChargeMapFSE,indexlast1 + index1 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr);   
+       rv = fAliITSQADataMakerRec->Add2RawsList(fModuleChargeMapFSE,indexlast1 + index1 + offsRW, expert, !image, !saveCorr);    
        fSDDhRawsTask++;
        index1++;        
       }
@@ -609,7 +607,7 @@ Int_t AliITSQASDDDataMakerRec::InitRaws()
        TProfile2D *fModuleChargeMap = new TProfile2D(Form("SDDchargeMap_L%d_%d_%d_%d",lay,lad,det,iside),Form("SDDChargeMap_L%d_%d_%d_%d",lay,lad,det,iside),256/fTimeBinSize,-0.5,255.5,256,-0.5,255.5);
        fModuleChargeMap->GetXaxis()->SetTitle("Time Bin");
        fModuleChargeMap->GetYaxis()->SetTitle("Anode Number");
-       rv = fAliITSQADataMakerRec->Add2RawsList(fModuleChargeMap,indexlast1 + index1 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr); 
+       rv = fAliITSQADataMakerRec->Add2RawsList(fModuleChargeMap,indexlast1 + index1 + offsRW, expert, !image, !saveCorr); 
        fSDDhRawsTask++;
        index1++;        
       }
@@ -620,7 +618,7 @@ Int_t AliITSQASDDDataMakerRec::InitRaws()
     hsize->SetBit(TH1::kCanRebin);
     hsize->GetXaxis()->SetTitle("Event Size [kB]");
     hsize->GetYaxis()->SetTitle("Entries");
-    rv = fAliITSQADataMakerRec->Add2RawsList(hsize,indexlast1 + index1 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image, !saveCorr); 
+    rv = fAliITSQADataMakerRec->Add2RawsList(hsize,indexlast1 + index1 + offsRW, expert, !image, !saveCorr); 
     fSDDhRawsTask++;
     
   }  // kONLINE
@@ -628,6 +626,7 @@ Int_t AliITSQASDDDataMakerRec::InitRaws()
   cout << fSDDhRawsTask << " SDD Raws histograms booked" << endl;
   
   AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Raws histograms booked\n",fSDDhRawsTask));
+  //
   return rv ; 
 }
 
@@ -637,8 +636,8 @@ Int_t AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
 { 
   // Fill QA for RAW - SDD -
   Int_t rv = 0;
+  int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
   // Check id histograms already created for this Event Specie
-  fNEvent++;
   if(!fDDLModuleMap){CreateTheMap();}
   if(rawReader->GetType() != 7) return rv;  // skips non physical triggers
   AliDebug(AliQAv1::GetQADebugLevel(),"entering MakeRaws\n");                 
@@ -653,7 +652,7 @@ Int_t AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
   if(fkOnline) {
     for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
       for(Int_t iside=0;iside<fgknSide;iside++) {
-               if(fSDDhRawsTask > fOnlineOffsetRaws + 1 + index) fAliITSQADataMakerRec->GetRawsData(fOnlineOffsetRaws + 1 + index +fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();   
+       if(fSDDhRawsTask > fOnlineOffsetRaws + 1 + index) fAliITSQADataMakerRec->ResetRawsData(fOnlineOffsetRaws + 1 + index +offsRW);   
        // 4  because the 2D histos for single events start after the fourth position
        index++;
       }
@@ -715,15 +714,15 @@ Int_t AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
     Short_t iside = stream->GetChannel();
 
     //printf(" \n%i %i %i %i \n ",lay, lad, det,iside );
-    fAliITSQADataMakerRec->GetRawsData( 0 + fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()] )->Fill(isddmod);   
-    if(lay==3) fAliITSQADataMakerRec->GetRawsData(1+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(det+0.5*iside-0.25,lad); //phiz l3 not norm
-    if(lay==4) fAliITSQADataMakerRec->GetRawsData(2+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(det+0.5*iside-0.25,lad); //phiz l4 not norm
+    fAliITSQADataMakerRec->FillRawsData( 0 + offsRW,isddmod);   
+    if(lay==3) fAliITSQADataMakerRec->FillRawsData(1+offsRW,det+0.5*iside-0.25,lad); //phiz l3 not norm
+    if(lay==4) fAliITSQADataMakerRec->FillRawsData(2+offsRW,det+0.5*iside-0.25,lad); //phiz l4 not norm
  
     if(fkOnline) {
 
-      fAliITSQADataMakerRec->GetRawsData(fOnlineOffsetRaws+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill((stream->GetCarlosId())+0.5*iside -0.5,iddl);
-      //  printf("content ddlmap %d, %d = %f \n",(stream->GetCarlosId()+0.5*iside -0.5),iddl,fAliITSQADataMakerRec->GetRawsData(3+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetBinContent(1+(det-1)*2;lad));
-      //printf("content ddlmap %d, %d = %f \n",(stream->GetCarlosId())+0.5*iside -0.5,iddl,fAliITSQADataMakerRec->GetRawsData(3+fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetBinContent(1+(stream->GetCarlosId()-1)*2,iddl));
+      fAliITSQADataMakerRec->FillRawsData(fOnlineOffsetRaws+offsRW, (stream->GetCarlosId())+0.5*iside -0.5,iddl);
+      //  printf("content ddlmap %d, %d = %f \n",(stream->GetCarlosId()+0.5*iside -0.5),iddl,fAliITSQADataMakerRec->GetRawsData(3+offsRW)->GetBinContent(1+(det-1)*2;lad));
+      //printf("content ddlmap %d, %d = %f \n",(stream->GetCarlosId())+0.5*iside -0.5,iddl,fAliITSQADataMakerRec->GetRawsData(3+offsRW)->GetBinContent(1+(stream->GetCarlosId()-1)*2,iddl));
       activeModule = moduleSDD;
       index1 = activeModule * 2 + iside;
       
@@ -733,14 +732,15 @@ Int_t AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
       }      
 
       if(fSDDhRawsTask > fOnlineOffsetRaws +1 + index1) {                                  
-        ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(fOnlineOffsetRaws +1 + index1 +fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])))->Fill(coord2, coord1, signal);     
-        ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(fOnlineOffsetRaws +1 + index1 + 260*2 +fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])))->Fill(coord2, coord1, signal); 
+        fAliITSQADataMakerRec->FillRawsData(fOnlineOffsetRaws +1 + index1 +offsRW        , coord2, coord1, signal);     
+        fAliITSQADataMakerRec->FillRawsData(fOnlineOffsetRaws +1 + index1 + 260*2 +offsRW, coord2, coord1, signal); 
       }
     }//online
     cnt++;
     if(!(cnt%10000)) AliDebug(AliQAv1::GetQADebugLevel(),Form(" %d raw digits read",cnt));
   }//end next()
-  if(fkOnline){((TH1F*)(fAliITSQADataMakerRec->GetRawsData(fOnlineOffsetRaws +1 + 260*4 +fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()])))->Fill(size/1024.);//KB
+  if(fkOnline){
+    fAliITSQADataMakerRec->FillRawsData(fOnlineOffsetRaws +1 + 260*4 +offsRW,size/1024.);//KB
   }
        
   AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",cnt)); 
@@ -754,6 +754,7 @@ Int_t AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
 
   delete []ddldata;
   ddldata=NULL;
+  //
   return rv ; 
 }
 
@@ -765,33 +766,35 @@ Int_t AliITSQASDDDataMakerRec::InitDigits()
   const Bool_t expert   = kTRUE ; 
   const Bool_t image    = kTRUE ;
   Int_t rv = 0 ; 
+  int offsD = fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
 //  fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
   //fSDDhTask must be incremented by one unit every time a histogram is ADDED to the QA List
   TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5);       //hmod
   h0->GetXaxis()->SetTitle("SDD Module Number");
   h0->GetYaxis()->SetTitle("# DIGITS");
-  rv = fAliITSQADataMakerRec->Add2DigitsList(h0,fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
+  rv = fAliITSQADataMakerRec->Add2DigitsList(h0,offsD, !expert, image);
   fSDDhDigitsTask ++;
-  // printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetName() , fSDDhDigitsTask );
+  // printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(offsD)->GetName() , fSDDhDigitsTask );
   TH1F* h1=new TH1F("SDD Anode Distribution","DIGITS Anode Distribution",512,-0.5,511.5);      //hanocc
   h1->GetXaxis()->SetTitle("Anode Number");
   h1->GetYaxis()->SetTitle("# DIGITS");
-  rv = fAliITSQADataMakerRec->Add2DigitsList(h1,1+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
+  rv = fAliITSQADataMakerRec->Add2DigitsList(h1,1+offsD, !expert, image);
   fSDDhDigitsTask ++;
-  //printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(1+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetName() , fSDDhDigitsTask );
+  //printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(1+offsD)->GetName() , fSDDhDigitsTask );
   TH1F* h2=new TH1F("SDD Tbin Distribution","DIGITS Tbin Distribution",256,-0.5,255.5);      //htbocc
   h2->GetXaxis()->SetTitle("Tbin Number");
   h2->GetYaxis()->SetTitle("# DIGITS");
-  rv = fAliITSQADataMakerRec->Add2DigitsList(h2,2+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
+  rv = fAliITSQADataMakerRec->Add2DigitsList(h2,2+offsD, !expert, image);
   fSDDhDigitsTask ++;
-  //printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(2+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetName() , fSDDhDigitsTask );
+  //printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(2+offsD)->GetName() , fSDDhDigitsTask );
   TH1F* h3=new TH1F("SDD ADC Counts Distribution","DIGITS ADC Counts Distribution",200,0.,1024.);          //hsig
   h3->GetXaxis()->SetTitle("ADC Value");
   h3->GetYaxis()->SetTitle("# DIGITS");
-  rv = fAliITSQADataMakerRec->Add2DigitsList(h3,3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
+  rv = fAliITSQADataMakerRec->Add2DigitsList(h3,3+offsD, !expert, image);
   fSDDhDigitsTask ++;
-  //printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->GetName() , fSDDhDigitsTask );
+  //printf("Add %s \t the task offset is %i\n",fAliITSQADataMakerRec->GetDigitsData(3+offsD)->GetName() , fSDDhDigitsTask );
   AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Digits histograms booked\n",fSDDhDigitsTask));
+  //
   return rv ; 
 }
 
@@ -804,9 +807,8 @@ Int_t AliITSQASDDDataMakerRec::MakeDigits(TTree * digits)
   //fITS->SetTreeAddress();
   //TClonesArray *iITSdigits  = fITS->DigitsAddress(1);
 
-
   Int_t rv = 0 ; 
-
+  int offsD = fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
   TBranch *branchD = digits->GetBranch("ITSDigitsSDD");
 
   if (!branchD) {
@@ -825,18 +827,19 @@ Int_t AliITSQASDDDataMakerRec::MakeDigits(TTree * digits)
     Int_t nmod=i+240;
     digits->GetEvent(nmod);
     Int_t ndigits = iITSdigits->GetEntries();
-    fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nmod,ndigits);
+    fAliITSQADataMakerRec->FillDigitsData(offsD,nmod,ndigits);
 
     for (Int_t idig=0; idig<ndigits; idig++) {
       AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
       Int_t iz=dig->GetCoord1();  // cell number z
       Int_t ix=dig->GetCoord2();  // cell number x
       Int_t sig=dig->GetSignal();
-      fAliITSQADataMakerRec->GetDigitsData(1+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(iz);
-      fAliITSQADataMakerRec->GetDigitsData(2+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(ix);
-      fAliITSQADataMakerRec->GetDigitsData(3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(sig);
+      fAliITSQADataMakerRec->FillDigitsData(1+offsD,iz);
+      fAliITSQADataMakerRec->FillDigitsData(2+offsD,ix);
+      fAliITSQADataMakerRec->FillDigitsData(3+offsD,sig);
     }
   }
+  //
   return rv ; 
 }
 
@@ -849,95 +852,96 @@ Int_t AliITSQASDDDataMakerRec::InitRecPoints()
   const Bool_t expert   = kTRUE ; 
   const Bool_t image    = kTRUE ; 
   Int_t rv = 0 ; 
+  int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
 //  fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
 
   //AliInfo(Form("fAliITSQADataMakerRec->GetEventSpecie() %d\n",fAliITSQADataMakerRec->GetEventSpecie()));
-  //AliInfo(Form("fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()] %d\n",fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]));
+  //AliInfo(Form("offsRP %d\n",offsRP));
   TH1F *h0 = new TH1F("SDDLay3TotCh","Layer 3 total charge",250,-0.5, 499.5); //position number 0
   //h0->SetBit(TH1::kCanRebin);
   h0->GetXaxis()->SetTitle("KeV");
   h0->GetYaxis()->SetTitle("Entries");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h0, 0 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);//NON expert image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h0, 0 +offsRP, !expert, image);//NON expert image
   fSDDhRecPointsTask++;
  
   TH1F *h1 = new TH1F("SDDLay4TotCh","Layer 4 total charge",250,-0.5, 499.5);//position number 1
   //h1->SetBit(TH1::kCanRebin);
   h1->GetXaxis()->SetTitle("Kev");
   h1->GetYaxis()->SetTitle("Entries");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h1, 1 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);//NON expert image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h1, 1 +offsRP, !expert, image);//NON expert image
   fSDDhRecPointsTask++;
 
   TH2F *h2 = new TH2F("SDDGlobalCoordDistribYX","YX Global Coord Distrib",56,-28,28,56,-28,28);//position number 2
   h2->GetYaxis()->SetTitle("Y[cm]");
   h2->GetXaxis()->SetTitle("X[cm]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h2,2+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);// NON expert image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h2,2+offsRP, !expert, image);// NON expert image
   fSDDhRecPointsTask++;
 
   TH2F *h3 = new TH2F("SDDGlobalCoordDistribRZ","RZ Global Coord Distrib",128,-32,32,56,12,26);//position number 3
   h3->GetYaxis()->SetTitle("R[cm]");
   h3->GetXaxis()->SetTitle("Z[cm]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h3,3+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);// NON expert image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h3,3+offsRP, !expert, image);// NON expert image
   fSDDhRecPointsTask++;
   
   TH2F *h4 = new TH2F("SDDGlobalCoordDistribL3PHIZ","#varphi Z Global Coord Distrib L3",96,-23,23,112,-TMath::Pi(),TMath::Pi());//position number 4
   h4->GetYaxis()->SetTitle("#phi[rad]");
   h4->GetXaxis()->SetTitle("Z[cm]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h4,4+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);//NON expert image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h4,4+offsRP, !expert, image);//NON expert image
   fSDDhRecPointsTask++;
 
   TH2F *h5 = new TH2F("SDDGlobalCoordDistribL4PHIZ","#varphi Z Global Coord Distrib L4",128,-31,31,176,-TMath::Pi(),TMath::Pi());//position number 5
   h5->GetYaxis()->SetTitle("#phi[rad]");
   h5->GetXaxis()->SetTitle("Z[cm]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h5,5+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);//NON expert image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h5,5+offsRP, !expert, image);//NON expert image
   fSDDhRecPointsTask++;
   
-  TH1D *h6 = new TH1D("SDDModPatternRP","Modules pattern RP",fgknSDDmodules,239.5,499.5); //position number 6
+  TH1F *h6 = new TH1F("SDDModPatternRP","Modules pattern RP",fgknSDDmodules,239.5,499.5); //position number 6
   h6->GetXaxis()->SetTitle("Module number"); //spd offset = 240
   h6->GetYaxis()->SetTitle("Entries");
   h6->SetOption("bar1");
   h6->SetBarOffset(0.01);
   h6->SetBarWidth(0.95);
   h6->SetFillColor(39);
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h6,6 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h6,6 +offsRP, expert, !image);// expert NO image
   fSDDhRecPointsTask++;
 
   
-  TH2D *h7 = new TH2D("SDDModPatternL3RP","Modules pattern L3 RP",12,0.5,6.5,14,0.5,14.5);  //position number 7
+  TH2F *h7 = new TH2F("SDDModPatternL3RP","Modules pattern L3 RP",12,0.5,6.5,14,0.5,14.5);  //position number 7
   h7->GetXaxis()->SetTitle("z[#Module L3 ]");
   h7->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h7,7 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h7,7 +offsRP, expert, !image);// expert NO image
   fSDDhRecPointsTask++;
 
-  TH2D *h8 = new TH2D("SDDModPatternL4RP","Modules pattern L4 RP",16,0.5,8.5,22,0.5,22.5); //position number 8
+  TH2F *h8 = new TH2F("SDDModPatternL4RP","Modules pattern L4 RP",16,0.5,8.5,22,0.5,22.5); //position number 8
   h8->GetXaxis()->SetTitle("[#Module L3 ]");
   h8->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h8,8 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h8,8 +offsRP, expert, !image);// expert NO image
   fSDDhRecPointsTask++;
 
   //------------------------norm--------------------------//
 
 
-  TH1D *h9 = new TH1D("SDDModPatternRPNORM","Modules pattern RP NORM",fgknSDDmodules,239.5,499.5); //position number 9
+  TH1F *h9 = new TH1F("SDDModPatternRPNORM","Modules pattern RP NORM",fgknSDDmodules,239.5,499.5); //position number 9
   h9->GetXaxis()->SetTitle("Module number"); //spd offset = 240
   h9->GetYaxis()->SetTitle("Entries");
   h9->SetOption("bar1");
   h9->SetBarOffset(0.01);
   h9->SetBarWidth(0.95);
   h9->SetFillColor(49);
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h9,9 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h9,9 +offsRP, expert, !image);// expert NO image
   fSDDhRecPointsTask++;
 
   
-  TH2D *h10 = new TH2D("SDDModPatternL3RPNORM","Modules pattern L3 RP NORM",12,0.5,6.5,14,0.5,14.5);  //position number 10
+  TH2F *h10 = new TH2F("SDDModPatternL3RPNORM","Modules pattern L3 RP NORM",12,0.5,6.5,14,0.5,14.5);  //position number 10
   h10->GetXaxis()->SetTitle("z[#Module L3 ]");
   h10->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h10,10 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO  image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h10,10 +offsRP, expert, !image);// expert NO  image
   fSDDhRecPointsTask++;
 
-  TH2D *h11 = new TH2D("SDDModPatternL4RPNORM","Modules pattern L4 RP NORM",16,0.5,8.5,22,0.5,22.5); //position number 11
+  TH2F *h11 = new TH2F("SDDModPatternL4RPNORM","Modules pattern L4 RP NORM",16,0.5,8.5,22,0.5,22.5); //position number 11
   h11->GetXaxis()->SetTitle("[#Module L4 ]");
   h10->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h11,11 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);//  expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h11,11 +offsRP, expert, !image);//  expert NO image
   fSDDhRecPointsTask++;
 
   //--------------------------------------------------------//
@@ -945,7 +949,7 @@ Int_t AliITSQASDDDataMakerRec::InitRecPoints()
   TH2F *h12 = new TH2F("SDDLocalCoordDistrib","Local Coord Distrib",160,-4,4,160,-4,4);//position number 12
   h12->GetXaxis()->SetTitle("X local coord, drift, cm");
   h12->GetYaxis()->SetTitle("Z local coord, anode, cm");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h12,12 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);//  expert  NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h12,12 +offsRP, expert, !image);//  expert  NO image
   fSDDhRecPointsTask++;
   
   //AliInfo("Create SDD recpoints histos\n");
@@ -955,7 +959,7 @@ Int_t AliITSQASDDDataMakerRec::InitRecPoints()
   h13->GetXaxis()->SetTitle("r[cm]");
   h13->GetXaxis()->CenterTitle();
   h13->GetYaxis()->SetTitle("Entries");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h13,13 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h13,13 +offsRP, expert, !image);// expert NO image
   fSDDhRecPointsTask++;
   
   TH1F *h14 = new TH1F("SDDrdistrib_Layer4" ,"SDD r distribution Layer4" ,100,23.,25.);// and position number 14 (L4)
@@ -963,7 +967,7 @@ Int_t AliITSQASDDDataMakerRec::InitRecPoints()
   h14->GetXaxis()->SetTitle("r[cm]");
   h14->GetXaxis()->CenterTitle();
   h14->GetYaxis()->SetTitle("Entries");
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(h14,14 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(h14,14 +offsRP, expert, !image);// expert NO image
   fSDDhRecPointsTask++;
   
   for(Int_t iLay=0; iLay<=1; iLay++){
@@ -971,7 +975,7 @@ Int_t AliITSQASDDDataMakerRec::InitRecPoints()
     h15->GetXaxis()->SetTitle("#varphi[rad]");
     h15->GetXaxis()->CenterTitle();
     h15->GetYaxis()->SetTitle("Entries");
-    rv = fAliITSQADataMakerRec->Add2RecPointsList(h15,iLay+15+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+    rv = fAliITSQADataMakerRec->Add2RecPointsList(h15,iLay+15+offsRP, expert, !image);// expert NO image
     fSDDhRecPointsTask++;
   }
   
@@ -981,48 +985,48 @@ Int_t AliITSQASDDDataMakerRec::InitRecPoints()
     h17->GetXaxis()->SetTitle("drift time[ns]");
     h17->GetXaxis()->CenterTitle();
     h17->GetYaxis()->SetTitle("Entries");
-    rv = fAliITSQADataMakerRec->Add2RecPointsList(h17,iLay+17+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);// NON expert  image
+    rv = fAliITSQADataMakerRec->Add2RecPointsList(h17,iLay+17+offsRP, !expert, image);// NON expert  image
     fSDDhRecPointsTask++;
   }
   
        Float_t hMax = 0.2;
        
        TH1F *oL3 = new TH1F("SDDL3_RelativeOccupancy","Layer 3 Relative Occupancy (RecPoints)",200,0.,hMax);
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(oL3,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); // 19
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(oL3,fSDDhRecPointsTask+offsRP, expert, !image); // 19
        fSDDhRecPointsTask++;
        
        TH1F *oL4 = new TH1F("SDDL4_RelativeOccupancy","Layer 4 Relative Occupancy (RecPoints)",200,0.,hMax);
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(oL4,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); // 20
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(oL4,fSDDhRecPointsTask+offsRP, expert, !image); // 20
        fSDDhRecPointsTask++;
        
        
-       TH2D *h21 = new TH2D("SDDL3_Rec2Raw_2D","L3 RecPoints to Raws 2D",12,0.5,6.5,14,0.5,14.5);  //position number 21
+       TH2F *h21 = new TH2F("SDDL3_Rec2Raw_2D","L3 RecPoints to Raws 2D",12,0.5,6.5,14,0.5,14.5);  //position number 21
        h21->GetXaxis()->SetTitle("z[#Module L3 ]");
        h21->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(h21,21 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO  image
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(h21,21 +offsRP, expert, !image);// expert NO  image
        fSDDhRecPointsTask++;
        
-       TH2D *h22 = new TH2D("SDDL4_Rec2Raw_2D","L4 RecPoints to Raws 2D",16,0.5,8.5,22,0.5,22.5); //position number 22
+       TH2F *h22 = new TH2F("SDDL4_Rec2Raw_2D","L4 RecPoints to Raws 2D",16,0.5,8.5,22,0.5,22.5); //position number 22
        h22->GetXaxis()->SetTitle("[#Module L4 ]");
        h22->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(h22,22 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);//  expert NO image
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(h22,22 +offsRP, expert, !image);//  expert NO image
        fSDDhRecPointsTask++;
 
         hMax = 0.3;    
        TH1F *R2RL3 = new TH1F("SDDL3_Rec2Raw","L3 RecPoints to Raws ratio",150,0.,hMax);
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(R2RL3,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); // 23
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(R2RL3,fSDDhRecPointsTask+offsRP, expert, !image); // 23
        fSDDhRecPointsTask++;
        
        TH1F *R2RL4 = new TH1F("SDDL4_Rec2Raw","L4 RecPoints to Raws ratio",150,0.,hMax);
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(R2RL4,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); // 24
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(R2RL4,fSDDhRecPointsTask+offsRP, expert, !image); // 24
        fSDDhRecPointsTask++;
 
        TH1F *dedxL3 = new TH1F("SDDL3_dedx","L3 dE/dX",100,0.,1.);
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(dedxL3,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); // 25
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(dedxL3,fSDDhRecPointsTask+offsRP, expert, !image); // 25
        fSDDhRecPointsTask++;
        
        TH1F *dedxL4 = new TH1F("SDDL4_dedx","L4 dE/dX",100,0.,1.);
-       rv = fAliITSQADataMakerRec->Add2RecPointsList(dedxL4,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); // 26
+       rv = fAliITSQADataMakerRec->Add2RecPointsList(dedxL4,fSDDhRecPointsTask+offsRP, expert, !image); // 26
        fSDDhRecPointsTask++;
        
 
@@ -1106,29 +1110,29 @@ Int_t AliITSQASDDDataMakerRec::InitRecPoints()
 
   hsummarydatarp->GetXaxis()->LabelsOption("v");
 
-  rv = fAliITSQADataMakerRec->Add2RecPointsList(hsummarydatarp,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
+  rv = fAliITSQADataMakerRec->Add2RecPointsList(hsummarydatarp,fSDDhRecPointsTask+offsRP, expert, !image);// expert NO image
 
 
 
   fSDDhRecPointsTask++;
 
-       fOnlineOffsetRecPoints = fSDDhRecPointsTask;
-       if(fkOnline){
-      TH2F *h19 = new TH2F("SDDGlobalCoordDistribYXFSE","YX Global Coord Distrib FSE",112,-28,28,112,-28,28);//position number 27
-      h19->GetYaxis()->SetTitle("Y[cm]");
-      h19->GetXaxis()->SetTitle("X[cm]");
-      rv = fAliITSQADataMakerRec->Add2RecPointsList(h19,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
-      fSDDhRecPointsTask++;
-      
-      TH2F *h20 = new TH2F("SDDGlobalCoordDistribRZFSE","RZ Global Coord Distrib FSE",128,-32,32,56,12,26);//position number 28
-      h20->GetYaxis()->SetTitle("R[cm]");
-      h20->GetXaxis()->SetTitle("Z[cm]");
-      rv = fAliITSQADataMakerRec->Add2RecPointsList(h20,fSDDhRecPointsTask+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);// expert NO image
-      fSDDhRecPointsTask++;      
-    }//online
+  fOnlineOffsetRecPoints = fSDDhRecPointsTask;
+  if(fkOnline){
+    TH2F *h19 = new TH2F("SDDGlobalCoordDistribYXFSE","YX Global Coord Distrib FSE",112,-28,28,112,-28,28);//position number 27
+    h19->GetYaxis()->SetTitle("Y[cm]");
+    h19->GetXaxis()->SetTitle("X[cm]");
+    rv = fAliITSQADataMakerRec->Add2RecPointsList(h19,fSDDhRecPointsTask+offsRP, expert, !image);// expert NO image
+    fSDDhRecPointsTask++;
+    
+    TH2F *h20 = new TH2F("SDDGlobalCoordDistribRZFSE","RZ Global Coord Distrib FSE",128,-32,32,56,12,26);//position number 28
+    h20->GetYaxis()->SetTitle("R[cm]");
+    h20->GetXaxis()->SetTitle("Z[cm]");
+    rv = fAliITSQADataMakerRec->Add2RecPointsList(h20,fSDDhRecPointsTask+offsRP, expert, !image);// expert NO image
+    fSDDhRecPointsTask++;      
+  }//online
   
   AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Recs histograms booked\n",fSDDhRecPointsTask));
-  
+  //
   return rv ; 
 }
 
@@ -1137,7 +1141,6 @@ Int_t AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
 {
  // Fill QA for RecPoints - SDD -
   Int_t rv = 0 ;
-  fNEventRP++; 
   Int_t lay, lad, det; 
   //AliInfo("get the branch with the ITS clusters !\n");
   AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
@@ -1149,14 +1152,12 @@ Int_t AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
     AliError("can't get SDD clusters !");
     return rv;
   }
-
+  int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
   Int_t npoints = 0;      
   Float_t cluglo[3]={0.,0.,0.}; 
   if(fkOnline){
-      for(Int_t i=28;i<30;i++){
-         fAliITSQADataMakerRec->GetRecPointsData(i+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
-       }
-    }
+    for(Int_t i=28;i<30;i++) fAliITSQADataMakerRec->ResetRecPointsData(i+offsRP);
+  }
   // AliITSgeomTGeo::GetModuleIndex() issues an error in case the arguments
   // are illegal and returns -1
   Int_t firMod=TMath::Max(0,AliITSgeomTGeo::GetModuleIndex(3,1,1));
@@ -1169,49 +1170,49 @@ Int_t AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
       AliITSRecPoint *recp = (AliITSRecPoint*)recpoints->At(j); 
       Int_t index = recp->GetDetectorIndex();
       lay=recp->GetLayer();
-               if(lay < 2 || lay > 3) continue;
-               Int_t modnumb=index+AliITSgeomTGeo::GetModuleIndex(lay+1,1,1);
-               AliITSgeomTGeo::GetModuleId(modnumb, lay, lad, det);  
-//             AliInfo(Form("modnumb %d, lay %d, lad %d, det %d \n",module, lay, lad, det));
-      fAliITSQADataMakerRec->GetRecPointsData(6 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(modnumb);//modpatternrp
+      if(lay < 2 || lay > 3) continue;
+      Int_t modnumb=index+AliITSgeomTGeo::GetModuleIndex(lay+1,1,1);
+      AliITSgeomTGeo::GetModuleId(modnumb, lay, lad, det);  
+      //               AliInfo(Form("modnumb %d, lay %d, lad %d, det %d \n",module, lay, lad, det));
+      fAliITSQADataMakerRec->FillRecPointsData(6 +offsRP,modnumb);//modpatternrp
       recp->GetGlobalXYZ(cluglo);
       Float_t rad=TMath::Sqrt(cluglo[0]*cluglo[0]+cluglo[1]*cluglo[1]); 
       Float_t phi=TMath::ATan2(cluglo[1],cluglo[0]);
       Float_t drifttime=recp->GetDriftTime();
-               fAliITSQADataMakerRec->GetRecPointsData(12 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(recp->GetDetLocalX(),recp->GetDetLocalZ());//local distribution
-               fAliITSQADataMakerRec->GetRecPointsData(2 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluglo[0],cluglo[1]);//global distribution YX
-               fAliITSQADataMakerRec->GetRecPointsData(3 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluglo[2],rad);//global distribution rz
-               if(fkOnline) {
-                       fAliITSQADataMakerRec->GetRecPointsData(28 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluglo[0],cluglo[1]);//global distribution YX FSE
-                       fAliITSQADataMakerRec->GetRecPointsData(29 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluglo[2],rad);//global distribution rz FSE
-               }
-               Int_t iside=recp->GetDriftSide();
-                lay=recp->GetLayer();
-               if(lay == 2) {
-                       fAliITSQADataMakerRec->GetRecPointsData(0  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(recp->GetQ()) ;//total charge of layer 3
-                       fAliITSQADataMakerRec->GetRecPointsData(7  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(det+0.5*iside-0.5,lad);//mod pattern layer 3
-                       fAliITSQADataMakerRec->GetRecPointsData(13 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad);//r distribution layer 3
-                       fAliITSQADataMakerRec->GetRecPointsData(15 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi);// phi distribution layer 3
-                       fAliITSQADataMakerRec->GetRecPointsData(4  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluglo[2],phi);// zphi distribution layer
-                       fAliITSQADataMakerRec->GetRecPointsData(17  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(drifttime);// time distribution layer 3
-                       fAliITSQADataMakerRec->GetRecPointsData(25  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(recp->GetdEdX());// charge distribution layer 3
-               } else if(lay == 3) {
-                       fAliITSQADataMakerRec->GetRecPointsData(1  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(recp->GetQ()) ;//total charge layer 4
-                       fAliITSQADataMakerRec->GetRecPointsData(8  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(det+0.5*iside-0.5,lad);//mod pattern layer 4
-                       fAliITSQADataMakerRec->GetRecPointsData(14 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad);//r distribution
-                       fAliITSQADataMakerRec->GetRecPointsData(16 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi);//phi distribution
-                       fAliITSQADataMakerRec->GetRecPointsData(5  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluglo[2],phi);// zphi distribution layer 4
-                       fAliITSQADataMakerRec->GetRecPointsData(18  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(drifttime);// time distribution layer 4
-                       fAliITSQADataMakerRec->GetRecPointsData(26  +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(recp->GetdEdX());// charge distribution layer 4
+      fAliITSQADataMakerRec->FillRecPointsData(12 +offsRP,recp->GetDetLocalX(),recp->GetDetLocalZ());//local distribution
+      fAliITSQADataMakerRec->FillRecPointsData(2 +offsRP,cluglo[0],cluglo[1]);//global distribution YX
+      fAliITSQADataMakerRec->FillRecPointsData(3 +offsRP,cluglo[2],rad);//global distribution rz
+      if(fkOnline) {
+       fAliITSQADataMakerRec->FillRecPointsData(28 +offsRP,cluglo[0],cluglo[1]);//global distribution YX FSE
+       fAliITSQADataMakerRec->FillRecPointsData(29 +offsRP,cluglo[2],rad);//global distribution rz FSE
+      }
+      Int_t iside=recp->GetDriftSide();
+      lay=recp->GetLayer();
+      if(lay == 2) {
+       fAliITSQADataMakerRec->FillRecPointsData(0  +offsRP, recp->GetQ()) ;//total charge of layer 3
+       fAliITSQADataMakerRec->FillRecPointsData(7  +offsRP, det+0.5*iside-0.5,lad);//mod pattern layer 3
+       fAliITSQADataMakerRec->FillRecPointsData(13 +offsRP, rad);//r distribution layer 3
+       fAliITSQADataMakerRec->FillRecPointsData(15 +offsRP, phi);// phi distribution layer 3
+       fAliITSQADataMakerRec->FillRecPointsData(4  +offsRP, cluglo[2],phi);// zphi distribution layer
+       fAliITSQADataMakerRec->FillRecPointsData(17  +offsRP, drifttime);// time distribution layer 3
+       fAliITSQADataMakerRec->FillRecPointsData(25  +offsRP, recp->GetdEdX());// charge distribution layer 3
+      } else if(lay == 3) {
+       fAliITSQADataMakerRec->FillRecPointsData(1  +offsRP, recp->GetQ()) ;//total charge layer 4
+       fAliITSQADataMakerRec->FillRecPointsData(8  +offsRP, det+0.5*iside-0.5,lad);//mod pattern layer 4
+       fAliITSQADataMakerRec->FillRecPointsData(14 +offsRP, rad);//r distribution
+       fAliITSQADataMakerRec->FillRecPointsData(16 +offsRP, phi);//phi distribution
+       fAliITSQADataMakerRec->FillRecPointsData(5  +offsRP, cluglo[2],phi);// zphi distribution layer 4
+       fAliITSQADataMakerRec->FillRecPointsData(18  +offsRP, drifttime);// time distribution layer 4
+       fAliITSQADataMakerRec->FillRecPointsData(26  +offsRP, recp->GetdEdX());// charge distribution layer 4
       }
     }
   }
+  //
   return rv ; 
 }
 
 //_______________________________________________________________
-
-Int_t AliITSQASDDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task, Int_t specie)const
+Int_t AliITSQASDDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task, Int_t specie) const
 {
   // Returns offset number according to the specified task
   Int_t offset=0;
@@ -1222,7 +1223,6 @@ Int_t AliITSQASDDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task, Int_t specie
 }
 
 //_______________________________________________________________
-
 void AliITSQASDDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset, Int_t specie) {
   // Set offset number according to the specified task
   if( task == AliQAv1::kRAWS ) {fGenRawsOffset[specie]=offset;}
@@ -1231,7 +1231,6 @@ void AliITSQASDDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset,
 }
 
 //_______________________________________________________________
-
 Int_t AliITSQASDDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task)
 {
   //return the number of histo booked for a given Task
@@ -1245,8 +1244,6 @@ Int_t AliITSQASDDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task)
 
 
 //_______________________________________________________________
-
-
 void AliITSQASDDDataMakerRec::CreateTheMap()
 {
   //Create the SDD DDL Module Map
@@ -1267,8 +1264,6 @@ void AliITSQASDDDataMakerRec::CreateTheMap()
 }
 
 //_______________________________________________________________
-
-
 void AliITSQASDDDataMakerRec::CreateTheCalibration()
 {
   //Take from the OCDB the calibration information for the SDD 
@@ -1344,18 +1339,18 @@ void AliITSQASDDDataMakerRec::CreateTheCalibration()
              fillmodhisto1-=badmodhisto1;
              fillmodhisto2side0-=badmodhisto2side0;
              fillmodhisto2side1-=badmodhisto2side1;
-             ((TH1D*)(fHistoCalibration->At(0)))->SetBinContent(imod+1,fillmodhisto1);
-             ((TH2D*)(fHistoCalibration->At(1)))->SetBinContent(index,lad,fillmodhisto2side0);
-             ((TH2D*)(fHistoCalibration->At(1)))->SetBinContent(index+1,lad,fillmodhisto2side1);
+             ((TH1F*)(fHistoCalibration->At(0)))->SetBinContent(imod+1,fillmodhisto1);
+             ((TH2F*)(fHistoCalibration->At(1)))->SetBinContent(index,lad,fillmodhisto2side0);
+             ((TH2F*)(fHistoCalibration->At(1)))->SetBinContent(index+1,lad,fillmodhisto2side1);
            }//end layer 3
            else if(lay==4){
              badmodhisto1=badmodhisto3side0+badmodhisto3side1;
              fillmodhisto1-=badmodhisto1;
              fillmodhisto3side0-=badmodhisto3side0;
              fillmodhisto3side1-=badmodhisto3side1;
-             ((TH1D*)(fHistoCalibration->At(0)))->SetBinContent(imod+1,fillmodhisto1);
-             ((TH2D*)(fHistoCalibration->At(2)))->SetBinContent(index,lad,fillmodhisto3side0);
-             ((TH2D*)(fHistoCalibration->At(2)))->SetBinContent(index+1,lad,fillmodhisto3side1);
+             ((TH1F*)(fHistoCalibration->At(0)))->SetBinContent(imod+1,fillmodhisto1);
+             ((TH2F*)(fHistoCalibration->At(2)))->SetBinContent(index,lad,fillmodhisto3side0);
+             ((TH2F*)(fHistoCalibration->At(2)))->SetBinContent(index+1,lad,fillmodhisto3side1);
            }//end layer 4
          }//end else bad module
        }//end module for
@@ -1364,15 +1359,14 @@ void AliITSQASDDDataMakerRec::CreateTheCalibration()
 }
 
 //____________________________________________________________________
-
 void AliITSQASDDDataMakerRec::InitCalibrationArray()
 {
   //create the histograms with the calibration informations. The histograms are stored in a TObjArray
-    TH1D *pattern1  = new TH1D("CALSDDModPattern","Calibration HW Modules pattern",fgknSDDmodules,239.5,499.5);
+    TH1F *pattern1  = new TH1F("CALSDDModPattern","Calibration HW Modules pattern",fgknSDDmodules,239.5,499.5);
     pattern1->SetDirectory(0) ;
-    TH2D *patternl3 = new TH2D("CALSDDphizL3","Calibration SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);
+    TH2F *patternl3 = new TH2F("CALSDDphizL3","Calibration SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);
     patternl3->SetDirectory(0) ;
-    TH2D *patternl4 = new TH2D("CALSDDphizL4"," Calibration SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5);
+    TH2F *patternl4 = new TH2F("CALSDDphizL4"," Calibration SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5);
     patternl4->SetDirectory(0) ;
 
     if(!fHistoCalibration)fHistoCalibration = new TObjArray(3);
@@ -1384,7 +1378,6 @@ void AliITSQASDDDataMakerRec::InitCalibrationArray()
 }
 
 //____________________________________________________________________
-
 void AliITSQASDDDataMakerRec::ResetDetector(AliQAv1::TASKINDEX_t task)
 {
   //reset the SDD calibration histograms
@@ -1395,9 +1388,9 @@ void AliITSQASDDDataMakerRec::ResetDetector(AliQAv1::TASKINDEX_t task)
 
   fCalibration=NULL;
 
-  ((TH1D*)(fHistoCalibration->At(0)))->Reset();
-  ((TH2D*)(fHistoCalibration->At(1)))->Reset();
-  ((TH2D*)(fHistoCalibration->At(2)))->Reset();
+  ((TH1F*)(fHistoCalibration->At(0)))->Reset();
+  ((TH2F*)(fHistoCalibration->At(1)))->Reset();
+  ((TH2F*)(fHistoCalibration->At(2)))->Reset();
   //delete fHistoCalibration;
   //fHistoCalibration=NULL;
   
@@ -1405,13 +1398,8 @@ void AliITSQASDDDataMakerRec::ResetDetector(AliQAv1::TASKINDEX_t task)
 
 //____________________________________________________________________
 
-Int_t AliITSQASDDDataMakerRec::GetNumberOfEvents(AliQAv1::TASKINDEX_t task)
+Int_t AliITSQASDDDataMakerRec::GetNumberOfEvents(AliQAv1::TASKINDEX_t task, Int_t trigCl)
 {
-  //return the number of the processed events for a given task fod SDD only
-
-  if(task==AliQAv1::kRAWS){return fNEvent;}
-  else if(task==AliQAv1::kRECPOINTS){return fNEventRP;}
-  else{ AliWarning("The selected TASKINDEX is not valid!! return 0\n"); return 0;}
-
-
+  //return the number of the processed events for a given task and trigger class (-1 for all)
+  return fAliITSQADataMakerRec->GetEvCountCycle(task, trigCl);
 }
index 083e5b5..12fe79f 100644 (file)
@@ -34,7 +34,7 @@ public:
   virtual Int_t MakeDigits(TTree *clustersTree);
   virtual Int_t MakeRecPoints(TTree *clustersTree);
   virtual void StartOfDetectorCycle();
-  virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
+  virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list);
   virtual void CreateTheMap();
   virtual void CreateTheCalibration();
   virtual void InitCalibrationArray();
@@ -43,7 +43,7 @@ public:
   Int_t GetOffset(AliQAv1::TASKINDEX_t task,Int_t specie=0)const;
   void  SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset, Int_t specie = 0);
   Int_t GetTaskHisto(AliQAv1::TASKINDEX_t task);
-  Int_t GetNumberOfEvents(AliQAv1::TASKINDEX_t task);
+  Int_t GetNumberOfEvents(AliQAv1::TASKINDEX_t task, Int_t trigCl=-1);
   virtual void ResetDetector(AliQAv1::TASKINDEX_t task);
   AliITSDDLModuleMapSDD* GetDDLSDDModuleMap()const{return fDDLModuleMap; };
 
@@ -71,8 +71,6 @@ private:
   Int_t   *fGenDigitsOffset;                   // QAchecking RecPoints offset       
   Int_t   *fGenRecPointsOffset;                // QAchecking RecPoints offset       
   Int_t   fTimeBinSize;                               // time bin width in number of clocks
-  Int_t   fNEvent;                             // Number of Events (raw data)
-  Int_t   fNEventRP;                           // Number of Events (rec points)
   AliITSDDLModuleMapSDD  *fDDLModuleMap;       // SDD Detector configuration for the decoding
   TObjArray *fCalibration;                     //Array of Calibration Object
   TObjArray *fHistoCalibration;                //Array of the Calibration histograms for the normalization
index 0d3ac89..b5017cd 100644 (file)
@@ -104,9 +104,10 @@ void AliITSQASDDDataMakerSim::StartOfDetectorCycle()
 }\r
 \r
 //____________________________________________________________________________ \r
-void AliITSQASDDDataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray* /*list*/)\r
+void AliITSQASDDDataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray** /*list*/)\r
 {\r
   // launch the QA checking\r
+  //\r
   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); \r
   //AliQAChecker::Instance()->Run( AliQAv1::kITS , task, list);\r
 }\r
@@ -158,17 +159,18 @@ Int_t AliITSQASDDDataMakerSim::MakeDigits(TTree * digits)
     Int_t nmod=i+240;\r
     digits->GetEvent(nmod);\r
     Int_t ndigits = iITSdigits->GetEntries();\r
-    fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nmod,ndigits);\r
+    fAliITSQADataMakerSim->FillDigitsData(fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],nmod,ndigits);\r
     for (Int_t idig=0; idig<ndigits; idig++) {\r
       AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);\r
       Int_t iz=dig->GetCoord1();  // cell number z\r
       Int_t ix=dig->GetCoord2();  // cell number x\r
       Int_t sig=dig->GetSignal();\r
-      fAliITSQADataMakerSim->GetDigitsData(1+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(iz);\r
-      fAliITSQADataMakerSim->GetDigitsData(2+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(ix);\r
-      fAliITSQADataMakerSim->GetDigitsData(3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(sig);\r
+      fAliITSQADataMakerSim->FillDigitsData(1+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],iz);\r
+      fAliITSQADataMakerSim->FillDigitsData(2+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],ix);\r
+      fAliITSQADataMakerSim->FillDigitsData(3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],sig);\r
     }\r
   }\r
+  //\r
   return rv ; \r
 }\r
 \r
@@ -235,19 +237,20 @@ Int_t AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits)
     brchSDigits->SetAddress( &sdig );\r
     brchSDigits->GetEvent(nmod);\r
     Int_t nsdig=sdig->GetEntries();\r
-    fAliITSQADataMakerSim->GetSDigitsData(fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nmod,nsdig);\r
+    fAliITSQADataMakerSim->FillSDigitsData(fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],nmod,nsdig);\r
     for(Int_t i=0;i<nsdig;i++){\r
       AliITSpListItem *cell=(AliITSpListItem*)sdig->At(i);\r
       Float_t sig=cell->GetSignal();\r
       Int_t idx=cell->GetIndex();\r
       Int_t ia,it;\r
       list->GetCell(idx,ia,it);\r
-      fAliITSQADataMakerSim->GetSDigitsData(1+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(ia);\r
-      fAliITSQADataMakerSim->GetSDigitsData(2+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(it);\r
-      fAliITSQADataMakerSim->GetSDigitsData(3+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(sig);\r
+      fAliITSQADataMakerSim->FillSDigitsData(1+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],ia);\r
+      fAliITSQADataMakerSim->FillSDigitsData(2+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],it);\r
+      fAliITSQADataMakerSim->FillSDigitsData(3+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],sig);\r
     }\r
     sdig->Clear();\r
   }\r
+  //\r
   return rv ; \r
 }\r
 \r
@@ -293,7 +296,7 @@ Int_t AliITSQASDDDataMakerSim::MakeHits(TTree * hits)
   // Fill QA for HITS - SDD -\r
   Int_t rv = 0 ; \r
 \r
-   AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");\r
+  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");\r
   fITS->SetTreeAddress();\r
   Int_t nmodules;\r
   if(!(fITS->InitModules(-1,nmodules))){\r
@@ -311,20 +314,21 @@ Int_t AliITSQASDDDataMakerSim::MakeHits(TTree * hits)
     ////printf("--w--AliITSQASDDDataMakerSim::MakeHits  nhits = %d\n",nhits);\r
     for (Int_t iHit=0;iHit<nhits;iHit++) {\r
       AliITShit *hit = (AliITShit*) arrHits->At(iHit);\r
-      fAliITSQADataMakerSim->GetHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nmod);\r
+      fAliITSQADataMakerSim->FillHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],nmod);\r
       Double_t xl,yl,zl,xl0,yl0,zl0;\r
       Double_t tof,tof0;\r
       hit->GetPositionL(xl,yl,zl,tof);\r
       hit->GetPositionL0(xl0,yl0,zl0,tof0);\r
       Float_t dyloc=TMath::Abs(yl-yl0)*10000.;\r
-      fAliITSQADataMakerSim->GetHitsData(1+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(dyloc);\r
+      fAliITSQADataMakerSim->FillHitsData(1+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],dyloc);\r
       Float_t edep=hit->GetIonization()*1000000;\r
       if(dyloc>200.){ \r
-        fAliITSQADataMakerSim->GetHitsData(2+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(edep);\r
-        fAliITSQADataMakerSim->GetHitsData(3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(dyloc);\r
+        fAliITSQADataMakerSim->FillHitsData(2+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],edep);\r
+        fAliITSQADataMakerSim->FillHitsData(3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],dyloc);\r
       }\r
     }\r
   }\r
+  //\r
   return rv ; \r
 }\r
 \r
index 0883b94..497a415 100644 (file)
@@ -29,7 +29,7 @@ public:
   AliITSQASDDDataMakerSim& operator = (const AliITSQASDDDataMakerSim& qac);\r
 \r
   virtual void StartOfDetectorCycle();\r
-  virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);\r
+  virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list);\r
   virtual ~AliITSQASDDDataMakerSim() {;}   // dtor\r
   virtual Int_t InitDigits();\r
   virtual Int_t InitSDigits();\r
index 070b591..46b3166 100644 (file)
@@ -114,47 +114,52 @@ void AliITSQASPDDataMakerRec::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray* list)
+void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list)
 {
   // launch the QA checking
+  //
   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
   if(!list){
-  AliError(" Histogram list is NULL");
-  return;
-  } 
-
-  Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
-  
-  if(task == AliQAv1::kRAWS) {
-  if(!list->At(0+shift)) {
-  AliError(" no histogram 0 at the end of detector cycle in raws");
-  return;
-  }
-  ((TH2I*)list->At(5+shift))->Reset(); // clean up MEB histo (needed at the first cycle for small statistics)
-  
-   ((TH1F*)list->At(7+shift))->Divide(((TH1F*)list->At(1+shift)),((TH1F*)list->At(0+shift)));
-   ((TH1F*)list->At(8+shift))->Divide(((TH1F*)list->At(2+shift)),((TH1F*)list->At(0+shift)));// missing FO ratio (per event)
-   ((TH1F*)list->At(9+shift))->Divide(((TH1F*)list->At(3+shift)),((TH1F*)list->At(4+shift)));// noisy FO ratio   (per event)
-  for(Int_t i=0; i<1200; i++){
-  // threshold for protection in case of technical runs (->few entries per chip)
-   Short_t thre=20; // 20 is ok in run 104792 (where the problem occured).
-   if((((TH1F*)list->At(0+shift)))->GetBinContent(i+1)<thre) continue; // expected FO yield
-   if((((TH1F*)list->At(4+shift)))->GetBinContent(i+1)<thre) continue; // the total FO yield.
-
-    
-  if(((TH1F*)list->At(8+shift))->GetBinContent(i+1)>0.5 && ((TH1F*)list->At(9+shift))->GetBinContent(i+1)>0.5){
-   Int_t eq=i/60;
-   Int_t hs=(i%60)/10;
-   Int_t chip = (i%60)%10;
-   Int_t sect = 999;   Int_t chipbin = 999; 
-   if(eq<10) {sect = eq; chipbin = 19-chip;} 
-   else {sect = eq-10; chipbin = chip;}
-   ((TH2I*)list->At(5+shift))->Fill(sect*6+hs,chipbin);
-   }
+    AliError(" Histogram list is NULL");
+    return;
   }
-  
-  } // QA Task Index == RAWS
+  //
+  Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
+  for (int trCl=-1;trCl<fAliITSQADataMakerRec->GetNTrigClasses();trCl++) { // RS Loop over all trigger classes (+ global counter, -1)
+    if(task == AliQAv1::kRAWS) {
+      TObjArray &harr = *fAliITSQADataMakerRec->GetRawsDataOfTrigClass(trCl);  // extract the clones for given trigger class
+      //
+      if (harr[5+shift]) ((TH1*)harr[5+shift])->Reset();  // clean up MEB histo (needed at the first cycle for small statistics)
+      if (harr[7+shift]&&harr[1+shift]&&harr[0+shift]) ((TH1*)harr[7+shift])->Divide((TH1*)harr[1+shift],(TH1*)harr[0+shift]);
+      if (harr[8+shift]&&harr[2+shift]&&harr[0+shift]) ((TH1*)harr[8+shift])->Divide((TH1*)harr[2+shift],(TH1*)harr[0+shift]); // missing FO ratio (per event) 
+      if (harr[9+shift]&&harr[3+shift]&&harr[4+shift]) ((TH1*)harr[9+shift])->Divide((TH1*)harr[3+shift],(TH1*)harr[4+shift]); // noisy FO ratio   (per event)
+      //
+      TH1 *h0 = (TH1*)harr[0+shift];
+      TH1 *h4 = (TH1*)harr[4+shift];
+      TH2 *h5 = (TH2*)harr[5+shift];
+      TH1 *h8 = (TH1*)harr[8+shift];
+      TH1 *h9 = (TH1*)harr[9+shift];
+      //
+      if (h0 && h4 && h5 && h8 && h9) {
+       for(Int_t i=0; i<1200; i++) {
+         // threshold for protection in case of technical runs (->few entries per chip)
+         Short_t thre=20; // 20 is ok in run 104792 (where the problem occured).
+         if (h0->GetBinContent(i+1)<thre) continue; // expected FO yield
+         if (h4->GetBinContent(i+1)<thre) continue; // the total FO yield.
+         //
+         if(h8->GetBinContent(i+1)>0.5 && h9->GetBinContent(i+1)>0.5) {
+           Int_t eq=i/60;
+           Int_t hs=(i%60)/10;
+           Int_t chip = (i%60)%10;
+           Int_t sect = 999;   Int_t chipbin = 999; 
+           if(eq<10) {sect = eq; chipbin = 19-chip;} 
+           else {sect = eq-10; chipbin = chip;}
+           h5->Fill(sect*6+hs,chipbin);
+         }
+       }
+      }
+    } // QA Task Index == RAWS
+  } // RS: loop over trigger classes
 }
 
 //____________________________________________________________________________ 
@@ -456,12 +461,10 @@ Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
   if(!rawReader) {
    AliError("rawReader is NULL"); 
    return -1;
-  }
-  
+  } 
   rawReader->Reset();
   AliITSRawStreamSPD rawStreamSPD(rawReader);
   rawStreamSPD.ActivateAdvancedErrorLog(kTRUE,fAdvLogger);
-  
   // shift for online histos
   Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
   
@@ -499,47 +502,47 @@ Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
       if (iHalfStave>=0 && iHalfStave<2) iLayer=0;
       else iLayer=1;
       
-      fAliITSQADataMakerRec->GetRawsData(0+offset)->Fill(iLayer);
+      fAliITSQADataMakerRec->FillRawsData(0+offset,iLayer);
       if (iLayer==0) {
-        fAliITSQADataMakerRec->GetRawsData(1+offset)->Fill(module);
+        fAliITSQADataMakerRec->FillRawsData(1+offset,module);
         nDigitsL1++;
       } else {
-        fAliITSQADataMakerRec->GetRawsData(2+offset)->Fill(module);
+        fAliITSQADataMakerRec->FillRawsData(2+offset,module);
         nDigitsL2++;
       }
       
       if(iEq<10) {
-         fAliITSQADataMakerRec->GetRawsData(3+offset)->Fill(iHalfStave+iEq*6,iChip);
+         fAliITSQADataMakerRec->FillRawsData(3+offset,iHalfStave+iEq*6,iChip);
       } 
       else       {
-         fAliITSQADataMakerRec->GetRawsData(4+offset)->Fill(iHalfStave+(iEq-10)*6,iChip);
+         fAliITSQADataMakerRec->FillRawsData(4+offset,iHalfStave+(iEq-10)*6,iChip);
       }
 
       if(iLayer==0) {
          if(iEq<10)  { 
-            fAliITSQADataMakerRec->GetRawsData(30+offset)->Fill(19-iChip,iHalfStave+iEq*2);
-            fAliITSQADataMakerRec->GetRawsData(32+offset)->Fill(19-iChip);
-            fAliITSQADataMakerRec->GetRawsData(34+offset)->Fill(iHalfStave+iEq*2);
+            fAliITSQADataMakerRec->FillRawsData(30+offset,19-iChip,iHalfStave+iEq*2);
+            fAliITSQADataMakerRec->FillRawsData(32+offset,19-iChip);
+            fAliITSQADataMakerRec->FillRawsData(34+offset,iHalfStave+iEq*2);
          }
          else {
-            fAliITSQADataMakerRec->GetRawsData(30+offset)->Fill(iChip,iHalfStave+(iEq-10)*2);
-            fAliITSQADataMakerRec->GetRawsData(32+offset)->Fill(iChip);
-            fAliITSQADataMakerRec->GetRawsData(34+offset)->Fill(iHalfStave+(iEq-10)*2);
+            fAliITSQADataMakerRec->FillRawsData(30+offset,iChip,iHalfStave+(iEq-10)*2);
+            fAliITSQADataMakerRec->FillRawsData(32+offset,iChip);
+            fAliITSQADataMakerRec->FillRawsData(34+offset,iHalfStave+(iEq-10)*2);
          }
       }
       else         {   
          if(iEq<10)  { 
-            fAliITSQADataMakerRec->GetRawsData(31+offset)->Fill(19-iChip,iHalfStave-2+iEq*4);
-            fAliITSQADataMakerRec->GetRawsData(33+offset)->Fill(19-iChip);
-            fAliITSQADataMakerRec->GetRawsData(35+offset)->Fill(iHalfStave-2+iEq*4);
+            fAliITSQADataMakerRec->FillRawsData(31+offset,19-iChip,iHalfStave-2+iEq*4);
+            fAliITSQADataMakerRec->FillRawsData(33+offset,19-iChip);
+            fAliITSQADataMakerRec->FillRawsData(35+offset,iHalfStave-2+iEq*4);
          }
          else {
-            fAliITSQADataMakerRec->GetRawsData(31+offset)->Fill(iChip,iHalfStave-2+(iEq-10)*4);
-            fAliITSQADataMakerRec->GetRawsData(33+offset)->Fill(iChip);
-            fAliITSQADataMakerRec->GetRawsData(35+offset)->Fill(iHalfStave-2+(iEq-10)*4);
+            fAliITSQADataMakerRec->FillRawsData(31+offset,iChip,iHalfStave-2+(iEq-10)*4);
+            fAliITSQADataMakerRec->FillRawsData(33+offset,iChip);
+            fAliITSQADataMakerRec->FillRawsData(35+offset,iHalfStave-2+(iEq-10)*4);
          }
       }
-      fAliITSQADataMakerRec->GetRawsData(5+iEq+offset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256); 
+      fAliITSQADataMakerRec->FillRawsData(5+iEq+offset,colM+(module%2)*160,rowM+iHalfStave*256); 
     }
   }
 
@@ -547,20 +550,20 @@ Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
   for (Int_t ieq=0; ieq<20; ieq++) {
     nErrorsDDL[ieq] = 0;
     for (UInt_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++) {
-      fAliITSQADataMakerRec->GetRawsData(ieq+(kAmoreFoOffset+1)+shift)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq));
+      fAliITSQADataMakerRec->FillRawsData(ieq+(kAmoreFoOffset+1)+shift,ierr,fAdvLogger->GetNrErrors(ierr,ieq));
       if(ierr>0) {
        nErrorsDDL[ieq] = nErrorsDDL[ieq] + fAdvLogger->GetNrErrors(ierr,ieq); 
      }
-      ((TH2F*)fAliITSQADataMakerRec->GetRawsData(kAmoreFoOffset+shift))->Fill(ieq,ierr,fAdvLogger->GetNrErrors(ierr,ieq));
+      fAliITSQADataMakerRec->FillRawsData(kAmoreFoOffset+shift,ieq,ierr,fAdvLogger->GetNrErrors(ierr,ieq));
     } 
     for (Int_t ihs=0; ihs<6; ihs++) {
       for (Int_t ichip=0; ichip<10; ichip++) {
-      if(isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(0+shift)->Fill(ieq*60+ihs*10+ichip); // online
-       if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip)) fAliITSQADataMakerRec->GetRawsData(4+shift)->Fill(ieq*60+ihs*10+ichip); // online
+      if(isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->FillRawsData(0+shift,ieq*60+ihs*10+ichip); // online
+       if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip)) fAliITSQADataMakerRec->FillRawsData(4+shift,ieq*60+ihs*10+ichip); // online
        // now filling the 3 possibile combinations
-      if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(1+shift)->Fill(ieq*60+ihs*10+ichip); // online
-      if(!rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(2+shift)->Fill(ieq*60+ihs*10+ichip); // online
-      if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && !isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(3+shift)->Fill(ieq*60+ihs*10+ichip); // online       
+      if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->FillRawsData(1+shift,ieq*60+ihs*10+ichip); // online
+      if(!rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->FillRawsData(2+shift,ieq*60+ihs*10+ichip); // online
+      if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && !isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->FillRawsData(3+shift,ieq*60+ihs*10+ichip); // online       
       
         chipKey = rawStreamSPD.GetOfflineChipKeyFromOnline(ieq,ihs,ichip);
         Int_t sect = 999;
@@ -572,23 +575,21 @@ Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
          if(ieq<10) {sect = ieq; chipbin = 19-ichip;} 
          else {sect = ieq-10; chipbin = ichip;}
          
-         fAliITSQADataMakerRec->GetRawsData(28+offset)->Fill(sect*6+ihs,chipbin);
-          fAliITSQADataMakerRec->GetRawsData(29+offset)->Fill(chipKey);
+         fAliITSQADataMakerRec->FillRawsData(28+offset,sect*6+ihs,chipbin);
+          fAliITSQADataMakerRec->FillRawsData(29+offset,chipKey);
         }
       }
     } 
 
 
   }
-  if(fAliITSQADataMakerRec->GetRawsData(6+shift)) {
-  fAliITSQADataMakerRec->GetRawsData(6+shift)->Fill(nFastOr[0],nFastOr[1]); // online
-  }
+  fAliITSQADataMakerRec->FillRawsData(6+shift,nFastOr[0],nFastOr[1]); // online
  
   fAdvLogger->Reset();
-  fAliITSQADataMakerRec->GetRawsData(25+offset)->Fill(nDigitsL1);
-  fAliITSQADataMakerRec->GetRawsData(26+offset)->Fill(nDigitsL2);
-  fAliITSQADataMakerRec->GetRawsData(27+offset)->Fill(nDigitsL1,nDigitsL2);
-  
+  fAliITSQADataMakerRec->FillRawsData(25+offset,nDigitsL1);
+  fAliITSQADataMakerRec->FillRawsData(26+offset,nDigitsL2);
+  fAliITSQADataMakerRec->FillRawsData(27+offset,nDigitsL1,nDigitsL2);
+  //
   AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2));
   return rv ; 
 }
@@ -661,11 +662,11 @@ Int_t AliITSQASPDDataMakerRec::InitDigits()
 Int_t AliITSQASPDDataMakerRec::MakeDigits(TTree *digits)
 { 
   // Fill QA for DIGIT - SPD -
+  
   Int_t rv = 0 ; 
-
-//  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");
-//  fITS->SetTreeAddress();
-//  TClonesArray *iITSdigits  = fITS->DigitsAddress(0);  // 0->SPD
+  //  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");
+  //  fITS->SetTreeAddress();
+  //  TClonesArray *iITSdigits  = fITS->DigitsAddress(0);  // 0->SPD
   TBranch *branchD = digits->GetBranch("ITSDigitsSPD");
   if (!branchD) { 
     AliError("can't get the branch with the SPD ITS digits !");
@@ -681,26 +682,27 @@ Int_t AliITSQASPDDataMakerRec::MakeDigits(TTree *digits)
     digits->GetEvent(imod);
     Int_t ndigits = iITSdigits->GetEntries();
     if (imod<80) {
-      fAliITSQADataMakerRec->GetDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(0.5,ndigits);
-      fAliITSQADataMakerRec->GetDigitsData(1+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(imod,ndigits);
+      fAliITSQADataMakerRec->FillDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],0.5,ndigits);
+      fAliITSQADataMakerRec->FillDigitsData(1+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],imod,ndigits);
       nDigitsL1+=ndigits;
     }
     else {
-      fAliITSQADataMakerRec->GetDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(1,ndigits);
-      fAliITSQADataMakerRec->GetDigitsData(2+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(imod,ndigits);
+      fAliITSQADataMakerRec->FillDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],1,ndigits);
+      fAliITSQADataMakerRec->FillDigitsData(2+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],imod,ndigits);
       nDigitsL2+=ndigits;
     }
     for (Int_t idig=0; idig<ndigits; ++idig) {
       AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
       Int_t col=dig->GetCoord1();  // cell number z
       Int_t row=dig->GetCoord2();  // cell number x
-      fAliITSQADataMakerRec->GetDigitsData(3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(col);
-      fAliITSQADataMakerRec->GetDigitsData(4+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(row);
+      fAliITSQADataMakerRec->FillDigitsData(3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],col);
+      fAliITSQADataMakerRec->FillDigitsData(4+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],row);
     }
   }
-  fAliITSQADataMakerRec->GetDigitsData(5+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL1);
-  fAliITSQADataMakerRec->GetDigitsData(6+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL2);
-  fAliITSQADataMakerRec->GetDigitsData(7+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL1,nDigitsL2);
+  fAliITSQADataMakerRec->FillDigitsData(5+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],nDigitsL1);
+  fAliITSQADataMakerRec->FillDigitsData(6+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],nDigitsL2);
+  fAliITSQADataMakerRec->FillDigitsData(7+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()],nDigitsL1,nDigitsL2);
+  //
   return rv ; 
 }
 
@@ -876,6 +878,7 @@ Int_t AliITSQASPDDataMakerRec::InitRecPoints()
 Int_t AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree)
 {
   // Fill QA for RecPoints - SPD -
+
   Int_t rv = 0 ;
   AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
   TClonesArray *recpoints = NULL;
@@ -902,49 +905,49 @@ Int_t AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree)
                       (AliITSRecPoint*)recpoints->UncheckedAt(nCluster);
       if (cluster->GetLayer()>1)continue;
       Int_t lay=cluster->GetLayer();
-      fAliITSQADataMakerRec->GetRecPointsData(0 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(lay);
+      fAliITSQADataMakerRec->FillRecPointsData(0 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],lay);
       cluster->GetGlobalXYZ(cluGlo);
       Float_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]);
         Float_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
         if (lay==0) {
-          fAliITSQADataMakerRec->GetRecPointsData(1 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(iIts);
-          fAliITSQADataMakerRec->GetRecPointsData(2 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalX());
-          fAliITSQADataMakerRec->GetRecPointsData(3 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalZ());
-          fAliITSQADataMakerRec->GetRecPointsData(4 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0]);
-          fAliITSQADataMakerRec->GetRecPointsData(5 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[1]);
-          fAliITSQADataMakerRec->GetRecPointsData(6 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2]);
-          fAliITSQADataMakerRec->GetRecPointsData(7 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad);
-          fAliITSQADataMakerRec->GetRecPointsData(8 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi);
-          fAliITSQADataMakerRec->GetRecPointsData(9 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNz(),cluster->GetNy());
-          fAliITSQADataMakerRec->GetRecPointsData(10 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNpixels());
-          fAliITSQADataMakerRec->GetRecPointsData(11 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetSPDclusterType());
-          fAliITSQADataMakerRec->GetRecPointsData(12 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2],phi);
+          fAliITSQADataMakerRec->FillRecPointsData(1 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],iIts);
+          fAliITSQADataMakerRec->FillRecPointsData(2 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetDetLocalX());
+          fAliITSQADataMakerRec->FillRecPointsData(3 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetDetLocalZ());
+          fAliITSQADataMakerRec->FillRecPointsData(4 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[0]);
+          fAliITSQADataMakerRec->FillRecPointsData(5 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[1]);
+          fAliITSQADataMakerRec->FillRecPointsData(6 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[2]);
+          fAliITSQADataMakerRec->FillRecPointsData(7 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],rad);
+          fAliITSQADataMakerRec->FillRecPointsData(8 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],phi);
+          fAliITSQADataMakerRec->FillRecPointsData(9 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetNz(),cluster->GetNy());
+          fAliITSQADataMakerRec->FillRecPointsData(10 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetNpixels());
+          fAliITSQADataMakerRec->FillRecPointsData(11 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetSPDclusterType());
+          fAliITSQADataMakerRec->FillRecPointsData(12 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[2],phi);
         } else  {
-          fAliITSQADataMakerRec->GetRecPointsData(13 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(iIts);
-          fAliITSQADataMakerRec->GetRecPointsData(14 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalX());
-          fAliITSQADataMakerRec->GetRecPointsData(15 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalZ());
-          fAliITSQADataMakerRec->GetRecPointsData(16 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0]);
-          fAliITSQADataMakerRec->GetRecPointsData(17 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[1]);
-          fAliITSQADataMakerRec->GetRecPointsData(18 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2]);
-          fAliITSQADataMakerRec->GetRecPointsData(19 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad);
-          fAliITSQADataMakerRec->GetRecPointsData(20 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi);
-          fAliITSQADataMakerRec->GetRecPointsData(21 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNz(),cluster->GetNy());
-          fAliITSQADataMakerRec->GetRecPointsData(22 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNpixels());
-          fAliITSQADataMakerRec->GetRecPointsData(23 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetSPDclusterType());
-          fAliITSQADataMakerRec->GetRecPointsData(24 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2],phi);
+          fAliITSQADataMakerRec->FillRecPointsData(13 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],iIts);
+          fAliITSQADataMakerRec->FillRecPointsData(14 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetDetLocalX());
+          fAliITSQADataMakerRec->FillRecPointsData(15 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetDetLocalZ());
+          fAliITSQADataMakerRec->FillRecPointsData(16 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[0]);
+          fAliITSQADataMakerRec->FillRecPointsData(17 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[1]);
+          fAliITSQADataMakerRec->FillRecPointsData(18 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[2]);
+          fAliITSQADataMakerRec->FillRecPointsData(19 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],rad);
+          fAliITSQADataMakerRec->FillRecPointsData(20 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],phi);
+          fAliITSQADataMakerRec->FillRecPointsData(21 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetNz(),cluster->GetNy());
+          fAliITSQADataMakerRec->FillRecPointsData(22 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetNpixels());
+          fAliITSQADataMakerRec->FillRecPointsData(23 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluster->GetSPDclusterType());
+          fAliITSQADataMakerRec->FillRecPointsData(24 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[2],phi);
         }
-        fAliITSQADataMakerRec->GetRecPointsData(25 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad,phi);
-        fAliITSQADataMakerRec->GetRecPointsData(26 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0],cluGlo[1]);
+        fAliITSQADataMakerRec->FillRecPointsData(25 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],rad,phi);
+        fAliITSQADataMakerRec->FillRecPointsData(26 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],cluGlo[0],cluGlo[1]);
 
         nClusters[lay]++;
     } // end of cluster loop
   } // end of its "subdetector" loop
 
   for (Int_t iLay=0; iLay<2; iLay++)
-    fAliITSQADataMakerRec->GetRecPointsData(27 +iLay +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nClusters[iLay]);
-
-  fAliITSQADataMakerRec->GetRecPointsData(29 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nClusters[0],nClusters[1]);
+    fAliITSQADataMakerRec->FillRecPointsData(27 +iLay +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],nClusters[iLay]);
 
+  fAliITSQADataMakerRec->FillRecPointsData(29 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()],nClusters[0],nClusters[1]);
+  //
   return rv ;
 }
 
index 7c9011a..15d26cc 100644 (file)
@@ -36,7 +36,7 @@ public:
   virtual Int_t MakeDigits()  {return 0;}
   virtual Int_t MakeDigits(TTree *clustersTree);
   virtual void  StartOfDetectorCycle();
-  virtual void  EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
+  virtual void  EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list);
   virtual ~AliITSQASPDDataMakerRec();   // dtor
   Int_t GetOffset(AliQAv1::TASKINDEX_t task,Int_t specie=0) const;
   void  SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset, Int_t specie = 0);
index bacc95e..2dbe1d4 100644 (file)
@@ -101,7 +101,7 @@ void AliITSQASPDDataMakerSim::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliITSQASPDDataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray* /*list*/)
+void AliITSQASPDDataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray** /*list*/)
 {
   // launch the QA checking
   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
@@ -192,26 +192,27 @@ Int_t AliITSQASPDDataMakerSim::MakeDigits(TTree *digits)
     digits->GetEvent(imod);
     Int_t ndigits = iITSdigits->GetEntries();
     if (imod<80) {
-      fAliITSQADataMakerSim->GetDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(0.5,ndigits);
-      fAliITSQADataMakerSim->GetDigitsData(1+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,ndigits);
+      fAliITSQADataMakerSim->FillDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],0.5,ndigits);
+      fAliITSQADataMakerSim->FillDigitsData(1+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],imod,ndigits);
       nDigitsL1+=ndigits;
     }
     else {
-      fAliITSQADataMakerSim->GetDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(1,ndigits);
-      fAliITSQADataMakerSim->GetDigitsData(2+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,ndigits);
+      fAliITSQADataMakerSim->FillDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],1,ndigits);
+      fAliITSQADataMakerSim->FillDigitsData(2+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],imod,ndigits);
       nDigitsL2+=ndigits;
     }
     for (Int_t idig=0; idig<ndigits; ++idig) {
       AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
       Int_t col=dig->GetCoord1();  // cell number z
       Int_t row=dig->GetCoord2();  // cell number x
-      fAliITSQADataMakerSim->GetDigitsData(3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(col);
-      fAliITSQADataMakerSim->GetDigitsData(4+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(row);
+      fAliITSQADataMakerSim->FillDigitsData(3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],col);
+      fAliITSQADataMakerSim->FillDigitsData(4+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],row);
     }
   }
-  fAliITSQADataMakerSim->GetDigitsData(5+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nDigitsL1);
-  fAliITSQADataMakerSim->GetDigitsData(6+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nDigitsL2);
-  fAliITSQADataMakerSim->GetDigitsData(7+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(nDigitsL1,nDigitsL2);
+  fAliITSQADataMakerSim->FillDigitsData(5+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],nDigitsL1);
+  fAliITSQADataMakerSim->FillDigitsData(6+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],nDigitsL2);
+  fAliITSQADataMakerSim->FillDigitsData(7+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],nDigitsL1,nDigitsL2);
+  //
   return rv ; 
 }
 
@@ -256,7 +257,6 @@ Int_t AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
 { 
   // Fill QA for SDIGIT - SPD -
   Int_t rv = 0 ; 
-  
   static TClonesArray * sdig ; 
   if (! sdig )
     sdig = new TClonesArray( "AliITSpListItem",1000 );
@@ -267,15 +267,16 @@ Int_t AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
     brchSDigits->GetEvent(imod);
     Int_t nsdig=sdig->GetEntries();
     if (imod<80) {
-      fAliITSQADataMakerSim->GetSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(0.5,nsdig);
-      fAliITSQADataMakerSim->GetSDigitsData(1+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nsdig);
+      fAliITSQADataMakerSim->FillSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],0.5,nsdig);
+      fAliITSQADataMakerSim->FillSDigitsData(1+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],imod,nsdig);
     }
     else {
-      fAliITSQADataMakerSim->GetSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(1,nsdig);
-      fAliITSQADataMakerSim->GetSDigitsData(2+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nsdig);
+      fAliITSQADataMakerSim->FillSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],1,nsdig);
+      fAliITSQADataMakerSim->FillSDigitsData(2+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],imod,nsdig);
     }
     sdig->Clear() ;
   }
+  //
   return rv ; 
 }
 
@@ -346,11 +347,11 @@ Int_t AliITSQASPDDataMakerSim::MakeHits(TTree *hits)
     TObjArray *arrHits = module->GetHits();
     Int_t nhits = arrHits->GetEntriesFast();
     if (imod<80) {
-      fAliITSQADataMakerSim->GetHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(0.5,nhits);
-      fAliITSQADataMakerSim->GetHitsData(1+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nhits);
+      fAliITSQADataMakerSim->FillHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],0.5,nhits);
+      fAliITSQADataMakerSim->FillHitsData(1+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],imod,nhits);
     } else {
-      fAliITSQADataMakerSim->GetHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(1,nhits);
-      fAliITSQADataMakerSim->GetHitsData(2+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(imod,nhits);
+      fAliITSQADataMakerSim->FillHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],1,nhits);
+      fAliITSQADataMakerSim->FillHitsData(2+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],imod,nhits);
     }
     for (Int_t iHit=0; iHit<nhits; ++iHit) {
       AliITShit *hit = (AliITShit*) arrHits->At(iHit);
@@ -359,13 +360,14 @@ Int_t AliITSQASPDDataMakerSim::MakeHits(TTree *hits)
       hit->GetPositionL(xl,yl,zl,tof);
       hit->GetPositionL0(xl0,yl0,zl0,tof0);
       Float_t dyloc=TMath::Abs(yl-yl0)*10000.;
-      fAliITSQADataMakerSim->GetHitsData(3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(dyloc);
+      fAliITSQADataMakerSim->FillHitsData(3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],dyloc);
       Float_t edep=hit->GetIonization()*1000000;
       if(dyloc>180.){
-        fAliITSQADataMakerSim->GetHitsData(4+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()])->Fill(edep);
+        fAliITSQADataMakerSim->FillHitsData(4+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],edep);
       }
     }
   }
+  //
   return rv ; 
 }
 
index 84b848a..adcc612 100644 (file)
@@ -29,7 +29,7 @@ public:
   AliITSQASPDDataMakerSim& operator = (const AliITSQASPDDataMakerSim& qac);
 
   virtual void StartOfDetectorCycle();
-  virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list);
+  virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list);
   virtual ~AliITSQASPDDataMakerSim() {;}   // dtor
   virtual Int_t InitDigits();
   virtual Int_t InitSDigits();
index 17a8d0f..f602b81 100644 (file)
@@ -22,7 +22,7 @@
 //  INFN Torino
 
 // --- ROOT system ---
-#include <TH2D.h>
+#include <TH2F.h>
 #include <TTree.h>
 #include <TMath.h>
 #include <TString.h>
@@ -53,30 +53,28 @@ ClassImp(AliITSQASSDDataMakerRec)
 
 AliITSQASSDDataMakerRec::AliITSQASSDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Int_t ldc) :
 TObject(),
-fAliITSQADataMakerRec(aliITSQADataMakerRec),
-fSSDEvent(0),
-fSSDEventPerCycle(0),
-fkOnline(kMode),
-fLDC(ldc),
-fSSDRawsOffset(0), fSSDRawsDAOffset(0),
-fSSDRawsCommonLevelOffset(0),
-fSSDhRawsTask(0),
-fSSDhDigitsTask(0),
-fSSDhRecPointsTask(0),
-fGenRawsOffset(0),
-fGenDigitsOffset(0),
-fGenRecPointsOffset(0),
-fCDBManager(0) {
+  fAliITSQADataMakerRec(aliITSQADataMakerRec),
+  fkOnline(kMode),
+  fLDC(ldc),
+  fSSDRawsOffset(0), fSSDRawsDAOffset(0),
+  fSSDRawsCommonLevelOffset(0),
+  fSSDhRawsTask(0),
+  fSSDhDigitsTask(0),
+  fSSDhRecPointsTask(0),
+  fGenRawsOffset(0),
+  fGenDigitsOffset(0),
+  fGenRecPointsOffset(0),
+  fCDBManager(0) {
   // Default constructor   
   //initilize the raw signal vs strip number histograms
-       fGenRawsOffset = new Int_t[AliRecoParam::kNSpecies];
-       fGenRecPointsOffset = new Int_t[AliRecoParam::kNSpecies];
-       fGenDigitsOffset = new Int_t[AliRecoParam::kNSpecies];
-       for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) {
-               fGenRawsOffset[i] = 0;
-               fGenRecPointsOffset[i] = 0;
-               fGenDigitsOffset[i]=0;
-       }
+  fGenRawsOffset = new Int_t[AliRecoParam::kNSpecies];
+  fGenRecPointsOffset = new Int_t[AliRecoParam::kNSpecies];
+  fGenDigitsOffset = new Int_t[AliRecoParam::kNSpecies];
+  for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) {
+    fGenRawsOffset[i] = 0;
+    fGenRecPointsOffset[i] = 0;
+    fGenDigitsOffset[i]=0;
+  }
   if(fkOnline) {
     fCDBManager = AliCDBManager::Instance();
     //fCDBManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
@@ -100,7 +98,7 @@ fCDBManager(0) {
       gTitle = "SSD_RawSignal_Layer"; gTitle += gLayer;
       gTitle += "_Ladder"; gTitle += gLadder;
       gTitle += "_Module"; gTitle += gModule;
-      fHistSSDRawSignalModule[gHistCounterRawSignal] = new TH1D(gTitle.Data(),gTitle.Data(),
+      fHistSSDRawSignalModule[gHistCounterRawSignal] = new TH1F(gTitle.Data(),gTitle.Data(),
                                                                2*fgkNumberOfPSideStrips,0,2*fgkNumberOfPSideStrips);
       gHistCounterRawSignal += 1;
       
@@ -111,7 +109,7 @@ fCDBManager(0) {
       gTitle = "SSD_CM_PSide_Layer"; gTitle += gLayer;
       gTitle += "_Ladder"; gTitle += gLadder;
       gTitle += "_Module"; gTitle += gModule;
-      fHistSSDCMModule[gHistCounterCM] = new TH1D(gTitle.Data(),gTitle.Data(),
+      fHistSSDCMModule[gHistCounterCM] = new TH1F(gTitle.Data(),gTitle.Data(),
                                                  100,-50.,50.);
       fHistSSDCMModule[gHistCounterCM]->GetXaxis()->SetTitle("CM");
       gHistCounterCM += 1;
@@ -122,7 +120,7 @@ fCDBManager(0) {
       gTitle = "SSD_CM_NSide_Layer"; gTitle += gLayer;
       gTitle += "_Ladder"; gTitle += gLadder;
       gTitle += "_Module"; gTitle += gModule;
-      fHistSSDCMModule[gHistCounterCM] = new TH1D(gTitle.Data(),gTitle.Data(),
+      fHistSSDCMModule[gHistCounterCM] = new TH1F(gTitle.Data(),gTitle.Data(),
                                                  100,-50.,50.);
       fHistSSDCMModule[gHistCounterCM]->GetXaxis()->SetTitle("CM");
       gHistCounterCM += 1;
@@ -143,8 +141,6 @@ fCDBManager(0) {
 AliITSQASSDDataMakerRec::AliITSQASSDDataMakerRec(const AliITSQASSDDataMakerRec& qadm) :
 TObject(),
 fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec),
-fSSDEvent(qadm.fSSDEvent),
-fSSDEventPerCycle(qadm.fSSDEventPerCycle),
 fkOnline(qadm.fkOnline),
 fLDC(qadm.fLDC),
 fSSDRawsOffset(qadm.fSSDRawsOffset), fSSDRawsDAOffset(qadm.fSSDRawsDAOffset),
@@ -156,18 +152,18 @@ fGenRawsOffset(qadm.fGenRawsOffset),
 fGenDigitsOffset(qadm.fGenDigitsOffset),
 fGenRecPointsOffset(qadm.fGenRecPointsOffset),
 fCDBManager(qadm.fCDBManager) {
-  //copy ctor 
-  fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; 
-  fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
+//copy ctor 
+fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; 
+fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
 }
 
 //__________________________________________________________________
 AliITSQASSDDataMakerRec& AliITSQASSDDataMakerRec::operator = (const AliITSQASSDDataMakerRec& qac )
 {
-  // Equal operator.
-  this->~AliITSQASSDDataMakerRec();
-  new(this) AliITSQASSDDataMakerRec(qac);
-  return *this;
+// Equal operator.
+this->~AliITSQASSDDataMakerRec();
+new(this) AliITSQASSDDataMakerRec(qac);
+return *this;
 }
 */
 //__________________________________________________________________
@@ -193,27 +189,28 @@ void AliITSQASSDDataMakerRec::StartOfDetectorCycle()
   //if ( fAliITSQADataMakerRec->GetRawsData(0) == NULL ) // Raws not defined
   //return ;
  
- //for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- //if (!AliQAv1::Instance()->IsEventSpecieSet(specie)) continue;
-//cout << "StartOfDetectorCycle: Event specie " << specie << " is set" << endl;
+  //for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+  //if (!AliQAv1::Instance()->IsEventSpecieSet(specie)) continue;
+  //cout << "StartOfDetectorCycle: Event specie " << specie << " is set" << endl;
 
- //Detector specific actions at start of cycle
- AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SSD Cycle\n");
- //Int_t specie = fAliITSQADataMakerRec->GetEventSpecie();
+  //Detector specific actions at start of cycle
+  AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SSD Cycle\n");
+  //Int_t specie = fAliITSQADataMakerRec->GetEventSpecie();
 
- //}//event specie loop
+  //}//event specie loop
 
 }
 
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerRec::ResetRawsMonitoredObjects() {
+void AliITSQASSDDataMakerRec::ResetRawsMonitoredObjects() 
+{
   //Resetting the raw data monitored objects
   //Data size per DDL
   //for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
   //if (!AliQAv1::Instance()->IsEventSpecieSet(specie)) continue;
-    /*((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+4)))->Reset();
-    //Data size per LDC
-    ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+22)))->Reset();*/
+  /*((TH1F *)(fAliITSQADataMakerRec->ResetRawsData(fGenRawsOffset[specie]+4)));
+  //Data size per LDC
+  ((TH1F *)(fAliITSQADataMakerRec->ResetRawsData(fGenRawsOffset[specie]+22)));*/
   Int_t specie = fAliITSQADataMakerRec->GetEventSpecie();
   //cout << "(AliITSQASSDDataMakerRec::ResetRawsMonitoredObjects): Event specie " << specie << " is set" << endl;
   //online part
@@ -224,9 +221,9 @@ void AliITSQASSDDataMakerRec::ResetRawsMonitoredObjects() {
     }//module loop
     
     //for(Int_t iSSDOffset = 0; iSSDOffset < fSSDRawsCommonLevelOffset; iSSDOffset++)
-    //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+iSSDOffset))->Reset();
+    //(fAliITSQADataMakerRec->ResetRawsData(fGenRawsOffset[specie]+iSSDOffset));
     //for(Int_t iSSDOffset = fSSDRawsCommonLevelOffset; iSSDOffset < fSSDRawsOffset; iSSDOffset++)
-    //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+iSSDOffset))->Reset();
+    //(fAliITSQADataMakerRec->ResetRawsData(fGenRawsOffset[specie]+iSSDOffset));
 
     Int_t gHistPositionOccupancyPerLadder = 0;
     Int_t gLayer = 0, gLadder = 0, gModule = 0;
@@ -236,162 +233,159 @@ void AliITSQASSDDataMakerRec::ResetRawsMonitoredObjects() {
       gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
       
       //P-SIDE OCCUPANCY
-      fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->Reset();
+      int offs = fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES;
+      fAliITSQADataMakerRec->ResetRawsData(offs+gHistPositionOccupancyPerLadder);
       //N-SIDE OCCUPANCY
-      fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->Reset();
-      
-      ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->Reset();
-      ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->Reset();
+      fAliITSQADataMakerRec->ResetRawsData(offs+gHistPositionOccupancyPerLadder+1);
+      //
+      fAliITSQADataMakerRec->ResetRawsData(offs+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6);
+      fAliITSQADataMakerRec->ResetRawsData(offs+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1);
     }//module loop
   }//online flag
-  //}//event species loop
+  //
 }
 
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray* /*list*/)
+void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** /*list*/)
 {
-
-  //for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-  //if (!AliQAv1::Instance()->IsEventSpecieSet(specie)) continue;
-    //if (!AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie))) continue;
-
+  // finalize ssd cycle
+  //
   Int_t specie = fAliITSQADataMakerRec->GetEventSpecie();
-  fAliITSQADataMakerRec->SetEventSpecie(AliRecoParam::ConvertIndex(specie));
   //cout << "(AliITSQASSDDataMakerRec::EndOfDetectorCycle): Event specie " << specie << " is set" << endl;
   
   // launch the QA checking
   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
   AliDebug(AliQAv1::GetQADebugLevel(), Form("Offset: %d\n",fGenRawsOffset[specie]));
   //Printf("Offset: %d\n",fGenRawsOffset[specie]);
-  
+
   if(task == AliQAv1::kRAWS) {
-    
-    //  if (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]) != NULL ) {
-    //AliInfo(Form("Event type entries: %d - Physics events: %d"),((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]))->GetEntries(),((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]))->GetBinContent(((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]))->FindBin(7)));
-    //cout<<"(EndOfDetectorCycle) Event type entries: "<<((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]))->GetEntries()<< " type 7: " << ((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]))->GetBinContent(((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]))->FindBin(7)) << endl;
-    
-    //AliInfo(Form("SSD Data Size entries: %d"),((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+1))->GetEntries());
-    //cout<<"SSD Data Size entries: "<<((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+1))->GetEntries()<<endl;
-    
-    //Data size per DDL
-    for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
-      Double_t gSizePerDDL = ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+5+i))->GetMean();
-      //cout<<"DDL: "<<i+512<<" - Size: "<<gSizePerDDL<<" - Mean: "<<
-      //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+5+i))->GetMean()<<endl;
-      //cout<<"Entries: "<<((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+5+i))->GetEntries()<<endl;
-      ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+4)))->SetBinContent(i+1,gSizePerDDL);
-      //cout<<"After filling DDL: "<<i+512<<" - Size: "<<((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+4)))->GetBinContent(i+1)<<endl;
-    }
-    
-    
-    //Data size per LDC
-    for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
-      Double_t gSizePerLDC = ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+23+i))->GetMean();
-      ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+22)))->SetBinContent(i+1,gSizePerLDC);
-      //cout<<"LDC: "<<i+170<<" - Size: "<<gSizePerLDC<<" - Mean: "<<
-      //" - Size: "<<((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+23+i))->GetMean()<<endl;
-    }
-    
-    //cout<<"Data size/ DDL entries: "<<((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+4))->GetEntries()<< " mean: " << ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+4))->GetMean()<<endl;   
-    //    cout<<"Data size/ LDC entries: "<<((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+22))->GetEntries()<< " mean: " << ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+22))->GetMean()<<endl;
-    
-    //online part
-    if(fkOnline) {
-      //Output of the DA
-      MonitorOCDBObjects();
-      //Monitor common mode values
-      MonitorCMValues();
-      
-      Int_t gHistPositionOccupancyPerModule = 0;
-      Int_t gLayer = 0, gLadder = 0, gModule = 0;
-      //occupancy per module
-      for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
-       AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
-       
-       gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
-       for(Int_t iBins = 1; iBins < fHistSSDRawSignalModule[iModule]->GetXaxis()->GetNbins(); iBins++)
-         fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)->SetBinContent(iBins,fOccupancyMatrix[iModule][iBins-1]);
-       
-       if(fSSDEventPerCycle != 0)
-         ((TH1F *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)))->Scale(100./fSSDEventPerCycle);
-      }//module loop
-      
-      //AliInfo(Form("Entries occupancy 511/3: %d"),((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+222))->GetEntries());
-      //  cout<<"Entries occupancy 511/3 : "<<((TH1D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+222))->GetEntries()<<endl;
-      
-      //occupancy per ladder
-      Int_t gHistPositionOccupancyPerLadder = 0;
-      Int_t lLadderLocationY = 0;
-      Double_t occupancy = 0.0, occupancyThreshold = 0.0, occupancyAverage = 0.0;
-      for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
-       AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
-       
-       gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
-       gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
-       
-       //P-SIDE OCCUPANCY
-       occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,0,0);
-       occupancyThreshold = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,1,3);
-       occupancyAverage = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,2,0);
-       
-       fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->SetBinContent(gModule,occupancy);
-       lLadderLocationY = 3*gLadder; // sideP=1 sideN=0 
-       if(gLayer == 5) {
-         //occupancy per module - no threshold
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY,occupancy);
-         //occupancy per module - threshold @ 3%
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2))->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
-         //average occupancy per module
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4))->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
-       }
-       else if(gLayer == 6) {
-         //occupancy per module - no threshold
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY,occupancy);
-         //occupancy per module - threshold @ 3%
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
-         //average occupancy per module
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+5))->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
-       }
-       
-       //N-SIDE OCCUPANCY
-       occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,0,0);   
-       occupancyThreshold = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,1,3);   
-       occupancyAverage = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,2,0);   
-       
-       fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->SetBinContent(gModule,occupancy);
-       if(gLayer == 5) {
-         //occupancy per module - no threshold
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
-         //occupancy per module - threshold @ 3%
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2))->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
-         //average occupancy per module
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4))->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
-       }
-       else if(gLayer == 6) {
-         //occupancy per module - no threshold
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
-         //occupancy per module - threshold @ 3%
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
-         //average occupancy per module
-         ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+5))->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
+    //
+    for (int trCl=-1;trCl<fAliITSQADataMakerRec->GetNTrigClasses();trCl++) { // RS Loop over all trigger classes (+ global counter, -1)
+      //
+      TObjArray &harr = *fAliITSQADataMakerRec->GetRawsDataOfTrigClass(trCl);
+      int offs = fGenRawsOffset[specie];
+      int nSSDEventPerCycle = fAliITSQADataMakerRec->GetEvCountCycleRaws(trCl);
+      //    
+      //Data size per DDL
+      for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
+       if (!(harr[offs+5+i] && harr[offs+4+i])) continue;
+       Double_t gSizePerDDL = ((TH1*)harr[offs+5+i])->GetMean();
+       //cout<<"DDL: "<<i+512<<" - Size: "<<gSizePerDDL<<" - Mean: "<<gSizePerDDL<<endl;
+       //cout<<"Entries: "<<((TH1*)harr[offs+5+i])->GetEntries()<<endl;
+       ((TH1*)harr[offs+4+i])->SetBinContent(i+1,gSizePerDDL);
+       //cout<<"After filling DDL: "<<i+512<<" - Size: "<< ((TH1F*)harr[offs+4+i])->GetBinContent(i+1)<<endl;
+      }
+      //
+      //Data size per LDC
+      for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
+       if ( !(harr[offs+23+i]&&harr[offs+22+i])) continue;
+       Double_t gSizePerLDC = ((TH1*)harr[offs+23+i])->GetMean();
+       ((TH1*)harr[offs+22+i])->SetBinContent(i+1,gSizePerLDC);
+       //cout<<"LDC: "<<i+170<<" - Size: "<<gSizePerLDC<<" - Mean: "<<" - Size: "<<((TH1*)harr[offs+23+i])->GetMean()<<endl;
+      }
+      //
+      //if (harr[offs+4])  cout<<"Data size/ DDL entries: "<<((TH1*)harr[offs+4 ])->GetEntries()<< " mean: " << ((TH1*)harr[offs+4])->GetMean()<<endl;   
+      //if (harr[offs+22]) cout<<"Data size/ LDC entries: "<<((TH1*)harr[offs+22])->GetEntries()<< " mean: " << ((TH1*)harr[offs+22])->GetMean()<<endl;
+      //
+      //online part
+      if(fkOnline) {
+       //Output of the DA
+       MonitorOCDBObjects(trCl);
+       //Monitor common mode values
+       MonitorCMValues(trCl);
+       //
+       Int_t gHistPositionOccupancyPerModule = 0;
+       Int_t gLayer = 0, gLadder = 0, gModule = 0;
+       //occupancy per module
+       for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
+         AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);        
+         gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
+         TH1* htmp = (TH1*)harr[offs+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule];
+         if (htmp) {
+           for(Int_t iBins = 1; iBins < fHistSSDRawSignalModule[iModule]->GetXaxis()->GetNbins(); iBins++) htmp->SetBinContent(iBins,fOccupancyMatrix[iModule][iBins-1]);
+           if(nSSDEventPerCycle != 0) htmp->Scale(100./nSSDEventPerCycle);
+         }//module loop
        }
-      }//module loop
-    }//online flag for SSD
-    
-    //AliInfo(Form("Entries 2d occupancy no thres- lay 5: %d"),((TH2D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->GetEntries());
-    //cout<<"entries 2d occupancy thres- lay 6: "<<((TH2D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->GetEntries()<< " mean: " << ((TH2D*)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->GetMean() << endl; //Somehow the other occupancy maps do give nonzero values for GetMean() here
-    
-    fSSDEventPerCycle = 0;
-    
-    //cout<<"Data size/ DDL entries: "<<((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[1]+4))->GetEntries()<< " mean: " << ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[1]+4))->GetMean()<<endl;   
-    
-    //Reset of the raws
-    ResetRawsMonitoredObjects();
-    
+       //
+       //occupancy per ladder
+       Int_t gHistPositionOccupancyPerLadder = 0;
+       Int_t lLadderLocationY = 0;
+       Double_t occupancy = 0.0, occupancyThreshold = 0.0, occupancyAverage = 0.0;
+       for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
+         AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
+         //
+         gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
+         gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
+         //
+         TH1* htmpo = (TH1*)harr[offs+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule];
+         TH1* h1t = 0;
+         TH2* h2t = 0;
+         if (htmpo) {
+           //P-SIDE OCCUPANCY
+           occupancy          = GetOccupancyModule(htmpo,0,0,0);
+           occupancyThreshold = GetOccupancyModule(htmpo,0,1,3);
+           occupancyAverage   = GetOccupancyModule(htmpo,0,2,0);
+           if ( (h1t=(TH1*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder]) ) h1t->SetBinContent(gModule,occupancy);
+           lLadderLocationY = 3*gLadder; // sideP=1 sideN=0 
+           if(gLayer == 5) {
+             //occupancy per module - no threshold
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6])   ) h2t->SetBinContent(gModule,lLadderLocationY,occupancy);
+             //occupancy per module - threshold @ 3%
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2]) ) h2t->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
+             //average occupancy per module
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4]) ) h2t->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
+           }
+           else if(gLayer == 6) {
+             //occupancy per module - no threshold
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1]) ) h2t->SetBinContent(gModule,lLadderLocationY,occupancy);
+             //occupancy per module - threshold @ 3%
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3]) ) h2t->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
+             //average occupancy per module
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+5]) ) h2t->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
+           }
+           //
+           //N-SIDE OCCUPANCY
+           //
+           occupancy          = GetOccupancyModule(htmpo,1,0,0);   
+           occupancyThreshold = GetOccupancyModule(htmpo,1,1,3);   
+           occupancyAverage   = GetOccupancyModule(htmpo,1,2,0);   
+           if ( (h1t=(TH1*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1]) ) h1t->SetBinContent(gModule,occupancy);
+           if(gLayer == 5) {
+             //occupancy per module - no threshold
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6])   ) h2t->SetBinContent(gModule,lLadderLocationY-1,occupancy);
+             //occupancy per module - threshold @ 3%
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2]) ) h2t->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
+             //average occupancy per module
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4]) ) h2t->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
+           }
+           else if(gLayer == 6) {
+             //occupancy per module - no threshold
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1]) ) h2t->SetBinContent(gModule,lLadderLocationY-1,occupancy);
+             //occupancy per module - threshold @ 3%
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3]) ) h2t->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
+             //average occupancy per module
+             if ( (h2t=(TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4]) ) h2t->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
+           }
+         } // htmpo
+       }//module loop
+      }//online flag for SSD
+      //
+      //TH2* h2tmp = (TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6];
+      //if (h2tmp) AliInfo(Form("Entries 2d occupancy no thres- lay 5: %d"),h2tmp->GetEntries());
+      //h2tmp = (TH2*)harr[offs+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3];
+      //cout<<"entries 2d occupancy thres- lay 6: "<<h2tmp->GetEntries()<< " mean: " << h2tmp->GetMean() << endl; //Somehow the other occupancy maps do give nonzero values for GetMean() here
+      //
+      // TH1* h1tmp = (TH1*)harr[fGenRawsOffset[1]+4];
+      // if (h1tmp) cout<<"Data size/ DDL entries: "<<h1tmp->GetEntries()<< " mean: " << h1tmp->GetMean()<<endl;   
+      //Reset of the raws
+    } //  RS Loop over all trigger classes (+ global counter, -1)
     //AliQAChecker::Instance()->Run( AliQAv1::kITS , task, list);
+    //
+    ResetRawsMonitoredObjects();
   }//raw data end of cycle
-  
-  //} //event specie loop
+  //
+      
+  // 
 }
 
 //____________________________________________________________________________ 
@@ -407,7 +401,8 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
   //if (!AliQAv1::Instance()->IsEventSpecieSet(specie)) continue;
   Int_t specie = fAliITSQADataMakerRec->GetEventSpecie();
   //cout << "(AliITSQASSDDataMakerRec::InitRaws): Event specie " << specie << " is set" << endl;
-  //cout << "(AliITSQASSDDataMakerRec::InitRaws): Offset " << fGenRawsOffset[specie] << endl;
+  //cout << "(AliITSQASSDDataMakerRec::InitRaws): Offset " << offsRw << endl;
+  int offsRw = fGenRawsOffset[specie];
     
     
   if(fkOnline) {
@@ -416,69 +411,69 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
   else {
     AliDebug(AliQAv1::GetQADebugLevel(), "Book Offline Histograms for SSD\n ");
   }
-  AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD): %d\n",fGenRawsOffset[specie]));
+  AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD): %d\n",offsRw));
   
   TString gTitle;
   TString gName;
   //book online-offline QA histos
-  TH1D *fHistSSDEventType = new TH1D("fHistSSDEventType",
+  TH1F *fHistSSDEventType = new TH1F("fHistSSDEventType",
                                     "SSD Event Type;Event type;Events",
                                     31,-1,30);
   fHistSSDEventType->SetStats(kFALSE);
   rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDEventType, 
-                                          fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                          offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  //cout<<"(AliITSQASSDDataMakerRec::InitRaws): "<<fGenRawsOffset[specie]+fSSDRawsOffset-1<<" - Name: "<<(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset[specie]))->GetName()<<endl;
-  TH1D *fHistSSDDataSize = new TH1D("fHistSSDDataSize",
+  //cout<<"(AliITSQASSDDataMakerRec::InitRaws): "<<offsRw+fSSDRawsOffset-1<<" - Name: "<<(fAliITSQADataMakerRec->GetRawsData(offsRw))->GetName()<<endl;
+  TH1F *fHistSSDDataSize = new TH1F("fHistSSDDataSize",
                                    "SSD Data Size;(SSD data size) [KB];Events",
                                    1000,0,500);
   rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSize, 
-                                          fGenRawsOffset[specie]+fSSDRawsOffset, !expert, !image, !saveCorr);
+                                          offsRw+fSSDRawsOffset, !expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1D *fHistSSDDataSizePercentage = new TH1D("fHistSSDDataSizePercentage",
+  TH1F *fHistSSDDataSizePercentage = new TH1F("fHistSSDDataSizePercentage",
                                              "SSD Data Size Percentage;SSD data size [%];Events",
                                              1000,0,100);
   rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePercentage, 
-                                          fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                          offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1D *fHistSSDDDLId = new TH1D("fHistSSDDDLId",
+  TH1F *fHistSSDDDLId = new TH1F("fHistSSDDDLId",
                                 "SSD DDL Id;DDL id;Events",16,511.5,527.5);
   fHistSSDDDLId->SetStats(kFALSE);
   rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDDLId, 
-                                          fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                          offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1D *fHistSSDDataSizePerDDL = new TH1D("fHistSSDDataSizePerDDL",
+  TH1F *fHistSSDDataSizePerDDL = new TH1F("fHistSSDDataSizePerDDL",
                                          "SSD Data Size Per DDL;DDL id;<SSD data size> [KB]",
                                          16,511.5,527.5);
   fHistSSDDataSizePerDDL->SetStats(kFALSE);
   rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerDDL, 
-                                          fGenRawsOffset[specie]+fSSDRawsOffset, !expert, image, !saveCorr);
+                                          offsRw+fSSDRawsOffset, !expert, image, !saveCorr);
 
   fSSDRawsOffset += 1;
-  TH1D *fHistSSDDataSizeDDL[fgkNumOfDDLs];
+  TH1F *fHistSSDDataSizeDDL[fgkNumOfDDLs];
   for(Int_t i = 1; i < fgkNumOfDDLs+1; i++) {
     gName = Form("fHistSSDDataSizeDDL%d", i+511) ;
     gTitle = Form("SSD Data Size DDL %d", i+511) ;
-    fHistSSDDataSizeDDL[i-1] = new TH1D(gName.Data(),
+    fHistSSDDataSizeDDL[i-1] = new TH1F(gName.Data(),
                                        Form("%s;(SSD data size) [KB];Events", gTitle.Data()),
                                        100,0,50);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeDDL[i-1], 
-                                            fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
   }
   
-  TH1D *fHistSSDLDCId = new TH1D("fHistSSDLDCId","SSD LDC Id;LDC id;Events",8,169.5,177.5);
+  TH1F *fHistSSDLDCId = new TH1F("fHistSSDLDCId","SSD LDC Id;LDC id;Events",8,169.5,177.5);
   fHistSSDLDCId->SetStats(kFALSE);
   rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDLDCId, 
-                                          fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                          offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
   fSSDRawsOffset += 1;
-  TH1D *fHistSSDDataSizePerLDC = new TH1D("fHistSSDDataSizePerLDC",
+  TH1F *fHistSSDDataSizePerLDC = new TH1F("fHistSSDDataSizePerLDC",
                                          "SSD Data Size Per LDC;LDC id;<SSD data size> [KB]",
                                          8,169.5,177.5);
   fHistSSDDataSizePerLDC->SetStats(kFALSE);
   rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerLDC, 
-                                          fGenRawsOffset[specie]+fSSDRawsOffset, expert, image, !saveCorr);  fSSDRawsOffset += 1;
-  TH1D *fHistSSDDataSizeLDC[fgkNumOfLDCs];
+                                          offsRw+fSSDRawsOffset, expert, image, !saveCorr);  fSSDRawsOffset += 1;
+  TH1F *fHistSSDDataSizeLDC[fgkNumOfLDCs];
   for(Int_t i = 1; i < fgkNumOfLDCs+1; i++) {
     gName = "fHistSSDDataSizeLDC"; 
     if(i == 1) gName += "170";
@@ -491,11 +486,11 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     if(i == 8) gName += "177";
     
     gTitle = "SSD Data Size LDC "; gTitle += gName.Data();
-    fHistSSDDataSizeLDC[i-1] = new TH1D(gName.Data(),
+    fHistSSDDataSizeLDC[i-1] = new TH1F(gName.Data(),
                                        Form("%s;SSD data size [KB];Events", gTitle.Data()),
                                        1000,0,100);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeLDC[i-1], 
-                                            fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
   }
   fSSDRawsCommonLevelOffset = fSSDRawsOffset;
@@ -503,7 +498,7 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
   if(fkOnline) {
     Int_t gLayer = 0, gLadder = 0, gModule = 0;
     //occupancy per SSD module
-    TH1D *fHistSSDOccupancyModule[fgkSSDMODULES]; 
+    TH1F *fHistSSDOccupancyModule[fgkSSDMODULES]; 
     for(Int_t i = 500; i < fgkSSDMODULES + 500; i++) {
       AliITSgeomTGeo::GetModuleId(i,gLayer,gLadder,gModule);
       gName = "fHistSSD_Occupancy_Layer";
@@ -523,17 +518,17 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
       gName += "_Module"; gName += gModule; 
       gTitle += "_Module"; gTitle += gModule; 
       
-      fHistSSDOccupancyModule[i-500] = new TH1D(gName.Data(),Form("%s;N_{strip};Occupancy [%%]", gTitle.Data()),
+      fHistSSDOccupancyModule[i-500] = new TH1F(gName.Data(),Form("%s;N_{strip};Occupancy [%%]", gTitle.Data()),
                                                2*fgkNumberOfPSideStrips,0,2*fgkNumberOfPSideStrips);
       fHistSSDOccupancyModule[i-500]->GetXaxis()->SetTitleColor(1);
       rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyModule[i-500], 
-                                              fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                              offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
       fSSDRawsOffset += 1;
     }
     
     //Occupancy per SSD ladder
     Int_t occupancyCounter = 0;
-    TH1D *fHistSSDOccupancyLadder[2*(fgkSSDLADDERSLAYER5 + fgkSSDLADDERSLAYER6)];
+    TH1F *fHistSSDOccupancyLadder[2*(fgkSSDLADDERSLAYER5 + fgkSSDLADDERSLAYER6)];
     for(Int_t iLayer = 5; iLayer < 7; iLayer++) {
       for(Int_t iLadder = 1; iLadder < AliITSgeomTGeo::GetNLadders(iLayer) + 1; iLadder++) {
         //P-side occupancy plots
@@ -553,13 +548,13 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
         }
         gName += "_PSide";
         gTitle += "_PSide";
-        fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gName.Data(),
+        fHistSSDOccupancyLadder[occupancyCounter] = new TH1F(gName.Data(),
                                                              Form("%s;Module number;Occupancy [%%]", gTitle.Data()),
                                                              AliITSgeomTGeo::GetNDetectors(iLayer),
                                                              0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
         fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
         rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter], 
-                                            fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                                offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
         occupancyCounter += 1; fSSDRawsOffset += 1;
         //N-side occupancy plots
         gName = "fHistSSD_Occupancy_Layer"; 
@@ -578,20 +573,20 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
         }
         gName += "_NSide";
         gTitle += "_NSide";
-        fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gName.Data(),
+        fHistSSDOccupancyLadder[occupancyCounter] = new TH1F(gName.Data(),
                                                              Form("%s;Module number;Occupancy [%%]", gTitle.Data()),
                                                              AliITSgeomTGeo::GetNDetectors(iLayer),
                                                              0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
         fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
         rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter], 
-                                            fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                                offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
         occupancyCounter += 1; fSSDRawsOffset += 1;
       }//ladder loop
     }//layer loop
 
     //top level occupancy plots
     //occupancy per module - no threshold
-    TH2D *fHistSSDOccupancyLayer5 = new TH2D("fHistSSDOccupancyLayer5",
+    TH2F *fHistSSDOccupancyLayer5 = new TH2F("fHistSSDOccupancyLayer5",
                                             "SSD Occupancy (Layer 5) - No threshold;N_{modules};N_{Ladders}",
                                             fgkSSDMODULESPERLADDERLAYER5,
                                             0,fgkSSDMODULESPERLADDERLAYER5,
@@ -605,9 +600,9 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     }
     fHistSSDOccupancyLayer5->SetStats(kFALSE);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5, 
-                                       fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
-    TH2D *fHistSSDOccupancyLayer6 = new TH2D("fHistSSDOccupancyLayer6",
+    TH2F *fHistSSDOccupancyLayer6 = new TH2F("fHistSSDOccupancyLayer6",
                                             "Occupancy per module (Layer 6) - No threshold;N_{modules};N_{Ladders}",
                                             fgkSSDMODULESPERLADDERLAYER6,
                                             0,fgkSSDMODULESPERLADDERLAYER6,
@@ -620,11 +615,11 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     }
     fHistSSDOccupancyLayer6->SetStats(kFALSE);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6, 
-                                        fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
 
     //occupancy per module - threshold @ 3%
-    TH2D *fHistSSDOccupancyThresholdLayer5 = new TH2D("fHistSSDOccupancyThresholdLayer5",
+    TH2F *fHistSSDOccupancyThresholdLayer5 = new TH2F("fHistSSDOccupancyThresholdLayer5",
                                                      "Occupancy per module (Layer 5) - Threshold 3%;N_{modules};N_{Ladders};Entries",
                                                      fgkSSDMODULESPERLADDERLAYER5,
                                                      0,fgkSSDMODULESPERLADDERLAYER5,
@@ -637,9 +632,9 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     }
     fHistSSDOccupancyThresholdLayer5->SetStats(kFALSE);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer5, 
-                                        fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
-    TH2D *fHistSSDOccupancyThresholdLayer6 = new TH2D("fHistSSDOccupancyThresholdLayer6",
+    TH2F *fHistSSDOccupancyThresholdLayer6 = new TH2F("fHistSSDOccupancyThresholdLayer6",
                                                      "Occupancy per module (Layer 6) - Threshold 3%;N_{modules};N_{Ladders}",
                                                      fgkSSDMODULESPERLADDERLAYER6,
                                                      0,fgkSSDMODULESPERLADDERLAYER6,
@@ -652,11 +647,11 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     }
     fHistSSDOccupancyThresholdLayer6->SetStats(kFALSE);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer6, 
-                                       fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1;
 
     //Average occupancy per module
-    TH2D *fHistSSDAverageOccupancyLayer5 = new TH2D("fHistSSDAverageOccupancyLayer5",
+    TH2F *fHistSSDAverageOccupancyLayer5 = new TH2F("fHistSSDAverageOccupancyLayer5",
                                                    "Average occupancy per module (Layer 5);N_{modules};N_{Ladders}",
                                                    fgkSSDMODULESPERLADDERLAYER5,
                                                    0,fgkSSDMODULESPERLADDERLAYER5,
@@ -669,9 +664,9 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     }
     fHistSSDAverageOccupancyLayer5->SetStats(kFALSE);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer5, 
-                                            fGenRawsOffset[specie]+fSSDRawsOffset, !expert, image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, !expert, image, !saveCorr);
     fSSDRawsOffset += 1;
-    TH2D *fHistSSDAverageOccupancyLayer6 = new TH2D("fHistSSDAverageOccupancyLayer6",
+    TH2F *fHistSSDAverageOccupancyLayer6 = new TH2F("fHistSSDAverageOccupancyLayer6",
                                                    "Average occupancy per module (Layer 6);N_{modules};N_{Ladders}",
                                                    fgkSSDMODULESPERLADDERLAYER6,
                                                    0,fgkSSDMODULESPERLADDERLAYER6,
@@ -684,11 +679,11 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     }
     fHistSSDAverageOccupancyLayer6->SetStats(kFALSE);
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer6, 
-                                            fGenRawsOffset[specie]+fSSDRawsOffset, !expert, image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, !expert, image, !saveCorr);
     fSSDRawsOffset += 1;
 
     //Output of the DA
-    TH2D *fHistSSDPSideBadChannelMapLayer5 = new TH2D("fHistSSDPSideBadChannelMapLayer5",
+    TH2F *fHistSSDPSideBadChannelMapLayer5 = new TH2F("fHistSSDPSideBadChannelMapLayer5",
                                                      "Layer 5;N_{module};N_{ladder}",
                                                      22,1,23,
                                                      34,500,534);
@@ -702,10 +697,10 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() {
     fHistSSDPSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
     fHistSSDPSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
     rv = fAliITSQADataMakerRec->Add2RawsList(fHistSSDPSideBadChannelMapLayer5, 
-                                            fGenRawsOffset[specie]+fSSDRawsOffset, expert, !image, !saveCorr);
+                                            offsRw+fSSDRawsOffset, expert, !image, !saveCorr);
     fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
     
-    TH2D *fHistSSDNSideBadChannelMapLayer5 = new TH2D("fHistSSDNSideBadChannelMapLayer5",
+    TH2F *fHistSSDNSideBadChannelMapLayer5 = new TH2F("fHistSSDNSideBadChannelMapLayer5",
                                                      "Layer 5;N_{module};N_{l