1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 #include "AliMUONErrorCounter.h"
20 #include <Riostream.h>
22 //-----------------------------------------------------------------------------
23 /// \class AliMUONErrorCounter
28 /// \author Alberto Baldisseri, JL Charvet (05/05/2009)
29 //-----------------------------------------------------------------------------
32 ClassImp(AliMUONErrorCounter)
35 //______________________________________________________________________________
36 AliMUONErrorCounter::AliMUONErrorCounter(Int_t bp, Int_t manu, Int_t ev)
37 : TNamed(Form("bp%dmanu%d",bp,manu),""),
42 SetUniqueID( ( manu << 16 ) | bp );
45 //______________________________________________________________________________
46 Int_t AliMUONErrorCounter::Compare(const TObject* obj) const
49 Int_t patch1, patch2, manu1, manu2;
52 patch2 = ((AliMUONErrorCounter*)obj)->BusPatch();
53 manu2 = ((AliMUONErrorCounter*)obj)->ManuId();
62 return (manu1 >= manu2) ? 1 : -1;
65 return (patch1 >= patch2) ? 1 : -1;
68 //______________________________________________________________________________
69 void AliMUONErrorCounter::Print(const Option_t* option) const
71 TNamed::Print(option);
72 cout<<"bp "<<fBusPatch<<" events "<<fEvents<<endl;
75 //______________________________________________________________________________
76 void AliMUONErrorCounter::PrintUncal(const Option_t* option) const
78 TNamed::Print(option);
79 cout<<"bp = "<<fBusPatch<< " manu = " << fManuId << " uncal = "<< fEvents <<endl;