ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

// $Id$

#include "AliMUONErrorCounter.h"

#include <Riostream.h>

//-----------------------------------------------------------------------------
/// \class AliMUONErrorCounter
/// 
/// add 
/// 
///
/// \author Alberto Baldisseri, JL Charvet (05/05/2009)
//-----------------------------------------------------------------------------

using std::cout;
using std::endl;
/// \cond CLASSIMP
ClassImp(AliMUONErrorCounter)
/// \endcond

//______________________________________________________________________________
AliMUONErrorCounter::AliMUONErrorCounter(Int_t bp, Int_t manu, Int_t ev) 
: TNamed(Form("bp%dmanu%d",bp,manu),""),
fBusPatch(bp), 
fManuId(manu), 
fEvents(ev) 
{
  SetUniqueID( ( manu << 16 ) | bp );
}

//______________________________________________________________________________
Int_t AliMUONErrorCounter::Compare(const TObject* obj) const
{
  /// Compare function
  Int_t patch1, patch2, manu1, manu2;
  patch1 = fBusPatch;
  manu1 = fManuId;
  patch2 = ((AliMUONErrorCounter*)obj)->BusPatch();
  manu2 = ((AliMUONErrorCounter*)obj)->ManuId();

  if (patch1 == patch2)
  {
    if (manu1 == manu2)
    {
      return 0;
    }
    else
      return (manu1 >= manu2) ? 1 : -1;
  }
  else
    return (patch1 >= patch2) ? 1 : -1;
}

//______________________________________________________________________________
void AliMUONErrorCounter::Print(const Option_t* option) const
{
  TNamed::Print(option);
  cout<<"bp "<<fBusPatch<<" events "<<fEvents<<endl;
}

//______________________________________________________________________________
void AliMUONErrorCounter::PrintUncal(const Option_t* option) const
{
  TNamed::Print(option);
  cout<<"bp =  "<<fBusPatch<< "  manu = " << fManuId << " uncal = "<< fEvents <<endl;
}
 AliMUONErrorCounter.cxx:1
 AliMUONErrorCounter.cxx:2
 AliMUONErrorCounter.cxx:3
 AliMUONErrorCounter.cxx:4
 AliMUONErrorCounter.cxx:5
 AliMUONErrorCounter.cxx:6
 AliMUONErrorCounter.cxx:7
 AliMUONErrorCounter.cxx:8
 AliMUONErrorCounter.cxx:9
 AliMUONErrorCounter.cxx:10
 AliMUONErrorCounter.cxx:11
 AliMUONErrorCounter.cxx:12
 AliMUONErrorCounter.cxx:13
 AliMUONErrorCounter.cxx:14
 AliMUONErrorCounter.cxx:15
 AliMUONErrorCounter.cxx:16
 AliMUONErrorCounter.cxx:17
 AliMUONErrorCounter.cxx:18
 AliMUONErrorCounter.cxx:19
 AliMUONErrorCounter.cxx:20
 AliMUONErrorCounter.cxx:21
 AliMUONErrorCounter.cxx:22
 AliMUONErrorCounter.cxx:23
 AliMUONErrorCounter.cxx:24
 AliMUONErrorCounter.cxx:25
 AliMUONErrorCounter.cxx:26
 AliMUONErrorCounter.cxx:27
 AliMUONErrorCounter.cxx:28
 AliMUONErrorCounter.cxx:29
 AliMUONErrorCounter.cxx:30
 AliMUONErrorCounter.cxx:31
 AliMUONErrorCounter.cxx:32
 AliMUONErrorCounter.cxx:33
 AliMUONErrorCounter.cxx:34
 AliMUONErrorCounter.cxx:35
 AliMUONErrorCounter.cxx:36
 AliMUONErrorCounter.cxx:37
 AliMUONErrorCounter.cxx:38
 AliMUONErrorCounter.cxx:39
 AliMUONErrorCounter.cxx:40
 AliMUONErrorCounter.cxx:41
 AliMUONErrorCounter.cxx:42
 AliMUONErrorCounter.cxx:43
 AliMUONErrorCounter.cxx:44
 AliMUONErrorCounter.cxx:45
 AliMUONErrorCounter.cxx:46
 AliMUONErrorCounter.cxx:47
 AliMUONErrorCounter.cxx:48
 AliMUONErrorCounter.cxx:49
 AliMUONErrorCounter.cxx:50
 AliMUONErrorCounter.cxx:51
 AliMUONErrorCounter.cxx:52
 AliMUONErrorCounter.cxx:53
 AliMUONErrorCounter.cxx:54
 AliMUONErrorCounter.cxx:55
 AliMUONErrorCounter.cxx:56
 AliMUONErrorCounter.cxx:57
 AliMUONErrorCounter.cxx:58
 AliMUONErrorCounter.cxx:59
 AliMUONErrorCounter.cxx:60
 AliMUONErrorCounter.cxx:61
 AliMUONErrorCounter.cxx:62
 AliMUONErrorCounter.cxx:63
 AliMUONErrorCounter.cxx:64
 AliMUONErrorCounter.cxx:65
 AliMUONErrorCounter.cxx:66
 AliMUONErrorCounter.cxx:67
 AliMUONErrorCounter.cxx:68
 AliMUONErrorCounter.cxx:69
 AliMUONErrorCounter.cxx:70
 AliMUONErrorCounter.cxx:71
 AliMUONErrorCounter.cxx:72
 AliMUONErrorCounter.cxx:73
 AliMUONErrorCounter.cxx:74
 AliMUONErrorCounter.cxx:75
 AliMUONErrorCounter.cxx:76
 AliMUONErrorCounter.cxx:77
 AliMUONErrorCounter.cxx:78
 AliMUONErrorCounter.cxx:79
 AliMUONErrorCounter.cxx:80
 AliMUONErrorCounter.cxx:81
 AliMUONErrorCounter.cxx:82