CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
ESDataFormatter Class Referenceabstract

#include <ESDataFormatter.h>

Inheritance diagram for ESDataFormatter:
ESDataFormatterV1_1 ESDataFormatterV4

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

Definition at line 20 of file ESDataFormatter.h.

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

Definition at line 21 of file ESDataFormatter.h.

typedef uint16_t ESDataFormatter::Word16

Definition at line 24 of file ESDataFormatter.h.

typedef uint32_t ESDataFormatter::Word32

Definition at line 25 of file ESDataFormatter.h.

typedef uint64_t ESDataFormatter::Word64

Definition at line 26 of file ESDataFormatter.h.

typedef uint8_t ESDataFormatter::Word8

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_.

28  :
29  pset_(ps), run_number_(0), orbit_number_(0), bx_(0), lv1_(0), trgtype_(0),
30  kchip_bc_(0), kchip_ec_(0) {
31  debug_ = pset_.getUntrackedParameter<bool>("debugMode", false);
32  printInHex_ = pset_.getUntrackedParameter<bool>("printInHex", false);
33  };
T getUntrackedParameter(std::string const &, T const &) const
const edm::ParameterSet pset_
virtual ESDataFormatter::~ESDataFormatter ( )
inlinevirtual

Definition at line 34 of file ESDataFormatter.h.

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

34 {};

Member Function Documentation

virtual void ESDataFormatter::DigiToRaw ( int  fedId,
Digis digis,
FEDRawData fedRawData 
)
pure virtual
string ESDataFormatter::print ( const Word64 word) const
protected

Definition at line 13 of file ESDataFormatter.cc.

References TauDecayModes::dec, and harvestTrackValidationPlots::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 }
string ESDataFormatter::print ( const Word16 word) const
protected

Definition at line 23 of file ESDataFormatter.cc.

References TauDecayModes::dec, and harvestTrackValidationPlots::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 }
virtual void ESDataFormatter::setBX ( int  i)
inlinevirtual

Definition at line 40 of file ESDataFormatter.h.

References bx_, and mps_fire::i.

Referenced by ESDigiToRaw::produce().

40 {bx_ = i;};
virtual void ESDataFormatter::setKchipBC ( int  i)
inlinevirtual

Definition at line 43 of file ESDataFormatter.h.

References mps_fire::i, and kchip_bc_.

Referenced by ESDigiToRaw::produce().

virtual void ESDataFormatter::setKchipEC ( int  i)
inlinevirtual

Definition at line 44 of file ESDataFormatter.h.

References mps_fire::i, kchip_ec_, and pset_.

Referenced by ESDigiToRaw::produce().

virtual void ESDataFormatter::setLV1 ( int  i)
inlinevirtual

Definition at line 41 of file ESDataFormatter.h.

References mps_fire::i, and lv1_.

Referenced by ESDigiToRaw::produce().

virtual void ESDataFormatter::setOrbitNumber ( int  i)
inlinevirtual

Definition at line 39 of file ESDataFormatter.h.

References mps_fire::i, and orbit_number_.

Referenced by ESDigiToRaw::produce().

virtual void ESDataFormatter::setRunNumber ( int  i)
inlinevirtual

Definition at line 38 of file ESDataFormatter.h.

References mps_fire::i, and run_number_.

Referenced by ESDigiToRaw::produce().

virtual void ESDataFormatter::setTriggerType ( int  i)
inlinevirtual

Definition at line 42 of file ESDataFormatter.h.

References mps_fire::i, and trgtype_.

Member Data Documentation

int ESDataFormatter::bx_
protected
bool ESDataFormatter::debug_
protected
int ESDataFormatter::formatMajor_
protected

Definition at line 61 of file ESDataFormatter.h.

int ESDataFormatter::formatMinor_
protected

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
int ESDataFormatter::orbit_number_
protected
bool ESDataFormatter::printInHex_
protected

Definition at line 59 of file ESDataFormatter.h.

Referenced by ESDataFormatter().

const edm::ParameterSet ESDataFormatter::pset_
protected

Definition at line 44 of file ESDataFormatter.h.

Referenced by ESDataFormatter(), and setKchipEC().

int ESDataFormatter::run_number_
protected
int ESDataFormatter::trgtype_
protected