Hall C ROOT/C++ Analyzer (hcana)
THcRawHit.cxx
Go to the documentation of this file.
1 
10 #include "THcRawHit.h"
11 
12 
13 Int_t THcRawHit::Compare(const TObject* obj) const
14 {
15  // Comparision function for Sort().
16 
17  const THcRawHit* hit = dynamic_cast<const THcRawHit*>(obj);
18 
19  if(!hit) return -1;
20  Int_t p1 = fPlane;
21  Int_t p2 = hit->fPlane;
22  if(p1 < p2) return -1;
23  else if(p1 > p2) return 1;
24  else {
25  Int_t c1 = fCounter;
26  Int_t c2 = hit->fCounter;
27  if(c1 < c2) return -1;
28  else if (c1 == c2) return 0;
29  else return 1;
30  }
31 }
32 
33 
35 
36 //_____________________________________________________________________________
TCanvas * c1
int Int_t
Int_t fCounter
Definition: THcRawHit.h:55
Base class detector specific raw hit that go into hit lists.
Definition: THcRawHit.h:11
return c2
Int_t fPlane
Definition: THcRawHit.h:54
ClassImp(THcDCLookupTTDConv) THcDCLookupTTDConv
virtual Int_t Compare(const TObject *obj) const
Definition: THcRawHit.cxx:13