Changes in QA to be able to process separately different triggers (Ruben)
[u/mrichter/AliRoot.git] / ACORDE / AliACORDEQADataMakerRec.cxx
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