BOSS
7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcRecoUtil/MdcRecoUtil-00-01-08/MdcRecoUtil/ComPackSignedExpFloat.h
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
// File and Version Information:
3
// $Id: ComPackSignedExpFloat.h,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4
//
5
// Description:
6
// class ComPackSignedExpFloat; Uses ComPackExpFloat to store the
7
// magnitude of a signed quantity, then adds in the sign.
8
// Environment:
9
// Software developed for the BaBar Detector at the SLAC B-Factory.
10
//
11
// Author List:
12
// Dave Brown 10/12/00
13
//
14
// Copyright Information:
15
// Copyright (C) 2000 LBNL
16
//
17
// History:
18
// Migration for BESIII MDC
19
//
20
//
21
//--------------------------------------------------------------------------
22
23
#ifndef COMPACKSIGNEDEXPFLOAT_HH
24
#define COMPACKSIGNEDEXPFLOAT_HH
25
26
#include "MdcRecoUtil/ComPackExpFloat.h"
27
#include <iostream>
28
29
class
ComPackSignedExpFloat
:
public
ComPackBase
<double> {
30
31
public
:
32
// See ComPackExpFloat for an explanation. Note that in this class, the number
33
// of bits should include 1 for the sign. The invert flag specifies that the best
34
// resolution should occur at the +-maxval end of the range instead of around 0.
35
ComPackSignedExpFloat
(
unsigned
nbits,
36
unsigned
maxexponent,
37
double
maxval,
38
bool
invert=
false
,
39
bool
center=
false
);
40
virtual
~ComPackSignedExpFloat
();
41
// ComPackBase functions
42
virtual
StatusCode
pack
(
const
double
,
d_ULong
&)
const
;
43
virtual
StatusCode
unpack
(
const
d_ULong
,
double
&)
const
;
44
void
print
(std::ostream&
s
=std::cout)
const
;
45
private
:
46
// This class uses ComPackExpFloat to do the dirty work
47
ComPackExpFloat
_packer;
48
unsigned
_signbit;
// sign bits location
49
unsigned
_signmask;
// mask for positive
50
};
51
52
#endif
53
54
55
56
57
58
s
XmlRpcServer s
Definition:
HelloServer.cpp:11
d_ULong
unsigned int d_ULong
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/BesODMGTypes.h:96
ComPackBaseBase::StatusCode
StatusCode
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/ComPackBaseBase.h:35
ComPackBase
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/ComPackBase.h:40
ComPackExpFloat
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/ComPackExpFloat.h:35
ComPackSignedExpFloat
Definition:
InstallArea/include/MdcRecoUtil/MdcRecoUtil/ComPackSignedExpFloat.h:29
ComPackSignedExpFloat::~ComPackSignedExpFloat
virtual ~ComPackSignedExpFloat()
ComPackSignedExpFloat::ComPackSignedExpFloat
ComPackSignedExpFloat(unsigned nbits, unsigned maxexponent, double maxval, bool invert=false, bool center=false)
ComPackSignedExpFloat::unpack
virtual StatusCode unpack(const d_ULong, double &) const
ComPackSignedExpFloat::print
void print(std::ostream &s=std::cout) const
ComPackSignedExpFloat::pack
virtual StatusCode pack(const double, d_ULong &) const
source
Reconstruction
MdcPatRec
MdcRecoUtil
MdcRecoUtil-00-01-08
MdcRecoUtil
ComPackSignedExpFloat.h
Generated by
1.9.6