1 #ifndef ALIMUONSPARSEHISTO_H
2 #define ALIMUONSPARSEHISTO_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONSparseHisto
11 /// \brief A very memory compact histogram to hold tracker ADC distributions
13 // Author Laurent Aphecetche, Subatech
19 class AliMUONSparseHisto : public TObject
23 AliMUONSparseHisto(const AliMUONSparseHisto& rhs);
24 AliMUONSparseHisto& operator=(const AliMUONSparseHisto& rhs);
26 virtual ~AliMUONSparseHisto();
28 Int_t Fill(Int_t adc);
30 /// Return number of bins we hold
31 Int_t GetNbins() const { return fNbins; }
33 Int_t GetBinContent(Int_t bin) const;
35 virtual void Print(Option_t* opt="") const;
37 virtual void Clear(Option_t* opt="");
39 void Decode(Int_t value, Int_t& adc, Int_t& count) const;
41 Int_t Encode(Int_t adc, Int_t count) const;
43 Int_t Find(Int_t adc) const;
45 virtual void Copy(TObject& object) const;
53 Int_t fNbins; ///< number of bins we hold
55 /// compacted content = (bin,value)
56 Int_t* fArray; //[fNbins] compacted content = (bin,value)
58 ClassDef(AliMUONSparseHisto,1) // Sparse histogram-like class for ADC distributions