LCOV - code coverage report
Current view: top level - MUON/MUONcalib - AliMUONErrorCounter.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 24 4.2 %
Date: 2016-06-14 17:26:59 Functions: 1 6 16.7 %

          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             : // $Id$
      17             : 
      18             : #include "AliMUONErrorCounter.h"
      19             : 
      20             : #include <Riostream.h>
      21             : 
      22             : //-----------------------------------------------------------------------------
      23             : /// \class AliMUONErrorCounter
      24             : /// 
      25             : /// add 
      26             : /// 
      27             : ///
      28             : /// \author Alberto Baldisseri, JL Charvet (05/05/2009)
      29             : //-----------------------------------------------------------------------------
      30             : 
      31             : using std::cout;
      32             : using std::endl;
      33             : /// \cond CLASSIMP
      34          18 : ClassImp(AliMUONErrorCounter)
      35             : /// \endcond
      36             : 
      37             : //______________________________________________________________________________
      38             : AliMUONErrorCounter::AliMUONErrorCounter(Int_t bp, Int_t manu, Int_t ev) 
      39           0 : : TNamed(Form("bp%dmanu%d",bp,manu),""),
      40           0 : fBusPatch(bp), 
      41           0 : fManuId(manu), 
      42           0 : fEvents(ev) 
      43           0 : {
      44           0 :   SetUniqueID( ( manu << 16 ) | bp );
      45           0 : }
      46             : 
      47             : //______________________________________________________________________________
      48             : Int_t AliMUONErrorCounter::Compare(const TObject* obj) const
      49             : {
      50             :   /// Compare function
      51             :   Int_t patch1, patch2, manu1, manu2;
      52           0 :   patch1 = fBusPatch;
      53           0 :   manu1 = fManuId;
      54           0 :   patch2 = ((AliMUONErrorCounter*)obj)->BusPatch();
      55           0 :   manu2 = ((AliMUONErrorCounter*)obj)->ManuId();
      56             : 
      57           0 :   if (patch1 == patch2)
      58             :   {
      59           0 :     if (manu1 == manu2)
      60             :     {
      61           0 :       return 0;
      62             :     }
      63             :     else
      64           0 :       return (manu1 >= manu2) ? 1 : -1;
      65             :   }
      66             :   else
      67           0 :     return (patch1 >= patch2) ? 1 : -1;
      68           0 : }
      69             : 
      70             : //______________________________________________________________________________
      71             : void AliMUONErrorCounter::Print(const Option_t* option) const
      72             : {
      73           0 :   TNamed::Print(option);
      74           0 :   cout<<"bp "<<fBusPatch<<" events "<<fEvents<<endl;
      75           0 : }
      76             : 
      77             : //______________________________________________________________________________
      78             : void AliMUONErrorCounter::PrintUncal(const Option_t* option) const
      79             : {
      80           0 :   TNamed::Print(option);
      81           0 :   cout<<"bp =  "<<fBusPatch<< "  manu = " << fManuId << " uncal = "<< fEvents <<endl;
      82           0 : }

Generated by: LCOV version 1.11