CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions
DTDBDataHandle Class Reference

#include <DTDBDataHandle.h>

Public Member Functions

 DTDBDataHandle ()
 
virtual ~DTDBDataHandle ()
 

Static Public Member Functions

static int nearestInt (double d)
 
static bool toBool (short s)
 
static short toShort (bool b)
 

Detailed Description

Description: Class to convert data types from/to DB types

Date:
2007/11/24 12:29:51
Revision:
1.1.2.1
Author
Paolo Ronchese INFN Padova

Definition at line 33 of file DTDBDataHandle.h.

Constructor & Destructor Documentation

DTDBDataHandle::DTDBDataHandle ( )

Constructor

Definition at line 34 of file DTDBDataHandle.cc.

34  {
35 }
DTDBDataHandle::~DTDBDataHandle ( )
virtual

Destructor

Definition at line 40 of file DTDBDataHandle.cc.

40  {
41 }

Member Function Documentation

int DTDBDataHandle::nearestInt ( double  d)
static

Operations

Definition at line 46 of file DTDBDataHandle.cc.

References ztail::d.

46  {
47 
48  if ( d > 0.0 ) d += 0.5;
49  else d -= 0.5;
50  return static_cast<int>( d );
51 
52 }
tuple d
Definition: ztail.py:151
bool DTDBDataHandle::toBool ( short  s)
static

Definition at line 55 of file DTDBDataHandle.cc.

References alignCSCRings::s.

55  {
56 
57  union u_short_bool {
58  short s_num;
59  bool b_num;
60  };
61  union u_short_bool dataBuffer;
62  dataBuffer.s_num = s;
63  return dataBuffer.b_num;
64 
65 }
short DTDBDataHandle::toShort ( bool  b)
static

Definition at line 68 of file DTDBDataHandle.cc.

References b.

68  {
69 
70  union u_short_bool {
71  short s_num;
72  bool b_num;
73  };
74  union u_short_bool dataBuffer;
75  dataBuffer.s_num = 0;
76  dataBuffer.b_num = b;
77  return dataBuffer.s_num;
78 
79 }
double b
Definition: hdecay.h:120