#include <L1GtPatternLine.h>
Public Member Functions | |
boost::uint32_t | get (const std::string &name) const |
bool | has (const std::string &colname) const |
std::string | name (const std::string &prefix, unsigned int i) const |
std::string | nextName (const std::string &prefix) |
void | print (std::ostream &out) const |
void | push (const std::string &prefix, boost::uint32_t value) |
void | set (const std::string &name, boost::uint32_t value) |
Private Types | |
typedef std::map< std::string, boost::uint32_t > | ColumnMap |
Private Attributes | |
ColumnMap | m_columns |
A class representing the contents of one line in a pattern file. The contents are represented as (name, value) pairs. Column ids are also enumerated so that multiple columns with identical names end up with consecutive names ("muon" becomes "muon1", "muon2" etc).
Description: A representation of a of pattern file line for L1 GT hardware testing.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Description: see header file.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 30 of file L1GtPatternLine.h.
typedef std::map<std::string, boost::uint32_t> L1GtPatternLine::ColumnMap [private] |
Definition at line 65 of file L1GtPatternLine.h.
uint32_t L1GtPatternLine::get | ( | const std::string & | name | ) | const |
Accessor.
Definition at line 79 of file L1GtPatternLine.cc.
References m_columns.
Referenced by L1GtPatternWriter::writePatternLine().
bool L1GtPatternLine::has | ( | const std::string & | colname | ) | const |
Returns true iff a column of the given name exists.
colname | Column name to look for. Beware: This has to include the number appended by push! |
Definition at line 58 of file L1GtPatternLine.cc.
References m_columns.
Referenced by nextName(), and L1GtPatternWriter::writePatternLine().
std::string L1GtPatternLine::name | ( | const std::string & | prefix, |
unsigned int | i | ||
) | const |
Forms a column name from a prefix and a number.
Definition at line 73 of file L1GtPatternLine.cc.
References i.
Referenced by nextName().
std::string L1GtPatternLine::nextName | ( | const std::string & | prefix | ) |
void L1GtPatternLine::print | ( | std::ostream & | out | ) | const |
void L1GtPatternLine::push | ( | const std::string & | prefix, |
boost::uint32_t | value | ||
) |
Add a new column with the specified name prefix and value.
prefix | The name prefix of the new column. The final column name consists of prefix + the lowest free number (starting at 1) |
value | The actual data content of the column. |
Referenced by L1GtPatternGenerator::extractGlobalTriggerData(), extractGlobalTriggerWord(), and extractRecordData().
void L1GtPatternLine::set | ( | const std::string & | name, |
boost::uint32_t | value | ||
) |
Manipulate an existing value.
name | the name (prefix + no) of the column to set. Do not use _h or _l values here! |
value | the new value for the column. |
ColumnMap L1GtPatternLine::m_columns [private] |
Definition at line 66 of file L1GtPatternLine.h.