#include <ESDataFormatter.h>
Public Types | |
typedef std::vector< ESDataFrame > | DetDigis |
typedef std::map< int, DetDigis > | Digis |
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_ |
Definition at line 16 of file ESDataFormatter.h.
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.
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.
{};
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.
Referenced by ESDigiToRaw::produce().
virtual void ESDataFormatter::setKchipBC | ( | int | i | ) | [inline, virtual] |
Definition at line 43 of file ESDataFormatter.h.
Referenced by ESDigiToRaw::produce().
virtual void ESDataFormatter::setKchipEC | ( | int | i | ) | [inline, virtual] |
Definition at line 44 of file ESDataFormatter.h.
Referenced by ESDigiToRaw::produce().
virtual void ESDataFormatter::setLV1 | ( | int | i | ) | [inline, virtual] |
Definition at line 41 of file ESDataFormatter.h.
Referenced by ESDigiToRaw::produce().
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().
{orbit_number_ = i;};
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] |
int ESDataFormatter::bx_ [protected] |
Definition at line 52 of file ESDataFormatter.h.
Referenced by ESDataFormatterV4::DigiToRaw(), ESDataFormatterV1_1::DigiToRaw(), and setBX().
bool ESDataFormatter::debug_ [protected] |
Definition at line 58 of file ESDataFormatter.h.
Referenced by ESDataFormatterV4::DigiToRaw(), ESDataFormatterV1_1::DigiToRaw(), ESDataFormatter(), and ESDataFormatterV4::ESDataFormatterV4().
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] |
Definition at line 53 of file ESDataFormatter.h.
Referenced by ESDataFormatterV4::DigiToRaw(), ESDataFormatterV1_1::DigiToRaw(), and setLV1().
int ESDataFormatter::orbit_number_ [protected] |
Definition at line 51 of file ESDataFormatter.h.
Referenced by ESDataFormatterV4::DigiToRaw(), ESDataFormatterV1_1::DigiToRaw(), and setOrbitNumber().
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] |
Definition at line 50 of file ESDataFormatter.h.
Referenced by ESDataFormatterV4::DigiToRaw(), ESDataFormatterV1_1::DigiToRaw(), and setRunNumber().
int ESDataFormatter::trgtype_ [protected] |
Definition at line 54 of file ESDataFormatter.h.
Referenced by ESDataFormatterV4::DigiToRaw(), ESDataFormatterV1_1::DigiToRaw(), and setTriggerType().