BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesAngle.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Description:
4// Class BesAngle
5//
6//------------------------------------------------------------------------
7#include "MdcGeom/BesAngle.h"
8
9//-------------------------------
10// Collaborating Class Headers --
11//-------------------------------
12#include "MdcGeom/Constants.h"
13
14//-----------------------------------------------------------------------
15// Local Macros, Typedefs, Structures, Unions and Forward Declarations --
16//-----------------------------------------------------------------------
17
18const double BesAngle::pi = Constants::pi;
21/* hxt
22// The followings characters are used in DegString()
23// for printout in degrees
24#ifdef HPUX
25const HepString BesAngle::degChar = "xxx"; // mrli, 240613: xxx used to be an unknown charactor
26which will lead to `'utf-8' codec can't decode byte 0xb0 in position 881: invalid start byte`
27error when opening in python, so I changed it to "xxx" ONLY here. #else const HepString
28BesAngle::degChar = "^"; #endif
29
30const HepString BesAngle::deg1Char = "'";
31const HepString BesAngle::deg2Char = "\"";
32
33// ----------------------------------------
34// -- Public Function Member Definitions --
35// ----------------------------------------
36
37HepString BesAngle::degString() const
38{
39 float tmp;
40 int deg, deg_, deg__;
41 HepString sign = "";
42
43 if ((tmp = this->deg()) < 0)
44 { sign = "-"; tmp = -tmp; };
45 deg = int(tmp);
46 deg_ = int(tmp = 60*(tmp - deg));
47 deg__ = int(60*(tmp - deg_));
48
49 return
50 (
51 sign +
52 HepString(deg)+degChar+
53 HepString(deg_)+deg1Char+
54 HepString(deg__)+deg2Char
55 );
56}
57
58hxt */