CMS 3D CMS Logo

DTDBDataHandle Class Reference

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

#include <CondTools/DT/interface/DTDBDataHandle.h>

List of all members.

Public Member Functions

 DTDBDataHandle ()
 Constructor.
virtual ~DTDBDataHandle ()
 Destructor.

Static Public Member Functions

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


Detailed Description

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

Date
2007/12/07 15:12:16
Revision
1.2
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.

00034                                {
00035 }

DTDBDataHandle::~DTDBDataHandle (  )  [virtual]

Destructor.

Definition at line 40 of file DTDBDataHandle.cc.

00040                                 {
00041 }


Member Function Documentation

int DTDBDataHandle::nearestInt ( double  d  )  [static]

Operations.

Definition at line 46 of file DTDBDataHandle.cc.

00046                                          {
00047 
00048   if ( d > 0.0 ) d += 0.5;
00049   else           d -= 0.5;
00050   return static_cast<int>( d );
00051 
00052 }

bool DTDBDataHandle::toBool ( short  s  )  [static]

Definition at line 55 of file DTDBDataHandle.cc.

00055                                      {
00056 
00057   union u_short_bool {
00058     short s_num;
00059     bool  b_num;
00060   };
00061   union u_short_bool dataBuffer;
00062   dataBuffer.s_num = s;
00063   return dataBuffer.b_num;
00064 
00065 }

short DTDBDataHandle::toShort ( bool  b  )  [static]

Definition at line 68 of file DTDBDataHandle.cc.

00068                                       {
00069 
00070   union u_short_bool {
00071     short s_num;
00072     bool  b_num;
00073   };
00074   union u_short_bool dataBuffer;
00075   dataBuffer.s_num = 0;
00076   dataBuffer.b_num = b;
00077   return dataBuffer.s_num;
00078 
00079 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:49 2009 for CMSSW by  doxygen 1.5.4