BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
ComPackFlatFloat.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: ComPackFlatFloat.h,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4//
5// Description:
6// Class ComPackFlatFloat
7// - Maps a float onto an integer range - useful if you know that
8// a value will always be in a certain range.
9//
10// Environment:
11// Software developed for the BaBar Detector at the SLAC B-Factory.
12//
13// Author List:
14// D.E.Azzopardi Originator.
15//
16// Copyright Information:
17// Copyright (C) 1999 DESVA Research & Design, for Hedgehog Concepts
18//
19// History:
20// Migration for BESIII MDC
21//
22// Quote:
23// "Do, or do not, there is no try."
24// - Jedi Master Yoda
25//
26//--------------------------------------------------------------------------
27
28#ifndef COMPACKFLATFLOAT_HH
29#define COMPACKFLATFLOAT_HH
30
31//
32// Bass class includes
33//
35
36class ComPackFlatFloat:public ComPackBase<double> {
37
38public:
39 ///////////////////
40 // Constructors: //
41 ///////////////////
42 ComPackFlatFloat(const double, const double, size_t); // linearly packed float
43
44 ///////////////////
45 // Destructor: //
46 ///////////////////
47 virtual ~ComPackFlatFloat();
48
49 ///////////////////
50 // Packers: //
51 ///////////////////
52 StatusCode pack (const double, d_ULong &) const;
53
54 ///////////////////
55 // Unpackers: //
56 ///////////////////
57 StatusCode unpack (const d_ULong, double &) const;
58
59 ///////////////////
60 // Accessors: //
61 ///////////////////
62
63 ///////////////////
64 // Diagnostic: //
65 ///////////////////
66 void testMe ( size_t, double & );
67
68private:
69 double _pacfac;
70 double _upacfac; // precomputed values to speed packing/unpacking
71};
72
73#endif
unsigned int d_ULong
StatusCode unpack(const d_ULong, double &) const
void testMe(size_t, double &)
StatusCode pack(const double, d_ULong &) const
ComPackFlatFloat(const double, const double, size_t)