00001 #ifndef BFLVTX_H
00002 #define BFLVTX_H
00003
00004 #include <iostream>
00005 using std::cout;
00006 using std::endl;
00007
00008 class BFLVtx : public TObject {
00009
00010 public:
00011 BFLVtx(Int_t vtx):fVtxID(vtx) { }
00012 BFLVtx(Int_t vtx, Int_t EdgeAround, Bool_t weight,
00013 Double_t VtxX, Float_t VtxY):
00014 fVtxID(vtx), fEdgeAroundVtx(EdgeAround), fWeight(weight),
00015 fX(VtxX), fY(VtxY) { }
00016 virtual ~BFLVtx() { }
00017
00018 virtual Int_t GetVtxID() const {return fVtxID;}
00019 virtual Int_t GetEdgeAroundVtx() const {return fEdgeAroundVtx;}
00020 virtual Bool_t GetWeight() const {return fWeight;}
00021 virtual Float_t GetX() const {return fX;}
00022 virtual Float_t GetY() const {return fY;}
00023
00024 virtual void SetVtxID(Int_t vtxid) {fVtxID = vtxid;}
00025 virtual void SetEdgeAroundVtx(Int_t edge) {fEdgeAroundVtx = edge;}
00026 virtual void SetWeight(Bool_t wght) {fWeight = wght;}
00027 virtual void SetX(Float_t x) {fX = x;}
00028 virtual void SetY(Float_t y) {fY = y;}
00029
00030 void Print(Option_t *) const {
00031 cout << endl;
00032 cout << "\n@@@ Vertex ID = " << fVtxID;
00033 cout << "\nEdge Around Vertex............" << fEdgeAroundVtx;
00034 cout << "\nWeight........................" << fWeight;
00035 cout << "\nX............................." << fX;
00036 cout << "\nY............................." << fY;
00037 cout << std::flush;
00038 }
00039
00040 Bool_t IsEqual(const TObject *obj) const {
00041 return fVtxID == ((BFLVtx *)obj)->GetVtxID();
00042 }
00043 Bool_t IsSortable() const { return kTRUE; }
00044 Int_t Compare(const TObject *obj) const {
00045 if ( fVtxID == ((BFLVtx *)obj)->GetVtxID() )
00046 return 0;
00047 else if (fVtxID < ((BFLVtx *)obj)->GetVtxID() )
00048 return -1;
00049 else
00050 return 1;
00051 }
00052
00053 private:
00054 Int_t fVtxID;
00055 Int_t fEdgeAroundVtx;
00056 Bool_t fWeight;
00057 Float_t fX;
00058 Float_t fY;
00059
00060 ClassDef(BFLVtx,0)
00061 };
00062
00063 #endif