LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSCorrMap1DSDD.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 9 26 34.6 %
Date: 2016-06-14 17:26:59 Functions: 4 9 44.4 %

          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             : //                                                               //
      20             : // Implementation of the base class for SDD map 2D corrections   //
      21             : // Origin: F.Prino, Torino, prino@to.infn.it                     //
      22             : //                                                               //
      23             : ///////////////////////////////////////////////////////////////////
      24             : 
      25             : #include "TH1F.h"
      26             : #include "AliITSCorrMapSDD.h"
      27             : #include "AliITSCorrMap1DSDD.h"
      28             : #include "AliLog.h"
      29             : #include "AliITSsegmentationSDD.h"
      30             : 
      31         118 : ClassImp(AliITSCorrMap1DSDD)
      32             : //______________________________________________________________________
      33             : AliITSCorrMap1DSDD::AliITSCorrMap1DSDD():
      34        1548 : AliITSCorrMapSDD()
      35        7740 : {
      36             :   // default constructor
      37        1548 :   ResetMap();
      38        1548 :   SetNBinsAnode(1);
      39        3096 : }
      40             : //______________________________________________________________________
      41             : AliITSCorrMap1DSDD::AliITSCorrMap1DSDD(Char_t *mapname):
      42           0 : AliITSCorrMapSDD(mapname)
      43           0 : {
      44             :   // standard constructor
      45           0 :   ResetMap();
      46           0 :   SetNBinsAnode(1);
      47           0 : }
      48             : //______________________________________________________________________
      49             : AliITSCorrMap1DSDD::AliITSCorrMap1DSDD(Char_t *mapname, Int_t nbinsdr):
      50           0 : AliITSCorrMapSDD(mapname)
      51           0 : {
      52           0 :   ResetMap();
      53           0 :   SetNBinsAnode(1);
      54           0 :   SetNBinsDrift(nbinsdr);
      55           0 : }
      56             : //______________________________________________________________________
      57             : void AliITSCorrMap1DSDD::ResetMap(){
      58             :   // Sets contents to zero
      59      905580 :   for(Int_t iDr=0;iDr<kMaxNDriftPts; iDr++){
      60      450468 :     fCorrMap[iDr]=0;
      61             :   }
      62        1548 : }
      63             : //______________________________________________________________________
      64             : void AliITSCorrMap1DSDD::Set1DMap(TH1F* hmap){
      65             :   // Fill map staring from 1D histo of rediduals vs. x
      66           0 :   if(hmap->GetNbinsX()!=fNDriftPts){ 
      67           0 :     AliError(Form("N. of histo bins (%d) not matching N. of map cells (%d)\n",hmap->GetNbinsX(),fNDriftPts));
      68           0 :     return;
      69             :   }
      70           0 :   for(Int_t iDr=0;iDr<fNDriftPts; iDr++){
      71           0 :     SetCellContent(0,iDr,hmap->GetBinContent(iDr+1));
      72             :   }
      73           0 : }
      74             : 

Generated by: LCOV version 1.11