test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.

34 {};

Member Function Documentation

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

Implemented in ESDataFormatterV4, and ESDataFormatterV1_1.

Referenced by ESDigiToRaw::produce().

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

Definition at line 13 of file ESDataFormatter.cc.

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.

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

Referenced by ESDigiToRaw::produce().

40 {bx_ = i;};
int i
Definition: DBlmapReader.cc:9
virtual void ESDataFormatter::setKchipBC ( int  i)
inlinevirtual

Definition at line 43 of file ESDataFormatter.h.

References i, and kchip_bc_.

Referenced by ESDigiToRaw::produce().

43 {kchip_bc_ = i;};
int i
Definition: DBlmapReader.cc:9
virtual void ESDataFormatter::setKchipEC ( int  i)
inlinevirtual

Definition at line 44 of file ESDataFormatter.h.

References i, and kchip_ec_.

Referenced by ESDigiToRaw::produce().

44 {kchip_ec_ = i;};
int i
Definition: DBlmapReader.cc:9
virtual void ESDataFormatter::setLV1 ( int  i)
inlinevirtual

Definition at line 41 of file ESDataFormatter.h.

References i, and lv1_.

Referenced by ESDigiToRaw::produce().

41 {lv1_ = i;};
int i
Definition: DBlmapReader.cc:9
virtual void ESDataFormatter::setOrbitNumber ( int  i)
inlinevirtual

Definition at line 39 of file ESDataFormatter.h.

References i, and orbit_number_.

Referenced by ESDigiToRaw::produce().

39 {orbit_number_ = i;};
int i
Definition: DBlmapReader.cc:9
virtual void ESDataFormatter::setRunNumber ( int  i)
inlinevirtual

Definition at line 38 of file ESDataFormatter.h.

References i, and run_number_.

Referenced by ESDigiToRaw::produce().

38 {run_number_ = i;};
int i
Definition: DBlmapReader.cc:9
virtual void ESDataFormatter::setTriggerType ( int  i)
inlinevirtual

Definition at line 42 of file ESDataFormatter.h.

References i, and trgtype_.

42 {trgtype_ = i;};
int i
Definition: DBlmapReader.cc:9

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

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