LCOV - code coverage report
Current view: top level - ZDC/ZDCbase - AliZDCEnCalib.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 44 15.9 %
Date: 2016-06-14 17:26:59 Functions: 4 14 28.6 %

          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             : ///////////////////////////////////////////////////////////////////////////////
      17             : //                                                                           //
      18             : //              class for ZDC ENERGY calibration                             //
      19             : //              -> values for energy calibration                          //
      20             : //                                                                           //
      21             : ///////////////////////////////////////////////////////////////////////////////
      22             : 
      23             : #include "AliZDCEnCalib.h"
      24             : 
      25          12 : ClassImp(AliZDCEnCalib)
      26             : 
      27             : //________________________________________________________________
      28             : AliZDCEnCalib::AliZDCEnCalib():
      29           2 : TNamed()
      30          10 : {
      31           2 :   Reset();
      32          28 :   for(Int_t i=0; i<6; i++) fEnCalibration[i] = 0.;
      33           4 : }
      34             : 
      35             : //________________________________________________________________
      36             : AliZDCEnCalib::AliZDCEnCalib(const char* name):
      37           0 : TNamed()
      38           0 : {
      39             :   // Constructor
      40           0 :   TString namst = "Calib_";
      41           0 :   namst += name;
      42           0 :   SetName(namst.Data());
      43           0 :   SetTitle(namst.Data());
      44           0 :   Reset();
      45           0 :   for(Int_t i=0; i<6; i++){
      46           0 :     fEnCalibration[i] = 0.;
      47             :   }
      48           0 : }
      49             : 
      50             : //________________________________________________________________
      51             : AliZDCEnCalib::AliZDCEnCalib(const AliZDCEnCalib& calibda) :
      52           0 :   TNamed(calibda)
      53           0 : {
      54             :   // Copy constructor
      55           0 :   SetName(calibda.GetName());
      56           0 :   SetTitle(calibda.GetName());
      57           0 :   Reset();
      58           0 :   for(int i=0; i<6; i++){
      59           0 :     fEnCalibration[i] = calibda.GetEnCalib(i);
      60             :   }
      61           0 : }
      62             : 
      63             : //________________________________________________________________
      64             : AliZDCEnCalib &AliZDCEnCalib::operator =(const AliZDCEnCalib& calibda)
      65             : {
      66             : // assignment operator
      67           0 :   SetName(calibda.GetName());
      68           0 :   SetTitle(calibda.GetName());
      69           0 :   Reset();
      70           0 :   for(int i=0; i<6; i++){
      71           0 :      fEnCalibration[i] = calibda.GetEnCalib(i);
      72             :   }
      73             :   
      74           0 :   return *this;
      75             : }
      76             : 
      77             : //________________________________________________________________
      78             : AliZDCEnCalib::~AliZDCEnCalib()
      79           0 : {
      80           0 : }
      81             : 
      82             : //________________________________________________________________
      83             : void AliZDCEnCalib::Reset()
      84             : {
      85             :   // Reset
      86           4 : }                                                                                       
      87             : 
      88             : 
      89             : //________________________________________________________________
      90             : void  AliZDCEnCalib::Print(Option_t *) const
      91             : {
      92             :    // Printing of calibration object
      93           0 :    printf("\n\n ####### Energy calibration coefficients #######    \n");
      94           0 :    printf("  ZNC = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[0]);
      95           0 :    printf("  ZPC = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[1]);
      96           0 :    printf("  ZNA = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[2]);
      97           0 :    printf("  ZPA = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[3]);
      98           0 :    printf("  ZEM1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[4]);
      99           0 :    printf("  ZEM2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[5]);
     100             : 
     101           0 : } 
     102             : 
     103             : //________________________________________________________________
     104             : void AliZDCEnCalib::SetEnCalib(Float_t* EnCalib) 
     105             : {
     106             :   // Set energy calibration coefficients
     107           0 :   if(EnCalib) for(int t=0; t<6; t++) fEnCalibration[t] = EnCalib[t];
     108           0 :   else for(int t=0; t<6; t++) fEnCalibration[t] = 0.;
     109           0 : }

Generated by: LCOV version 1.11