LCOV - code coverage report
Current view: top level - ZDC/ZDCbase - AliZDCLaserCalib.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 10 51 19.6 %
Date: 2016-06-14 17:26:59 Functions: 4 13 30.8 %

          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 calibration -> LASER signal monitoring      //
      19             : // author: Chiara Oppedisano                                 //
      20             : //                                                           //
      21             : ///////////////////////////////////////////////////////////////
      22             : 
      23             : #include "AliZDCLaserCalib.h"
      24             : 
      25          12 : ClassImp(AliZDCLaserCalib)
      26             : 
      27             : //________________________________________________________________
      28             : AliZDCLaserCalib::AliZDCLaserCalib():
      29           2 : TNamed()
      30          10 : {
      31           2 :   Reset();
      32           4 : }
      33             : 
      34             : //________________________________________________________________
      35             : AliZDCLaserCalib::AliZDCLaserCalib(const char* name):
      36           0 : TNamed()
      37           0 : {
      38             :   // Constructor
      39           0 :   TString namst = "Calib_";
      40           0 :   namst += name;
      41           0 :   SetName(namst.Data());
      42           0 :   SetTitle(namst.Data());
      43           0 :   Reset();
      44           0 :   for(Int_t i=0; i<24; i++){
      45           0 :     fDetector[i] = 0;
      46           0 :     fSector[i] = 0;
      47           0 :     fPMValue[i] = 0.;
      48           0 :     fPMWidth[i] = 0.;
      49             :   }
      50             :   
      51             :   
      52           0 : }
      53             : 
      54             : //________________________________________________________________
      55             : AliZDCLaserCalib::AliZDCLaserCalib(const AliZDCLaserCalib& calibda) :
      56           0 :   TNamed(calibda)
      57           0 : {
      58             :   // Copy constructor
      59           0 :   SetName(calibda.GetName());
      60           0 :   SetTitle(calibda.GetName());
      61           0 :   Reset();
      62           0 :   for(int t=0; t<22; t++){
      63           0 :      fDetector[t] = calibda.GetDetector(t);
      64           0 :      fSector[t]   = calibda.GetSector(t);
      65           0 :      fPMValue[t]  = calibda.GetPMValue(t);
      66           0 :      fPMWidth[t]  = calibda.GetPMWidth(t);
      67             :   }
      68           0 : }
      69             : 
      70             : //________________________________________________________________
      71             : AliZDCLaserCalib &AliZDCLaserCalib::operator =(const AliZDCLaserCalib& calibda) 
      72             : {
      73             : // assignment operator
      74           0 :   SetName(calibda.GetName());
      75           0 :   SetTitle(calibda.GetName());
      76           0 :   Reset();
      77           0 :   for(int t=0; t<22; t++){
      78           0 :      fDetector[t] = calibda.GetDetector(t);
      79           0 :      fSector[t]   = calibda.GetSector(t);
      80           0 :      fPMValue[t]  = calibda.GetPMValue(t);
      81           0 :      fPMWidth[t]  = calibda.GetPMWidth(t);
      82             :   }
      83             : 
      84           0 :   return *this;
      85             : }
      86             : 
      87             : //________________________________________________________________
      88             : AliZDCLaserCalib::~AliZDCLaserCalib()
      89           0 : {
      90           0 : }
      91             : 
      92             : //________________________________________________________________
      93             : void AliZDCLaserCalib::Reset()
      94             : {
      95             :   // Reset
      96           4 :   memset(fDetector,0,24*sizeof(Float_t));
      97           2 :   memset(fSector,0,24*sizeof(Float_t));
      98           2 :   memset(fPMValue,0,24*sizeof(Float_t));
      99           2 :   memset(fPMWidth,0,24*sizeof(Float_t));
     100           2 : }                                                                                       
     101             : 
     102             : 
     103             : //________________________________________________________________
     104             : void  AliZDCLaserCalib::Print(Option_t *) const
     105             : {
     106             :    // Printing of calibration object
     107           0 :    printf("\n\n ******************* AliZDCLaserCalib object *******************\n");
     108           0 :    for(Int_t i=0; i<24; i++){
     109           0 :      printf("  Detector %d, sector %d, PMValue = %1.1f +/- %1.1f\n",
     110           0 :         fDetector[i], fSector[i],fPMValue[i],fPMWidth[i]);
     111             :    }
     112           0 :    printf(" ***************************************************************\n\n");
     113           0 : } 

Generated by: LCOV version 1.11