CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

ESDataFormatter Class Reference

#include <ESDataFormatter.h>

Inheritance diagram for ESDataFormatter:
ESDataFormatterV1_1 ESDataFormatterV4

List of all members.

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)=0
 ESDataFormatter (const edm::ParameterSet &ps)
virtual void setBX (int i)
virtual void setKchipBC (int i)
virtual void setKchipEC (int i)
virtual void setLV1 (int i)
virtual void setOrbitNumber (int i)
virtual void setRunNumber (int i)
virtual void setTriggerType (int i)
virtual ~ESDataFormatter ()

Protected Member Functions

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

Protected Attributes

int bx_
bool debug_
int formatMajor_
int formatMinor_
int kchip_bc_
int kchip_ec_
int lv1_
int orbit_number_
bool printInHex_
const edm::ParameterSet pset_
int run_number_
int trgtype_

Detailed Description

Definition at line 16 of file ESDataFormatter.h.


Member Typedef Documentation

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

Reimplemented in ESDataFormatterV1_1, and ESDataFormatterV4.

Definition at line 20 of file ESDataFormatter.h.

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

Reimplemented in ESDataFormatterV1_1, and ESDataFormatterV4.

Definition at line 21 of file ESDataFormatter.h.

typedef uint16_t ESDataFormatter::Word16

Reimplemented in ESDataFormatterV1_1, and ESDataFormatterV4.

Definition at line 24 of file ESDataFormatter.h.

typedef uint32_t ESDataFormatter::Word32

Reimplemented in ESDataFormatterV1_1, and ESDataFormatterV4.

Definition at line 25 of file ESDataFormatter.h.

typedef uint64_t ESDataFormatter::Word64

Reimplemented in ESDataFormatterV1_1, and ESDataFormatterV4.

Definition at line 26 of file ESDataFormatter.h.

typedef uint8_t ESDataFormatter::Word8

Reimplemented in ESDataFormatterV1_1, and ESDataFormatterV4.

Definition at line 23 of file ESDataFormatter.h.


Constructor & Destructor Documentation

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

Definition at line 28 of file ESDataFormatter.h.

References debug_, edm::ParameterSet::getUntrackedParameter(), printInHex_, and pset_.

                                             : 
    pset_(ps), run_number_(0), orbit_number_(0), bx_(0), lv1_(0), trgtype_(0),
    kchip_bc_(0), kchip_ec_(0) { 
    debug_ = pset_.getUntrackedParameter<bool>("debugMode", false);
    printInHex_ = pset_.getUntrackedParameter<bool>("printInHex", false);
  };
virtual ESDataFormatter::~ESDataFormatter ( ) [inline, virtual]

Definition at line 34 of file ESDataFormatter.h.

{};

Member Function Documentation

virtual void ESDataFormatter::DigiToRaw ( int  fedId,
Digis digis,
FEDRawData fedRawData 
) [pure virtual]

Implemented in ESDataFormatterV1_1, and ESDataFormatterV4.

Referenced by ESDigiToRaw::produce().

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

Definition at line 13 of file ESDataFormatter.cc.

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

{
  ostringstream str;
  if (printInHex_)
    str << "Word64:  0x" << setw(16) << setfill('0') << hex << (word) << dec ;
  else 
    str << "Word64:  " << reinterpret_cast<const bitset<64>&> (word);
  return str.str();
}
string ESDataFormatter::print ( const Word16 word) const [protected]

Definition at line 23 of file ESDataFormatter.cc.

{
  ostringstream str;
  if (printInHex_) 
    str << "Word16:  0x" << setw(8) << setfill('0') << hex << (word) << dec ;
  else 
    str << "Word16:  " << reinterpret_cast<const bitset<16>&> (word);
  return str.str();
}
virtual void ESDataFormatter::setBX ( int  i) [inline, virtual]

Definition at line 40 of file ESDataFormatter.h.

References bx_, and i.

Referenced by ESDigiToRaw::produce().

{bx_ = i;};
virtual void ESDataFormatter::setKchipBC ( int  i) [inline, virtual]

Definition at line 43 of file ESDataFormatter.h.

References i, and kchip_bc_.

Referenced by ESDigiToRaw::produce().

{kchip_bc_ = i;};
virtual void ESDataFormatter::setKchipEC ( int  i) [inline, virtual]

Definition at line 44 of file ESDataFormatter.h.

References i, and kchip_ec_.

Referenced by ESDigiToRaw::produce().

{kchip_ec_ = i;};
virtual void ESDataFormatter::setLV1 ( int  i) [inline, virtual]

Definition at line 41 of file ESDataFormatter.h.

References i, and lv1_.

Referenced by ESDigiToRaw::produce().

{lv1_ = i;};
virtual void ESDataFormatter::setOrbitNumber ( int  i) [inline, virtual]

Definition at line 39 of file ESDataFormatter.h.

References i, and orbit_number_.

Referenced by ESDigiToRaw::produce().

virtual void ESDataFormatter::setRunNumber ( int  i) [inline, virtual]

Definition at line 38 of file ESDataFormatter.h.

References i, and run_number_.

Referenced by ESDigiToRaw::produce().

{run_number_ = i;};
virtual void ESDataFormatter::setTriggerType ( int  i) [inline, virtual]

Definition at line 42 of file ESDataFormatter.h.

References i, and trgtype_.

{trgtype_ = i;};

Member Data Documentation

int ESDataFormatter::bx_ [protected]
bool ESDataFormatter::debug_ [protected]

Definition at line 61 of file ESDataFormatter.h.

Definition at line 62 of file ESDataFormatter.h.

int ESDataFormatter::kchip_bc_ [protected]

Definition at line 55 of file ESDataFormatter.h.

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

int ESDataFormatter::kchip_ec_ [protected]

Definition at line 56 of file ESDataFormatter.h.

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

int ESDataFormatter::lv1_ [protected]
bool ESDataFormatter::printInHex_ [protected]

Definition at line 59 of file ESDataFormatter.h.

Referenced by ESDataFormatter().

Definition at line 44 of file ESDataFormatter.h.

Referenced by ESDataFormatter().

int ESDataFormatter::trgtype_ [protected]