CMS 3D CMS Logo

CSCUtility.h File Reference

#include <string>
#include <vector>
#include <sstream>
#include <bitset>
#include <map>
#include <iostream>
#include <fstream>
#include <iomanip>
#include "stdint.h"

Go to the source code of this file.

Classes

class  CSCUtility
 CSCMonitorModule and CSCHLTMonitorModule utility routines. More...

Defines

#define get16bits(d)   ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) + (uint32_t)(((const uint8_t *)(d))[0]) )

Typedefs

typedef std::bitset< 32 > Bitset32
typedef std::bitset< 36 > BitsetDDU
typedef std::map< std::string,
std::string > 
Histo
 Type Definition Section.
typedef std::map< std::string,
Histo
HistoDef
typedef HistoDef::iterator HistoDefIter
typedef std::map< std::string,
HistoDef
HistoDefMap
typedef HistoDefMap::iterator HistoDefMapIter
typedef Histo::iterator HistoIter

Functions

template<class T>
bool stringToNumber (T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &))
 Converting from string to whatever number (failsafe!).


Define Documentation

#define get16bits ( d   )     ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) + (uint32_t)(((const uint8_t *)(d))[0]) )

Definition at line 64 of file CSCUtility.h.

Referenced by cscdqm::Utility::fastHash(), and CSCUtility::fastHash().


Typedef Documentation

typedef std::bitset<32> Bitset32

Definition at line 43 of file CSCUtility.h.

typedef std::bitset<36> BitsetDDU

Definition at line 42 of file CSCUtility.h.

typedef std::map<std::string, std::string> Histo

Type Definition Section.

Definition at line 35 of file CSCUtility.h.

typedef std::map<std::string, Histo> HistoDef

Definition at line 37 of file CSCUtility.h.

typedef HistoDef::iterator HistoDefIter

Definition at line 38 of file CSCUtility.h.

typedef std::map<std::string, HistoDef> HistoDefMap

Definition at line 39 of file CSCUtility.h.

typedef HistoDefMap::iterator HistoDefMapIter

Definition at line 40 of file CSCUtility.h.

typedef Histo::iterator HistoIter

Definition at line 36 of file CSCUtility.h.


Function Documentation

template<class T>
bool stringToNumber ( T &  t,
const std::string &  s,
std::ios_base &(*)(std::ios_base &)  f 
) [inline]

Converting from string to whatever number (failsafe!).

Parameters:
t result number
s source string
f base
Returns:
true if success, else - false

Definition at line 53 of file CSCUtility.h.

References f, and cmsPerfPublish::fail().

Referenced by IgQtRangeMControlImp< short >::editSettings(), IgQtRangeControlImp< short >::editSettings(), IgQtRangeControlImp< short >::setSettingString(), IgQtRangeMControlImp< short >::setSettingString(), IgQtRangeMControlImp< short >::textChanged(), and IgQtRangeControlImp< short >::textChanged().

00053                                                                                {
00054   std::istringstream iss(s);
00055   return !(iss >> f >> t).fail();
00056 }


Generated on Tue Jun 9 17:52:38 2009 for CMSSW by  doxygen 1.5.4