CGEM BOSS
6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
HTRange.h
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
// File and Version Information:
3
// $Id: HTRange.h,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4
//
5
// Description:
6
// Template of HTRange class - class to hold lower/upper limits
7
// for tuple columns
8
//
9
// Environment:
10
// Software developed for the BaBar Detector at the SLAC B-Factory.
11
//
12
// Author List:
13
// Salnikov
14
//
15
// Copyright Information:
16
// Copyright (C) 1994 <Institution>
17
//
18
// History:
19
// Migration for BESIII MDC
20
//
21
//------------------------------------------------------------------------
22
23
#ifndef HTRange_H
24
#define HTRange_H
25
26
//-------------
27
// C Headers --
28
//-------------
29
extern
"C"
{
30
}
31
32
//----------------------
33
// Base Class Headers --
34
//----------------------
35
36
//-------------------------------
37
// Collaborating Class Headers --
38
//-------------------------------
39
40
//------------------------------------
41
// Collaborating Class Declarations --
42
//------------------------------------
43
44
// ---------------------
45
// -- Class Interface --
46
// ---------------------
47
48
template
<
class
T>
49
class
HTRange
{
50
51
//--------------------
52
// Declarations --
53
//--------------------
54
55
// Typedefs, consts, and enums
56
57
//--------------------
58
// Instance Members --
59
//--------------------
60
61
public
:
62
63
// Constructors
64
HTRange
() :
65
_defined(
false
), _lower(0), _upper(0)
66
{
67
}
68
HTRange
(T
lower
, T
upper
) :
69
_defined(
true
), _lower(
lower
), _upper(
upper
)
70
{
71
}
72
73
// Copy Constructor
74
HTRange
(
const
HTRange<T>
& o) :
75
_defined(o._defined), _lower(o._lower), _upper(o._upper)
76
{
77
}
78
79
// Destructor
80
~HTRange
( ) {}
81
82
// Operators
83
84
HTRange<T>
&
operator=
(
const
HTRange<T>
& o)
85
{
86
if
(&o ==
this
)
return
*
this
;
87
_defined = o._defined ;
88
_lower = o._lower ;
89
_upper = o._upper ;
90
return
*this ;
91
}
92
93
// Selectors (const)
94
bool
operator()
()
const
{
return
_defined ; }
95
96
// get upper/lower limits
97
T
lower
()
const
{
return
_lower ; }
98
T
upper
()
const
{
return
_upper ; }
99
100
// Modifiers
101
102
protected
:
103
104
// Helper functions
105
106
private
:
107
108
// Friends
109
110
// Data members
111
bool
_defined ;
112
T _lower, _upper ;
113
114
};
115
116
//
117
// Some compilers require definitions of template methods to reside
118
// in a separate .cc file, and some require them to reside in the .hh
119
// file (this file). The following construct allows us to control
120
// this from the makefile.
121
122
// 1. Implement your methods in HTRange.cc.
123
// 2. Exclude the HTRange.cc file from the list of compilations.
124
125
//SKIP #ifdef BES_COMP_INST
126
//CHANGE #include "MdcTrkRecon/Tools/HTRange.cxx"
127
#include "HTRange.icc"
128
129
//SKIP #endif // BES_COMP_INST
130
131
#endif
// TEMPLATE_H
true
#define true
Definition
BesCxxPolicy/BesCxxPolicy-00-01-01/CxxFeatures/config.h:19
false
#define false
Definition
BesCxxPolicy/BesCxxPolicy-00-01-01/CxxFeatures/config.h:22
HTRange
Definition
HTRange.h:49
HTRange::HTRange
HTRange(const HTRange< T > &o)
Definition
HTRange.h:74
HTRange::upper
T upper() const
Definition
HTRange.h:98
HTRange::operator=
HTRange< T > & operator=(const HTRange< T > &o)
Definition
HTRange.h:84
HTRange::lower
T lower() const
Definition
HTRange.h:97
HTRange::operator()
bool operator()() const
Definition
HTRange.h:94
HTRange::HTRange
HTRange()
Definition
HTRange.h:64
HTRange::HTRange
HTRange(T lower, T upper)
Definition
HTRange.h:68
HTRange::~HTRange
~HTRange()
Definition
HTRange.h:80
6.6.5.h
Reconstruction
MdcPatRec
MdcRecoUtil
MdcRecoUtil-00-01-08
MdcRecoUtil
HTRange.h
Generated by
1.12.0