LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDQAChecker.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 5 14 35.7 %
Date: 2016-06-14 17:26:59 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-1999, 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             : //                                                                        //
      20             : //  Checks the quality assurance.                                         //
      21             : //  By comparing with reference data                                      //
      22             : //  S.Radomski Uni-Heidelberg October 2007                                //
      23             : //                                                                        //
      24             : ////////////////////////////////////////////////////////////////////////////
      25             : 
      26             : // --- ROOT system ---
      27             : #include <TClass.h>
      28             : #include <TH1F.h> 
      29             : #include <TH1I.h> 
      30             : #include <TIterator.h> 
      31             : #include <TKey.h> 
      32             : #include <TFile.h> 
      33             : 
      34             : // --- Standard library ---
      35             : 
      36             : // --- AliRoot header files ---
      37             : #include "AliLog.h"
      38             : #include "AliQAv1.h"
      39             : #include "AliQAChecker.h"
      40             : #include "AliTRDQAChecker.h"
      41             : 
      42          48 : ClassImp(AliTRDQAChecker)
      43             : 
      44             : //__________________________________________________________________
      45             : 
      46             : void AliTRDQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam* /*param*/) 
      47             : {
      48             : 
      49             :   // Super-basic check on the QA histograms on the input list: 
      50             : 
      51          18 :   if (!list) return;
      52         108 :   for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) test[i] = 0.5; 
      53             : 
      54             :   //Int_t count[AliRecoParam::kNSpecies] = { 0 }; 
      55             : 
      56           9 :   if (index != AliQAv1::kREC) return;
      57             : 
      58             :   const Double_t lowAmp = 30;
      59             :   const Double_t highAmp = 50;
      60             : 
      61           0 :   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
      62             : 
      63           0 :     TObjArray * arr = list[specie];
      64           0 :     if (!arr) continue;
      65           0 :     TH1D *hist = (TH1D*) arr->At(12);
      66           0 :     if (!hist) continue;
      67             :     
      68           0 :     Double_t value = hist->Integral(hist->FindBin(lowAmp), hist->FindBin(highAmp));
      69           0 :     if (hist->GetSum())
      70           0 :       test[specie] = value / hist->GetSum();
      71             : 
      72           0 :   }
      73           9 : }  
      74             : 
      75             : //____________________________________________________________________________

Generated by: LCOV version 1.11