LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSQASPDChecker.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 15 305 4.9 %
Date: 2016-06-14 17:26:59 Functions: 4 14 28.6 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : 
      16             : /* $Id $ */
      17             : 
      18             : // *****************************************
      19             : //  Checks the quality assurance 
      20             : //  by comparing with reference data
      21             : //  P. Cerello Apr 2008
      22             : //  INFN Torino
      23             : 
      24             : // --- ROOT system ---
      25             : #include "TH1.h"
      26             : #include "TH2F.h"
      27             : #include "TString.h"
      28             : #include "TList.h"
      29             : #include "TCanvas.h"
      30             : #include "TFrame.h"
      31             : #include "TStyle.h"
      32             : #include "TPaletteAxis.h"
      33             : #include "TPaveStats.h"
      34             : #include "TFrame.h"
      35             : 
      36             : // --- AliRoot header files ---
      37             : #include"AliQACheckerBase.h"
      38             : #include "AliITSQASPDChecker.h"
      39             : #include "AliITSQADataMakerRec.h"
      40             : #include "AliLog.h"
      41             : 
      42         118 : ClassImp(AliITSQASPDChecker)
      43             : //__________________________________________________________________
      44             : AliITSQASPDChecker::AliITSQASPDChecker() : 
      45           3 :   TObject(),
      46           3 :   fSubDetOffset(0), 
      47           3 :   fStepBitSPD(NULL),
      48           3 :   fLowSPDValue(NULL),
      49           3 :   fHighSPDValue(NULL),
      50           3 :   fImage(NULL) 
      51          15 : {
      52             :   // default contructor
      53           6 : }
      54             : //__________________________________________________________________
      55             : AliITSQASPDChecker& AliITSQASPDChecker::operator = (const AliITSQASPDChecker& qac ) 
      56             : {
      57             :   // Equal operator.
      58           0 :   this->~AliITSQASPDChecker();
      59           0 :   new(this) AliITSQASPDChecker(qac);
      60           0 :   return *this;
      61           0 : }
      62             : //__________________________________________________________________
      63           0 : AliITSQASPDChecker::~AliITSQASPDChecker() {
      64             :   // destructor
      65           0 :   if(fStepBitSPD) delete[] fStepBitSPD ;
      66           0 :   if(fLowSPDValue)delete[]fLowSPDValue;
      67           0 :   if(fHighSPDValue) delete[]fHighSPDValue;
      68           0 :   if(fImage) delete[]fImage;
      69           0 : } 
      70             : 
      71             : //__________________________________________________________________
      72             : Double_t AliITSQASPDChecker::Check(AliQAv1::ALITASK_t index, TObjArray * list, const AliDetectorRecoParam * /*recoParam*/)
      73             : {
      74             :   //
      75             :   // General methods for SPD Cheks to be used in RAWS and REC ALITASK_t
      76             :   //
      77             : 
      78           0 :   AliDebug(2, Form("AliITSQASPDChecker called with offset: %d\n", fSubDetOffset));
      79             : 
      80             :   Double_t test = 0.0;
      81             :   Int_t count = 0;
      82             :   // Checks for ALITASK_t AliQAv1::kRAW
      83           0 :   if(index == AliQAv1::kRAW) {
      84           0 :     return CheckRawData(list);
      85             :   } else {
      86           0 :     if (list->GetEntries() == 0) {
      87             :       test = 1.; // nothing to check
      88           0 :     }
      89             :     else {
      90           0 :       TIter next(list);
      91             :       TH1 * hdata;
      92             :       count = 0;
      93           0 :       while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
      94           0 :         if (hdata) {
      95           0 :           TString histName = hdata->GetName();
      96           0 :           if (!histName.Contains("_SPD")) continue;
      97             :           Double_t rv = 0.;
      98           0 :           if (hdata->GetEntries()>0) rv = 1;
      99           0 :           if (histName.Contains("LayPattern")) {
     100           0 :             if (hdata->GetBinContent(1)) {
     101           0 :               Double_t ratio=hdata->GetBinContent(2)/hdata->GetBinContent(1);
     102           0 :               AliDebug(2, Form("%s: ratio RecPoints lay2 / lay1 = %f", hdata->GetName(), ratio));
     103           0 :             }
     104             :             else
     105           0 :               AliDebug(AliQAv1::GetQADebugLevel(), "No RecPoints in lay1");
     106             :           }
     107           0 :           else if(histName.Contains("ModPattern")) {
     108             :             Int_t ndead=0;
     109           0 :             for(Int_t ibin=0;ibin<hdata->GetNbinsX();ibin++) {
     110           0 :               if(histName.Contains("SPD1") && ibin<80 && hdata->GetBinContent(ibin+1)>0) ndead++;
     111           0 :               if(histName.Contains("SPD2") && ibin>79 && hdata->GetBinContent(ibin+1)>0) ndead++;
     112             :             }
     113           0 :             AliDebug(2, Form("%s: Entries = %d  number of empty modules = %d", 
     114             :                              hdata->GetName(),(Int_t)hdata->GetEntries(),ndead));
     115           0 :           }
     116           0 :           else if(histName.Contains("SizeYvsZ")) {
     117           0 :             Double_t meanz=hdata->GetMean(1);
     118           0 :             Double_t meany=hdata->GetMean(2);
     119           0 :             Double_t rmsz=hdata->GetRMS(1);
     120           0 :             Double_t rmsy=hdata->GetRMS(2);
     121           0 :             AliDebug(AliQAv1::GetQADebugLevel(), Form("%s: Cluster sizeY mean = %f  rms = %f", hdata->GetName(),meany,rmsy));
     122           0 :             AliDebug(AliQAv1::GetQADebugLevel(), Form("%s: Cluster sizeZ mean = %f  rms = %f", hdata->GetName(),meanz,rmsz));
     123           0 :           }
     124           0 :           else if(histName.Contains("SPDMultiplicity")) {
     125           0 :             AliDebug(2, Form("%s: Events = %d  mean = %f  rms = %f",
     126             :                              hdata->GetName(),(Int_t)hdata->GetEntries(),hdata->GetMean(),hdata->GetRMS()));}
     127             : 
     128             :           // else AliDebug(AliQAv1::GetQADebugLevel(), Form("%s -> %f", hdata->GetName(), rv));
     129           0 :           count++;
     130           0 :           test += rv;
     131           0 :         }
     132             :         else {
     133           0 :           AliError("Data type cannot be processed") ;
     134             :         }
     135             :       }
     136             : 
     137           0 :       if (count != 0) {
     138           0 :         if (AliITSQADataMakerRec::AreEqual(test,0)) {
     139           0 :           AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
     140           0 :           test = fHighSPDValue[AliQAv1::kWARNING];  //upper limit value to set kWARNING flag for a task
     141           0 :         }
     142             :         else {
     143           0 :           test /= count;
     144             :         }
     145             :       }
     146           0 :     }
     147             :   }
     148           0 :   AliDebug(AliQAv1::GetQADebugLevel(), Form("Test Result = %f", test));
     149           0 :   return test ;
     150             : 
     151           0 : }
     152             : //__________________________________________________________________
     153             : Double_t AliITSQASPDChecker::CheckRawData(const TObjArray * list) {
     154             :   //
     155             :   // Checks on the raw data histograms [ preliminary version ]
     156             :   // The output of this method is the fraction of SPD histograms which are processed by the checker. 
     157             :   // The methods returns fHighSPDValue[AliQAv1::kFATAL] in case of data format errors or MEB errors
     158             :   // 
     159             :   // A. Mastroserio
     160             : 
     161             :   Double_t test =0;
     162             : 
     163             :   // basic checks on input data
     164           0 :   if(!list) {
     165           0 :     AliError("NO histogram list for RAWS");
     166           0 :     return test;
     167             :   }
     168             : 
     169           0 :   if(list->GetEntries() == 0) {
     170           0 :     AliWarning("No histograms in RAW list \n");
     171           0 :     return test;
     172             :   }
     173             : 
     174             :   // loop over the raw data histograms
     175           0 :   TIter next(list);
     176             :   TH1 * hdata;
     177             :   Double_t totalHistos = 0;
     178             :   Double_t goodHistos = 0; // number of histograms which passed the checks
     179             :   Double_t response =0;
     180             :   Bool_t fatalProblem = kFALSE;
     181             : 
     182           0 :   while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
     183           0 :     if (hdata) {
     184           0 :       TString histName = hdata->GetName();
     185           0 :       if(!histName.Contains("SPD")) continue;
     186           0 :       totalHistos++;
     187             :       // data format error
     188           0 :       if(histName.Contains("SPDErrorsAll")){
     189           0 :         if(hdata->GetListOfFunctions()->GetEntries()<1) hdata->GetListOfFunctions()->Add(new TPaveText(0.09,0.74,0.945,0.94,"NDC"));
     190             : 
     191           0 :         for(Int_t i=0; i<hdata->GetListOfFunctions()->GetEntries(); i++){
     192           0 :           TString funcName = hdata->GetListOfFunctions()->At(i)->ClassName();
     193           0 :           if(funcName.Contains("TPaveText")){
     194           0 :             TPaveText *p = (TPaveText*)hdata->GetListOfFunctions()->At(i);
     195           0 :             p->Clear();
     196             : 
     197           0 :             if(hdata->Integral(0,hdata->GetNbinsX())>0){
     198             :               Bool_t isHighMult = kFALSE;
     199             :               Bool_t isDataCorrupted=kFALSE;
     200           0 :               for(Int_t ieq=0; ieq<20; ieq++){
     201           0 :                 if(hdata->GetBinContent(ieq+1,17+1)>0 && hdata->GetBinContent(ieq+1,20+1)>0) isHighMult = kTRUE;
     202           0 :                 for(Int_t iErr=1; iErr<20; iErr++){
     203           0 :                   if(iErr==20 || iErr==17) continue;
     204           0 :                   if(hdata->GetBinContent(ieq+1,iErr+1)>0) isDataCorrupted=kTRUE; 
     205             :                 }
     206             :               }
     207           0 :               if(isHighMult && !isDataCorrupted) {
     208           0 :                 p->SetFillColor(kOrange);
     209           0 :                 p->AddText("High occupancy in a chip detected (-> errors type 17,20 and 0 are present). ");
     210           0 :                 p->AddText("ONLY IF OTHER error types are present CALL the expert");
     211           0 :                 response = fHighSPDValue[AliQAv1::kWARNING];
     212           0 :               } else if(isDataCorrupted) {
     213           0 :                 p->SetFillColor(kRed);
     214           0 :                 p->AddText("Data Format NOT OK. Please call the expert!");
     215           0 :                 response = fHighSPDValue[AliQAv1::kFATAL];
     216             :                 fatalProblem=kTRUE;
     217           0 :               }
     218             :               continue;
     219             :             } // if errors 
     220             :             else {
     221           0 :               p->Clear();
     222           0 :               p->SetFillColor(kGreen);
     223           0 :               p->AddText("OK");
     224             :             }
     225           0 :           } // TPaveText
     226           0 :         } // list entries   
     227           0 :       } // data format error
     228             : 
     229             :       // MEB error
     230           0 :       else if(histName.Contains("MEB")){
     231           0 :         if(hdata->GetListOfFunctions()->GetEntries()<1) hdata->GetListOfFunctions()->Add(new TPaveText(0.09,0.735,0.945,0.935,"NDC"));
     232             : 
     233           0 :         for(Int_t i=0; i<hdata->GetListOfFunctions()->GetEntries(); i++){
     234           0 :           TString funcName = hdata->GetListOfFunctions()->At(i)->ClassName();
     235           0 :           if(funcName.Contains("TPaveText")){
     236           0 :             TPaveText *p = (TPaveText*)hdata->GetListOfFunctions()->At(i);
     237           0 :             p->Clear();
     238             : 
     239           0 :             if(hdata->GetEntries()>0){
     240           0 :               p->SetFillColor(kRed);
     241           0 :               p->AddText("MEB problem could be present. Please check if SPD is in READY state.");
     242           0 :               p->AddText("If SPD is in -READY- state, please notify it to the expert."); 
     243           0 :               response = fHighSPDValue[AliQAv1::kFATAL];
     244             :               fatalProblem=kTRUE;
     245           0 :               continue;
     246             : 
     247             :             } else {
     248           0 :               p->SetFillColor(kGreen);
     249           0 :               p->AddText("OK");
     250             :             }   
     251             : 
     252           0 :           } // pave text
     253           0 :         } // list 
     254           0 :       }
     255           0 :       goodHistos++;
     256           0 :     }
     257             :   }
     258           0 :   if(!fatalProblem) response = goodHistos/totalHistos;
     259             :   // printf("n histos %f - good ones %f ----> ratio %f , fatal response %i\n",totalHistos,goodHistos,goodHistos/totalHistos,(Int_t)fatalProblem);
     260             :   return response;
     261           0 : }
     262             : 
     263             : //__________________________________________________________________
     264             : void AliITSQASPDChecker::SetTaskOffset(Int_t TaskOffset)
     265             : {
     266             :   // Offset for SPD within ITS QA
     267           0 :   fSubDetOffset = TaskOffset;
     268           0 : }
     269             : 
     270             : //__________________________________________________________________
     271             : void AliITSQASPDChecker::SetStepBit(const Double_t *steprange) 
     272             : {
     273             :   // Step bit for SPD within ITS QA
     274           0 :   fStepBitSPD = new Double_t[AliQAv1::kNBIT];
     275           0 :   for(Int_t bit=0;bit<AliQAv1::kNBIT;bit++)
     276             :     {
     277           0 :       fStepBitSPD[bit]=steprange[bit];
     278             :     }
     279           0 : }
     280             : 
     281             : 
     282             : //__________________________________________________________________
     283             : void  AliITSQASPDChecker::SetSPDLimits(const Float_t *lowvalue, const Float_t * highvalue)
     284             : {
     285             :   // SPD limints for QA bit within general ITS QA
     286           6 :   fLowSPDValue = new Float_t[AliQAv1::kNBIT];
     287           3 :   fHighSPDValue= new Float_t[AliQAv1::kNBIT];
     288             : 
     289          30 :   for(Int_t bit=0;bit<AliQAv1::kNBIT;bit++)
     290             :     {
     291          12 :       fLowSPDValue[bit]=lowvalue[bit];
     292          12 :       fHighSPDValue[bit]= highvalue[bit];
     293             :     }
     294             : 
     295           3 : }
     296             : //__________________________________________________________________
     297             : Bool_t  AliITSQASPDChecker::MakeSPDImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, AliQAv1::MODE_t mode)
     298             : {
     299             :   //create the image for raws and recpoints. In the other case, the default methodof CheckerBase class will be used
     300             : 
     301             :   Bool_t val=kFALSE;
     302             : 
     303           0 :   fImage=(TCanvas**)AliQAChecker::Instance()->GetDetQAChecker(0)->GetImage();
     304             : 
     305           0 :   switch(task)
     306             :     {
     307             :     case AliQAv1::kRAWS:{
     308           0 :       val = MakeSPDRawsImage(list, task,mode);
     309             :     }
     310           0 :       break;
     311             :     case AliQAv1::kRECPOINTS:;
     312             :     case AliQAv1::kHITS:; 
     313             :     case AliQAv1::kESDS:; 
     314             :     case AliQAv1::kDIGITS:;
     315             :     case AliQAv1::kDIGITSR:;
     316             :     case AliQAv1::kSDIGITS:;
     317             :     case AliQAv1::kTRACKSEGMENTS:;
     318             :     case AliQAv1::kRECPARTICLES:; 
     319             :     default:
     320             :       {
     321             :         //AliQAChecker::Instance()->GetDetQAChecker(0)->MakeImage(list,task,mode);
     322             :         val = kFALSE;
     323             :       }
     324           0 :     break;
     325             :     case AliQAv1::kNULLTASKINDEX:; case  AliQAv1::kNTASKINDEX: 
     326           0 :       {AliWarning(Form("No histograms for these tasks ( %s ) \n", AliQAv1::GetTaskName(task).Data())); val = kFALSE;}
     327           0 :       break;
     328             :     }
     329           0 :   return val; 
     330           0 : }
     331             : //_______________________________________________________________________
     332             : Bool_t AliITSQASPDChecker::MakeSPDRawsImage(TObjArray ** list, AliQAv1::TASKINDEX_t task, AliQAv1::MODE_t mode )
     333             : {
     334             :   //
     335             :   // create layout of the histograms used in the DQM
     336             :   //
     337             : 
     338             :   // some style settings
     339           0 :   gStyle->SetOptStat(10);  
     340           0 :   gStyle->SetStatY(0.97);
     341           0 :   gStyle->SetStatX(0.99);
     342           0 :   gStyle->SetStatW(0.165);
     343           0 :   gStyle->SetTitleX(0.45);
     344           0 :   gStyle->SetTitleOffset(1.2);
     345             : 
     346           0 :   for (Int_t esIndex = 0 ; esIndex < AliRecoParam::kNSpecies ; esIndex++) {
     347             :     //printf("-------------------------> %i \n", esIndex);
     348           0 :     if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(esIndex)) || list[esIndex]->GetEntries() == 0) 
     349           0 :       {printf ("Nothing for %s \n", AliRecoParam::GetEventSpecieName(esIndex)); continue;}
     350             :     else{
     351           0 :       const Char_t * title = Form("QA_%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(esIndex)) ; 
     352           0 :       if ( !fImage[esIndex] ) {
     353           0 :         fImage[esIndex] = new TCanvas(title, title,6000,3200) ;
     354           0 :       }
     355             : 
     356           0 :       fImage[esIndex]->Clear() ; 
     357           0 :       fImage[esIndex]->SetTitle(title) ; 
     358           0 :       fImage[esIndex]->cd();
     359             : 
     360           0 :       TPaveText someText(0.015, 0.015, 0.98, 0.98);
     361           0 :       someText.AddText(title);
     362           0 :       someText.Draw(); 
     363           0 :       fImage[esIndex]->Print(Form("%s%s%d.%s", AliQAv1::GetImageFileName(), AliQAv1::GetModeName(mode), AliQAChecker::Instance()->GetRunNumber(), AliQAv1::GetImageFileFormat()), "ps") ; 
     364           0 :       fImage[esIndex]->Clear() ; 
     365             :       Int_t nx =3; 
     366             :       Int_t ny =2; 
     367             : 
     368           0 :       fImage[esIndex]->Divide(nx, ny) ; 
     369             : 
     370             :       TH1* hist = NULL ;
     371             :       Int_t npad = 1 ; 
     372           0 :       fImage[esIndex]->cd(npad); 
     373           0 :       fImage[esIndex]->cd(npad)->SetBorderMode(0) ;
     374             : 
     375           0 :       TIter next(list[esIndex]);
     376             : 
     377           0 :       while ( (hist=static_cast<TH1*>(next())) ) {
     378             :         //gPad=fImage[esIndex]->cd(npad)->GetPad(npad);
     379           0 :         if(!hist->TestBit(AliQAv1::GetImageBit())) continue;
     380           0 :         TString name(hist->GetName());
     381           0 :         if(name.Contains("SPDErrorsAll")) {
     382           0 :           fImage[esIndex]->cd(1) ;    
     383           0 :           for(Int_t i=0; i<hist->GetListOfFunctions()->GetEntries(); i++){
     384           0 :             TString funcName = hist->GetListOfFunctions()->At(i)->ClassName();
     385           0 :             if(funcName.Contains("TPaveText")){
     386           0 :               TPaveText *p = (TPaveText*)hist->GetListOfFunctions()->At(i);
     387           0 :               if(p->GetFillColor()!=kGreen){
     388           0 :                 gPad->SetFillColor(p->GetFillColor());
     389           0 :                 gPad->SetFillStyle(3001);
     390           0 :                 gPad->SetFrameFillColor(19);
     391           0 :               }
     392           0 :             }
     393           0 :           }    
     394           0 :           gPad->SetBorderMode(0) ;  
     395           0 :           gPad->SetRightMargin(0.05);
     396           0 :           gPad->SetLeftMargin(0.1);
     397           0 :           gPad->SetTopMargin(0.25);
     398           0 :           gPad->SetGridx();
     399           0 :           gPad->SetGridy();
     400           0 :           hist->SetOption("text");
     401           0 :           hist->GetYaxis()->SetLabelSize(0.030);
     402           0 :           hist->GetYaxis()->SetNdivisions(211);
     403           0 :           hist->GetXaxis()->SetLabelSize(0.030);
     404           0 :           hist->GetXaxis()->SetNdivisions(20);
     405           0 :           hist->DrawCopy();
     406           0 :           gPad->Update();
     407             :         }     
     408           0 :         if(name.Contains("MEB")) {
     409           0 :           fImage[esIndex]->cd(4) ; 
     410           0 :           for(Int_t i=0; i<hist->GetListOfFunctions()->GetEntries(); i++){
     411           0 :             TString funcName = hist->GetListOfFunctions()->At(i)->ClassName();
     412           0 :             if(funcName.Contains("TPaveText")){
     413           0 :               TPaveText *p = (TPaveText*)hist->GetListOfFunctions()->At(i);
     414           0 :               if(p->GetFillColor()!=kGreen){
     415           0 :                 gPad->SetFillColor(p->GetFillColor());
     416           0 :                 gPad->SetFillStyle(3001);
     417           0 :                 gPad->SetFrameFillColor(19);
     418           0 :               }
     419           0 :             }
     420           0 :           }
     421           0 :           gPad->SetBorderMode(0) ;  
     422           0 :           gPad->SetGridy();
     423           0 :           gPad->SetGridx();
     424           0 :           gPad->SetRightMargin(0.05);
     425           0 :           gPad->SetLeftMargin(0.1);
     426           0 :           gPad->SetBottomMargin(0.1);
     427           0 :           gPad->SetTopMargin(0.27);
     428           0 :           hist->GetXaxis()->SetLabelSize(0.033);
     429           0 :           hist->SetOption("text") ;
     430           0 :           hist->DrawCopy();  
     431             :         }     
     432           0 :         if(name.Contains("SPDFastOrCorrelation")){
     433           0 :           fImage[esIndex]->cd(7) ; 
     434           0 :           gPad->SetBorderMode(0) ;  
     435           0 :           hist->SetOption("") ;
     436           0 :           hist->DrawCopy();               
     437             :         }
     438           0 :         if(name.Contains("SPDHitMapStaveChipInner")){
     439           0 :           fImage[esIndex]->cd(2) ;
     440           0 :           gStyle->SetStatX(0.81);
     441           0 :           gStyle->SetStatY(0.942);
     442           0 :           gPad->SetBorderMode(0) ;  
     443           0 :           gPad->SetRightMargin(0.25);
     444           0 :           gPad->SetGridx();
     445           0 :           gPad->SetGridy();
     446           0 :           hist->SetObjectStat(0);
     447           0 :           hist->SetOption("colz") ;
     448           0 :           hist->DrawCopy();               
     449             :         }
     450           0 :         if(name.Contains("SPDHitMapStaveChipOuter")){
     451           0 :           fImage[esIndex]->cd(3) ;
     452           0 :           gStyle->SetStatX(0.81);
     453           0 :           gStyle->SetStatY(0.942);
     454           0 :           gPad->SetBorderMode(0) ;  
     455           0 :           gPad->SetRightMargin(0.25);
     456           0 :           gPad->SetGridx();
     457           0 :           gPad->SetGridy();
     458           0 :           hist->SetObjectStat(0);
     459           0 :           hist->SetOption("colz") ;
     460           0 :           hist->DrawCopy();   
     461           0 :           gPad->Update();
     462             :         }
     463           0 :         if(name.Contains("SPDFastOrMapStaveChip")){
     464           0 :           fImage[esIndex]->cd(8) ; 
     465           0 :           gPad->SetBorderMode(0) ;  
     466           0 :           gPad->SetRightMargin(0.1);
     467           0 :           gPad->SetLeftMargin(0.15);
     468           0 :           gPad->SetBottomMargin(0.15);
     469           0 :           gPad->SetTopMargin(-0.2);
     470           0 :           gPad->SetGridy();
     471           0 :           gPad->SetGridx();
     472           0 :           hist->SetObjectStat(0);
     473           0 :           hist->SetOption("colz") ;
     474           0 :           hist->DrawCopy("colz");   
     475           0 :           TH2F *h2 =  (TH2F*)(gPad->GetListOfPrimitives()->At(0)); 
     476           0 :           for(Int_t i=0; i<h2->GetListOfFunctions()->GetEntries(); i++){
     477           0 :             TString cname = h2->GetListOfFunctions()->At(i)->ClassName();
     478           0 :             if(cname.Contains("TPaletteAxis")){
     479           0 :               TPaletteAxis *palette = (TPaletteAxis*)(h2->GetListOfFunctions()->At(i));
     480           0 :               if(palette) palette->SetLabelSize(0.02);
     481           0 :             }
     482           0 :           }
     483           0 :           hist->DrawCopy("colz");   
     484             :           //gPad->Update();
     485           0 :         }
     486           0 :         if(name.Contains("SPDFastOrMapStaveInner")){
     487           0 :           fImage[esIndex]->cd(5) ;
     488           0 :           gStyle->SetStatX(0.81);
     489           0 :           gStyle->SetStatY(0.942);
     490           0 :           gPad->SetBorderMode(0) ;  
     491           0 :           gPad->SetRightMargin(0.25);
     492           0 :           gPad->SetGridx();
     493           0 :           gPad->SetGridy();
     494           0 :           hist->SetObjectStat(0);
     495           0 :           hist->SetOption("colz") ;
     496           0 :           hist->DrawCopy();               
     497             :         }
     498           0 :         if(name.Contains("SPDFastOrMapStaveOuter")){
     499           0 :           fImage[esIndex]->cd(6) ; 
     500           0 :           gStyle->SetStatX(0.81);
     501           0 :           gStyle->SetStatY(0.942);
     502           0 :           gPad->SetBorderMode(0) ;  
     503           0 :           gPad->SetRightMargin(0.25);
     504           0 :           gPad->SetGridx();
     505           0 :           gPad->SetGridy();
     506           0 :           hist->SetObjectStat(0);
     507           0 :           hist->SetOption("colz") ;
     508           0 :           hist->DrawCopy();               
     509             :         }
     510             : 
     511           0 :       }
     512             : 
     513           0 :       fImage[esIndex]->Print(Form("%s%s%d.%s", AliQAv1::GetImageFileName(), AliQAv1::GetModeName(mode), AliQAChecker::Instance()->GetRunNumber(), AliQAv1::GetImageFileFormat()), "ps") ; 
     514             :       //fImage[esIndex]->SaveAs("image.png");
     515           0 :     }
     516           0 :   }
     517           0 :   return kTRUE;
     518           0 : }
     519             : 

Generated by: LCOV version 1.11