CMS 3D CMS Logo

DTDBDataHandle.cc
Go to the documentation of this file.
1 //using namespace std;
2 /*
3  * See header file for a description of this class.
4  *
5  * $Date: 2007/11/24 12:29:54 $
6  * $Revision: 1.1.2.1 $
7  * \author Paolo Ronchese INFN Padova
8  *
9  */
10 
11 //-----------------------
12 // This Class' Header --
13 //-----------------------
15 
16 //-------------------------------
17 // Collaborating Class Headers --
18 //-------------------------------
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 //-------------------
25 // Initializations --
26 //-------------------
27 
28 //----------------
29 // Constructors --
30 //----------------
32 
33 //--------------
34 // Destructor --
35 //--------------
37 
38 //--------------
39 // Operations --
40 //--------------
42  if (d > 0.0)
43  d += 0.5;
44  else
45  d -= 0.5;
46  return static_cast<int>(d);
47 }
48 
50  union u_short_bool {
51  short s_num;
52  bool b_num;
53  };
54  union u_short_bool dataBuffer;
55  dataBuffer.s_num = s;
56  return dataBuffer.b_num;
57 }
58 
60  union u_short_bool {
61  short s_num;
62  bool b_num;
63  };
64  union u_short_bool dataBuffer;
65  dataBuffer.s_num = 0;
66  dataBuffer.b_num = b;
67  return dataBuffer.s_num;
68 }
DTDBDataHandle.h
DTDBDataHandle::toShort
static short toShort(bool b)
Definition: DTDBDataHandle.cc:59
alignCSCRings.s
s
Definition: alignCSCRings.py:92
b
double b
Definition: hdecay.h:118
DTDBDataHandle::toBool
static bool toBool(short s)
Definition: DTDBDataHandle.cc:49
DTDBDataHandle::DTDBDataHandle
DTDBDataHandle()
Definition: DTDBDataHandle.cc:31
DTDBDataHandle::nearestInt
static int nearestInt(double d)
Definition: DTDBDataHandle.cc:41
ztail.d
d
Definition: ztail.py:151
DTDBDataHandle::~DTDBDataHandle
virtual ~DTDBDataHandle()
Definition: DTDBDataHandle.cc:36