]>
Commit | Line | Data |
---|---|---|
b9a6a391 | 1 | // $Id$ |
2 | ||
3 | #ifndef ALIJFCLUSTERDIFFERENCEH | |
4 | #define ALIJFCLUSTERDIFFERENCEH | |
5 | ||
6 | #include <Riostream.h> | |
7 | #include "AliJFCluster.h" | |
8 | ||
9 | class AliJFClusterDifference | |
10 | { | |
11 | public: | |
12 | AliJFClusterDifference(); | |
13 | AliJFClusterDifference(const AliJFClusterDifference ©); | |
14 | AliJFClusterDifference(AliJFCluster *i, AliJFCluster *j); | |
15 | AliJFClusterDifference(Float_t dij,AliJFCluster *i, AliJFCluster *j); | |
ca10471a | 16 | virtual ~AliJFClusterDifference() {} |
b9a6a391 | 17 | |
18 | AliJFClusterDifference& operator=(const AliJFClusterDifference ©); | |
19 | friend ostream& operator<<(ostream &o, const AliJFClusterDifference &j); | |
20 | friend bool operator< (const AliJFClusterDifference &a, const AliJFClusterDifference &b); | |
21 | friend bool operator==(const AliJFClusterDifference &a, const AliJFClusterDifference &b); | |
22 | ||
23 | inline Int_t GetNLastMerge() const {return fNLastMerge;} | |
24 | inline AliJFCluster* GetI() const {return fI;} | |
25 | inline AliJFCluster* GetJ() const {return fJ;} | |
26 | inline Float_t GetDij() const {return fDij;} | |
27 | ||
28 | inline Bool_t IsDiagonal() const {return (fI==fJ ? kTRUE:kFALSE);} | |
29 | inline Bool_t IsValid() const {return (fI->IsValid()&&fJ->IsValid());} | |
30 | inline Bool_t IsValidDiagonal() const {return ((fI->IsValid())&&(fI->GetNMerge()==fNLastMerge));} | |
31 | inline Bool_t IsValidEntry() const { | |
32 | if(IsDiagonal()) return IsValidDiagonal(); | |
33 | else return IsValid(); | |
34 | } | |
35 | inline Bool_t IsValidPointer() const {return (fI!=NULL && fJ!=NULL ? kTRUE:kFALSE);} | |
36 | ||
37 | Float_t SetValues(AliJFCluster *i,AliJFCluster *j); | |
38 | ||
39 | protected: | |
40 | Int_t fNLastMerge; | |
41 | AliJFCluster *fI; | |
42 | AliJFCluster *fJ; | |
43 | Float_t fDij; | |
44 | ||
45 | ClassDef(AliJFClusterDifference,0) //AliJFClusterDifference Class | |
46 | }; | |
47 | ||
48 | inline bool operator<(const AliJFClusterDifference &a, const AliJFClusterDifference &b){ | |
49 | return (a.GetDij()<b.GetDij()); | |
50 | } | |
51 | ||
52 | inline bool operator==(const AliJFClusterDifference &a, const AliJFClusterDifference &b){ | |
53 | if((a.GetI()==b.GetI())&&(a.GetJ()==b.GetJ())) return true; | |
54 | return false; | |
55 | } | |
56 | ||
57 | #endif /*ALIJFCLUSTERDIFFERENCEH*/ |