CMS 3D CMS Logo

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.

38  :
39  pset_(ps), trgtype_(0),
40  debug_(pset_.getUntrackedParameter<bool>("debugMode", false)),
41  printInHex_(pset_.getUntrackedParameter<bool>("printInHex", false))
42  { };
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.

References DigiToRaw(), and l1t::stage2::layer2::fedId.

43 {};

Member Function Documentation

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

Implemented in ESDataFormatterV1_1.

Referenced by ESDigiToRaw::produce(), and ~ESDataFormatter().

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

Definition at line 13 of file ESDataFormatter.cc.

References TauDecayModes::dec, and str.

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

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

Definition at line 23 of file ESDataFormatter.cc.

References TauDecayModes::dec, and str.

24 {
25  ostringstream str;
26  if (printInHex_)
27  str << "Word16: 0x" << setw(8) << setfill('0') << hex << (word) << dec ;
28  else
29  str << "Word16: " << reinterpret_cast<const bitset<16>&> (word);
30  return str.str();
31 }
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