No return in void function (Alpha)
[u/mrichter/AliRoot.git] / RICH / AliRICHMap.h
CommitLineData
a8d26a29 1#ifndef AliRICHMap_h
2#define AliRICHMap_h
3
4
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8#include "AliHitMap.h"
9#include <TMatrix.h>
10#include <TMath.h>
11#include <TClonesArray.h>
12
13class AliRICHMap : public AliHitMap
14{
15public:
16 AliRICHMap(TClonesArray *pDig);
17 virtual ~AliRICHMap() {delete fMap;}
d4c94996 18 void FillHits(); //virtual
19 void Clear(const char *) {fMap->Zero();} //virtual
20 void DeleteHit(Int_t ix,Int_t iy) {(*fMap)(ix,iy)=0;} //virtual
21 void SetHit(Int_t ix,Int_t iy,Int_t idigit){(*fMap)(ix,iy)=idigit+1;} //virtual
22 Int_t GetHitIndex(Int_t ix,Int_t iy) const{return (Int_t)TMath::Abs((*fMap)(ix, iy))-1;} //virtual
a8d26a29 23 TObject* GetHit(Int_t ix,Int_t iy) const{Int_t idx=GetHitIndex(ix,iy);return(idx <0)?0:fDigits->At(idx);} //virtual
d4c94996 24 void FlagHit(Int_t ix,Int_t iy) {(*fMap)(ix, iy)=-TMath::Abs((*fMap)(ix,iy));} //virtual
25 Bool_t ValidateHit(Int_t,Int_t) {return 1;} //virtual
26 inline FlagType TestHit(Int_t ix,Int_t iy); //virtual
27 void Print() const{fMap->Print();}
a8d26a29 28protected:
29 TClonesArray *fDigits; //List of digits
30 Int_t fNdigits; //Number of digits
31 TMatrix *fMap; //hit map
32 ClassDef(AliRICHMap,0) //Implements map as TMatrix
33};
d4c94996 34//__________________________________________________________________________________________________
35FlagType AliRICHMap::TestHit(Int_t padx,Int_t pady)
36{
37//Is there a hit for given pad?
38 Int_t inf=(Int_t)(*fMap)(padx,pady);
a8d26a29 39 if(inf<0){//flaged as used
40 return kUsed;
41 }else if(inf==0){//no hit
42 return kEmpty;
43 }else{//index of not yet used hit
44 return kUnused;
45 }
d4c94996 46}//TestHit()
a8d26a29 47#endif