LCOV - code coverage report
Current view: top level - EMCAL/EMCALbase - AliEMCALCalibTime.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 12 49 24.5 %
Date: 2016-06-14 17:26:59 Functions: 4 10 40.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             : #include "AliEMCALCalibTime.h"
      17             : 
      18             : /// \cond CLASSIMP
      19          42 : ClassImp(AliEMCALCalibTime) ;
      20             : /// \endcond
      21             : 
      22             : ///
      23             : /// Default constructor
      24             : //__________________________________________________________
      25           3 : AliEMCALCalibTime::AliEMCALCalibTime() : TNamed()
      26          15 : {
      27           3 :   Reset();
      28           6 : }
      29             : 
      30             : ///
      31             : /// Constructor
      32             : //____________________________________________________
      33           0 : AliEMCALCalibTime::AliEMCALCalibTime(const char* name) : TNamed(name,name)
      34           0 : {
      35           0 :   Reset();
      36           0 : }
      37             : 
      38             : ///
      39             : /// Copy constructor
      40             : //____________________________________________________________________
      41           0 : AliEMCALCalibTime::AliEMCALCalibTime(const AliEMCALCalibTime& calibti) : TNamed(calibti)
      42           0 : {
      43           0 :   SetName (calibti.GetName());
      44           0 :   SetTitle(calibti.GetName());
      45           0 :   Reset();
      46             :     
      47           0 :   for(Int_t supermodule = 0; supermodule < fgkECALDCALModules; supermodule++)
      48             :   {
      49             :     // Init all SM equally, even the channels known to not exist.
      50             :     
      51           0 :     for (Int_t column = 0; column < AliEMCALGeoParams::fgkEMCALCols; column++)
      52             :     {
      53           0 :       for (Int_t row = 0; row < AliEMCALGeoParams::fgkEMCALRows; row++)
      54             :       {
      55           0 :         SetTimeChannelDecal(supermodule,column,row, calibti.GetTimeChannelDecal(supermodule,column,row));
      56           0 :         for(Int_t bc = 0; bc < 4; bc++)
      57           0 :           SetTimeChannel(supermodule,column,row,bc,calibti.GetTimeChannel(supermodule,column,row,bc));
      58             :       } // row
      59             :     } // col
      60             :   } // SM
      61           0 : }
      62             : 
      63             : ///
      64             : /// Assignment operator.
      65             : //________________________________________________________________________________
      66             : AliEMCALCalibTime &AliEMCALCalibTime::operator =(const AliEMCALCalibTime& calibti)
      67             : {
      68           0 :   SetName (calibti.GetName());
      69           0 :   SetTitle(calibti.GetName());
      70           0 :   Reset();
      71             :     
      72           0 :   for(Int_t supermodule = 0; supermodule < fgkECALDCALModules; supermodule++)
      73             :   {
      74             :     // Init all SM equally, even the channels known to not exist.
      75             :     
      76           0 :     for (Int_t column = 0; column < AliEMCALGeoParams::fgkEMCALCols; column++)
      77             :     {
      78           0 :       for (Int_t row = 0; row < AliEMCALGeoParams::fgkEMCALRows; row++)
      79             :       {
      80           0 :         SetTimeChannelDecal(supermodule,column,row, calibti.GetTimeChannelDecal(supermodule,column,row));
      81           0 :         for(Int_t bc = 0; bc < 4; bc++)
      82           0 :           SetTimeChannel(supermodule,column,row,bc,calibti.GetTimeChannel(supermodule,column,row,bc));
      83             :       } // row
      84             :     } // col
      85             :   } // SM
      86             :   
      87           0 :   return *this;
      88             : }
      89             : 
      90             : ///
      91             : /// Set all channels to 0. 
      92             : //_____________________________
      93             : void AliEMCALCalibTime::Reset()
      94             : {
      95         141 :   for (Int_t supermodule=0; supermodule < fgkECALDCALModules; supermodule++)
      96             :   {    
      97             :     // Init all SM equally, even the channels known to not exist.
      98             :     
      99        6468 :     for (Int_t column = 0; column < AliEMCALGeoParams::fgkEMCALCols; column++)
     100             :     {
     101      158400 :       for (Int_t row = 0; row < AliEMCALGeoParams::fgkEMCALRows; row++)
     102             :       {       
     103       76032 :         SetTimeChannelDecal(supermodule,column,row, 0);
     104      760320 :         for(Int_t bc = 0; bc < 4; bc++)
     105      304128 :           SetTimeChannel(supermodule,column,row, bc, 0);
     106             :       } // row
     107             :     } // col
     108             :   }     // SM
     109           3 : }
     110             : 
     111             : ///
     112             : /// Print tables 
     113             : //____________________________________________________
     114             : void  AliEMCALCalibTime::Print(Option_t *option) const
     115             : {    
     116           0 :   for (Int_t supermodule = 0; supermodule < fgkECALDCALModules; supermodule++)
     117             :   {
     118           0 :     printf("============== Supermodule %d\n",supermodule);
     119           0 :     for (Int_t column = 0; column < AliEMCALGeoParams::fgkEMCALCols; column++)
     120             :     {
     121           0 :       for (Int_t row = 0; row < AliEMCALGeoParams::fgkEMCALRows; row++)
     122             :       {
     123             :         
     124           0 :           printf("col %d, row %d; time::bc0 =%2.4f, bc1=%2.4f, bc2=%2.4f, bc3=%2.4f, decal %2.4f\n",
     125             :                  column, row,
     126           0 :                  GetTimeChannel     (supermodule,column,row,0), 
     127           0 :                  GetTimeChannel     (supermodule,column,row,1), 
     128           0 :                  GetTimeChannel     (supermodule,column,row,2), 
     129           0 :                  GetTimeChannel     (supermodule,column,row,3),
     130           0 :                  GetTimeChannelDecal(supermodule,column,row));
     131             :         
     132             :       } // row
     133             :     } // col
     134             :   } // SM
     135           0 : }
     136             : 
     137             : 
     138             : 

Generated by: LCOV version 1.11