CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
ESDataFormatter Class Referenceabstract

#include <ESDataFormatter.h>

Inheritance diagram for ESDataFormatter:
ESDataFormatterV1_1 ESDataFormatterV4

Classes

struct  Meta_Data
 

Public Types

typedef std::vector< ESDataFrameDetDigis
 
typedef std::map< int, DetDigisDigis
 
typedef uint16_t Word16
 
typedef uint32_t Word32
 
typedef uint64_t Word64
 
typedef uint8_t Word8
 

Public Member Functions

virtual void DigiToRaw (int fedId, Digis &digis, FEDRawData &fedRawData, const Meta_Data &meta_data) const =0
 
 ESDataFormatter (const edm::ParameterSet &ps)
 
virtual ~ESDataFormatter ()
 

Protected Member Functions

std::string print (const Word64 &word) const
 
std::string print (const Word16 &word) const
 

Protected Attributes

const bool debug_
 
int formatMajor_
 
int formatMinor_
 
const bool printInHex_
 
const edm::ParameterSet pset_
 
const int trgtype_
 

Detailed Description

Definition at line 16 of file ESDataFormatter.h.

Member Typedef Documentation

typedef std::vector<ESDataFrame> ESDataFormatter::DetDigis

Definition at line 30 of file ESDataFormatter.h.

typedef std::map<int, DetDigis> ESDataFormatter::Digis

Definition at line 31 of file ESDataFormatter.h.

typedef uint16_t ESDataFormatter::Word16

Definition at line 34 of file ESDataFormatter.h.

typedef uint32_t ESDataFormatter::Word32

Definition at line 35 of file ESDataFormatter.h.

typedef uint64_t ESDataFormatter::Word64

Definition at line 36 of file ESDataFormatter.h.

typedef uint8_t ESDataFormatter::Word8

Definition at line 33 of file ESDataFormatter.h.

Constructor & Destructor Documentation

ESDataFormatter::ESDataFormatter ( const edm::ParameterSet ps)
inline

Definition at line 38 of file ESDataFormatter.h.

39  : pset_(ps),
40  trgtype_(0),
41  debug_(pset_.getUntrackedParameter<bool>("debugMode", false)),
42  printInHex_(pset_.getUntrackedParameter<bool>("printInHex", false)){};
T getUntrackedParameter(std::string const &, T const &) const
const int trgtype_
const bool printInHex_
const edm::ParameterSet pset_
const bool debug_
virtual ESDataFormatter::~ESDataFormatter ( )
inlinevirtual

Definition at line 43 of file ESDataFormatter.h.

43 {};

Member Function Documentation

virtual void ESDataFormatter::DigiToRaw ( int  fedId,
Digis digis,
FEDRawData fedRawData,
const Meta_Data meta_data 
) const
pure virtual

Implemented in ESDataFormatterV4, and ESDataFormatterV1_1.

Referenced by ESDigiToRaw::produce().

string ESDataFormatter::print ( const Word64 word) const
protected

Definition at line 11 of file ESDataFormatter.cc.

References TauDecayModes::dec, and str.

Referenced by ESDataFormatterV1_1::DigiToRaw(), and ESDataFormatterV4::DigiToRaw().

11  {
12  ostringstream str;
13  if (printInHex_)
14  str << "Word64: 0x" << setw(16) << setfill('0') << hex << (word) << dec;
15  else
16  str << "Word64: " << reinterpret_cast<const bitset<64>&>(word);
17  return str.str();
18 }
uint64_t word
const bool printInHex_
#define str(s)
string ESDataFormatter::print ( const Word16 word) const
protected

Definition at line 20 of file ESDataFormatter.cc.

References TauDecayModes::dec, and str.

20  {
21  ostringstream str;
22  if (printInHex_)
23  str << "Word16: 0x" << setw(8) << setfill('0') << hex << (word) << dec;
24  else
25  str << "Word16: " << reinterpret_cast<const bitset<16>&>(word);
26  return str.str();
27 }
uint64_t word
const bool printInHex_
#define str(s)

Member Data Documentation

const bool ESDataFormatter::debug_
protected
int ESDataFormatter::formatMajor_
protected

Definition at line 53 of file ESDataFormatter.h.

int ESDataFormatter::formatMinor_
protected

Definition at line 54 of file ESDataFormatter.h.

const bool ESDataFormatter::printInHex_
protected

Definition at line 51 of file ESDataFormatter.h.

const edm::ParameterSet ESDataFormatter::pset_
protected

Definition at line 48 of file ESDataFormatter.h.

const int ESDataFormatter::trgtype_
protected