BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcRecoUtil/MdcRecoUtil/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//-------------
29extern "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
48template<class T>
49class HTRange {
50
51 //--------------------
52 // Declarations --
53 //--------------------
54
55 // Typedefs, consts, and enums
56
57 //--------------------
58 // Instance Members --
59 //--------------------
60
61public:
62
63 // Constructors
65 _defined(false), _lower(0), _upper(0)
66 {
67 }
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
81
82 // Operators
83
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
102protected:
103
104 // Helper functions
105
106private:
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
HTRange< T > & operator=(const HTRange< T > &o)