Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcRawHit.cxx
Go to the documentation of this file.
1
10
#include "
THcRawHit.h
"
11
#include <cassert>
12
13
Int_t
THcRawHit::Compare
(
const
TObject
* obj)
const
14
{
15
// Comparison function for Sort().
16
17
#ifndef NDEBUG
18
const
auto
* hit =
dynamic_cast<
const
THcRawHit
*
>
(obj);
19
assert(hit);
20
#else
21
// dynamic_cast turns out to be quite expensive here
22
const
auto
* hit =
static_cast<
const
THcRawHit
*
>
(obj);
23
#endif
24
Int_t
dp =
fPlane
- hit->
fPlane
;
25
if
( dp == 0 ) {
26
Int_t
dc =
fCounter
- hit->fCounter;
27
if
( dc < 0 )
28
return
-1;
29
else
if
( dc > 0 )
30
return
1;
31
else
32
return
0;
33
}
34
else
if
( dp < 0 )
35
return
-1;
36
else
37
return
1;
38
}
39
40
41
ClassImp
(
THcRawHit
)
42
43
//_____________________________________________________________________________
Int_t
int Int_t
ClassImp
ClassImp(VDC::AnalyticTTDConv) using namespace std
THcRawHit.h
THcRawHit
Base class detector specific raw hit that go into hit lists.
Definition
THcRawHit.h:11
THcRawHit::fPlane
Int_t fPlane
Definition
THcRawHit.h:52
THcRawHit::Compare
virtual Int_t Compare(const TObject *obj) const
Definition
THcRawHit.cxx:13
THcRawHit::fCounter
Int_t fCounter
Definition
THcRawHit.h:53
TObject
src
THcRawHit.cxx
Generated by
1.9.8