]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONErrorCounter.cxx
READMErec.txt updated.
[u/mrichter/AliRoot.git] / MUON / AliMUONErrorCounter.cxx
CommitLineData
5253c153 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
640fd52f 31/// \cond CLASSIMP
32ClassImp(AliMUONErrorCounter)
33/// \endcond
34
5253c153 35//______________________________________________________________________________
36AliMUONErrorCounter::AliMUONErrorCounter(Int_t bp, Int_t manu, Int_t ev)
37 : fBusPatch(bp),
38 fManuId(manu),
39 fEvents(ev)
40{
41}
42
43//______________________________________________________________________________
44Int_t AliMUONErrorCounter::Compare(const TObject* obj) const
45{
46 /// Compare function
47 Int_t patch1, patch2, manu1, manu2;
48 patch1 = fBusPatch;
49 manu1 = fManuId;
50 patch2 = ((AliMUONErrorCounter*)obj)->BusPatch();
51 manu2 = ((AliMUONErrorCounter*)obj)->ManuId();
52
53 if (patch1 == patch2)
54 {
55 if (manu1 == manu2)
56 {
57 return 0;
58 }
59 else
60 return (manu1 >= manu2) ? 1 : -1;
61 }
62 else
63 return (patch1 >= patch2) ? 1 : -1;
64}
65
66//______________________________________________________________________________
67void AliMUONErrorCounter::Print(const Option_t* option) const
68{
69 TNamed::Print(option);
70 cout<<"bp "<<fBusPatch<<" events "<<fEvents<<endl;
71}
72
73//______________________________________________________________________________
74void AliMUONErrorCounter::Print_uncal(const Option_t* option) const
75{
76 TNamed::Print(option);
77 cout<<"bp = "<<fBusPatch<< " manu = " << fManuId << " uncal = "<< fEvents <<endl;
78}