LCOV - code coverage report
Current view: top level - PMD/PMDbase - AliPMDHotData.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 12 53 22.6 %
Date: 2016-06-14 17:26:59 Functions: 5 15 33.3 %

          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             : // Author : Z. Ahmed
      17             : //
      18             : #include "TNamed.h"
      19             : #include "AliCDBEntry.h"
      20             : #include "AliPMDHotData.h"
      21             : 
      22             : 
      23          12 : ClassImp(AliPMDHotData)
      24             : 
      25           2 : AliPMDHotData::AliPMDHotData()
      26          10 : {
      27             :   // Default constructor
      28           2 :   Reset();
      29           4 : }
      30             : // ----------------------------------------------------------------- //
      31           0 : AliPMDHotData::AliPMDHotData(const char* name)
      32           0 : {
      33             :   //constructor
      34           0 :   TString namst = "hot_";
      35           0 :   namst += name;
      36           0 :   SetName(namst.Data());
      37           0 :   SetTitle(namst.Data());
      38           0 :   Reset();
      39             :   
      40           0 : }
      41             : // ----------------------------------------------------------------- //
      42             : AliPMDHotData::AliPMDHotData(const AliPMDHotData& hotda) :
      43           0 :   TNamed(hotda)
      44           0 : {
      45             :   // copy constructor
      46           0 :   SetName(hotda.GetName());
      47           0 :   SetTitle(hotda.GetName());
      48           0 :   Reset();
      49           0 :   for(Int_t det = 0; det < kDet; det++)
      50             :     {
      51           0 :       for(Int_t smn = 0; smn < kModule; smn++)
      52             :         {
      53           0 :           for(Int_t row = 0; row < kRow; row++)
      54             :             {
      55           0 :               for(Int_t col = 0; col < kCol; col++)
      56             :                 {
      57           0 :                   fHotChannel[det][smn][row][col] = hotda.GetHotChannel(det,smn,row,col);
      58             :                 }
      59             :             }
      60             :         }
      61             :     }
      62           0 : }
      63             : // ----------------------------------------------------------------- //
      64             : AliPMDHotData &AliPMDHotData::operator =(const AliPMDHotData& hotda)
      65             : {
      66             :   //asignment operator
      67           0 :   SetName(hotda.GetName());
      68           0 :   SetTitle(hotda.GetName());
      69           0 :   Reset();
      70           0 :   for(Int_t det = 0; det < kDet; det++)
      71             :     {
      72           0 :       for(Int_t smn = 0; smn < kModule; smn++)
      73             :         {
      74           0 :           for(Int_t row = 0; row < kRow; row++)
      75             :             {
      76           0 :               for(Int_t col = 0; col < kCol; col++)
      77             :                 {
      78           0 :                   fHotChannel[det][smn][row][col] = hotda.GetHotChannel(det,smn,row,col);
      79             :                 }
      80             :             }
      81             :         }
      82             :     }
      83           0 :   return *this;
      84             : }
      85             : // ----------------------------------------------------------------- //
      86             : AliPMDHotData::~AliPMDHotData()
      87           0 : {
      88             :   //destructor
      89           0 : }
      90             : // ----------------------------------------------------------------- //
      91             : void AliPMDHotData::Reset()
      92             : {
      93             : 
      94          14 :   for(Int_t det = 0; det < kDet; det++)
      95             :     {
      96         200 :       for(Int_t smn = 0; smn < kModule; smn++)
      97             :         {
      98        9408 :           for(Int_t row = 0; row < kRow; row++)
      99             :             {
     100      893952 :             for(Int_t col = 0; col < kCol; col++)
     101             :               {
     102      442368 :                 fHotChannel[det][smn][row][col] = 0.;
     103             :               }
     104             :             }
     105             :         }
     106             :     }
     107           2 : }
     108             : // ----------------------------------------------------------------- //
     109             : // ----------------------------------------------------------------- //
     110             : Float_t AliPMDHotData:: GetHotChannel(Int_t det, Int_t smn, Int_t row, Int_t col) const
     111             : {
     112         720 :   return fHotChannel[det][smn][row][col];
     113             : }
     114             : void AliPMDHotData::SetHotChannel(Int_t det, Int_t smn, Int_t row, Int_t col, Float_t flag)
     115             : {
     116           0 :   fHotChannel[det][smn][row][col] = flag;
     117           0 : }
     118             : //------------------------------------------------------------------------------ //
     119             : void AliPMDHotData::Print(Option_t *) const
     120             : {
     121           0 :   printf("\n ######Flag for each cells ####\n");
     122           0 :   for(Int_t det = 0; det < kDet; det++)
     123             :     {
     124           0 :       for(Int_t smn = 0; smn < kModule; smn++)
     125             :         {
     126           0 :           for(Int_t row = 0; row < kRow; row++)
     127             :             {
     128           0 :               for(Int_t col = 0; col < kCol; col++)
     129             :                 {
     130           0 :                   printf("Flag[%d,%d,%d,%d]= %4.1f \n",det,smn,row,col,
     131           0 :                          fHotChannel[det][smn][row][col]);
     132             :                 }
     133           0 :               printf("\n");
     134             :             }
     135             :         }
     136             :     }
     137           0 : }

Generated by: LCOV version 1.11