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 Word16 &word) const
 
std::string print (const Word64 &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

◆ DetDigis

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

Definition at line 30 of file ESDataFormatter.h.

◆ Digis

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

Definition at line 31 of file ESDataFormatter.h.

◆ Word16

typedef uint16_t ESDataFormatter::Word16

Definition at line 34 of file ESDataFormatter.h.

◆ Word32

typedef uint32_t ESDataFormatter::Word32

Definition at line 35 of file ESDataFormatter.h.

◆ Word64

typedef uint64_t ESDataFormatter::Word64

Definition at line 36 of file ESDataFormatter.h.

◆ Word8

typedef uint8_t ESDataFormatter::Word8

Definition at line 33 of file ESDataFormatter.h.

Constructor & Destructor Documentation

◆ ESDataFormatter()

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)){};

◆ ~ESDataFormatter()

virtual ESDataFormatter::~ESDataFormatter ( )
inlinevirtual

Definition at line 43 of file ESDataFormatter.h.

43 {};

Member Function Documentation

◆ DigiToRaw()

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().

◆ print() [1/2]

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

Definition at line 20 of file ESDataFormatter.cc.

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 }

References TauDecayModes::dec, and str.

◆ print() [2/2]

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

Definition at line 11 of file ESDataFormatter.cc.

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 }

References TauDecayModes::dec, and str.

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

Member Data Documentation

◆ debug_

const bool ESDataFormatter::debug_
protected

◆ formatMajor_

int ESDataFormatter::formatMajor_
protected

Definition at line 53 of file ESDataFormatter.h.

◆ formatMinor_

int ESDataFormatter::formatMinor_
protected

Definition at line 54 of file ESDataFormatter.h.

◆ printInHex_

const bool ESDataFormatter::printInHex_
protected

Definition at line 51 of file ESDataFormatter.h.

◆ pset_

const edm::ParameterSet ESDataFormatter::pset_
protected

Definition at line 48 of file ESDataFormatter.h.

◆ trgtype_

const int ESDataFormatter::trgtype_
protected
ESDataFormatter::pset_
const edm::ParameterSet pset_
Definition: ESDataFormatter.h:48
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ESDataFormatter::debug_
const bool debug_
Definition: ESDataFormatter.h:50
ESDataFormatter::printInHex_
const bool printInHex_
Definition: ESDataFormatter.h:51
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
str
#define str(s)
Definition: TestProcessor.cc:53
ESDataFormatter::trgtype_
const int trgtype_
Definition: ESDataFormatter.h:49
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142