#include <L1GtPatternWriter.h>
Public Member Functions | |
void | close () |
L1GtPatternWriter (std::ostream &destination, const std::string &header, const std::string &footer, const std::vector< std::string > &columns, const std::vector< boost::uint32_t > &lengths, const std::vector< boost::uint32_t > &defaultValues, const std::vector< int > &bx, bool debug=false) | |
virtual void | writePatternLine (const L1GtPatternLine &line) |
void | writePatterns (const L1GtPatternMap &patterns) |
virtual | ~L1GtPatternWriter () |
Static Protected Member Functions | |
static boost::uint32_t | mask (boost::uint32_t length) |
Private Attributes | |
std::vector< int > | m_bx |
std::vector< std::string > | m_columns |
bool | m_debug |
std::vector< boost::uint32_t > | m_defaults |
std::ostream & | m_dest |
std::string | m_footer |
std::string | m_header |
std::vector< boost::uint32_t > | m_lengths |
boost::uint32_t | m_lineNo |
The L1GtPatternWriter object is responsible for the actual formatting of the content of one or more L1GtPatternMaps into a text file.
Description: Formats L1GtPatternMaps into text files.
Implementation: <TODO: enter implementation details>
Description: see header file.
Implementation: <TODO: enter implementation details>
Definition at line 28 of file L1GtPatternWriter.h.
L1GtPatternWriter::L1GtPatternWriter | ( | std::ostream & | destination, |
const std::string & | header, | ||
const std::string & | footer, | ||
const std::vector< std::string > & | columns, | ||
const std::vector< boost::uint32_t > & | lengths, | ||
const std::vector< boost::uint32_t > & | defaultValues, | ||
const std::vector< int > & | bx, | ||
bool | debug = false |
||
) |
Construct a new pattern writer.
destination | output stream to write to |
header | string to be written before pattern lines |
footer | string to be written after pattern lines |
columns | vector of column names for each pattern line |
length | vector of column lengths (in bits!) for each pattern line |
defaults | vector of default values (written if the pattern data does not contain entries for the column). Indexed like columns. |
bx | vector of bunch crossing numbers to print (empty for 'all') |
debug | set to true to enable extensive debug logging |
Definition at line 28 of file L1GtPatternWriter.cc.
References m_dest, and m_header.
|
virtual |
Definition at line 108 of file L1GtPatternWriter.cc.
References close().
void L1GtPatternWriter::close | ( | void | ) |
Close the output stream
Definition at line 101 of file L1GtPatternWriter.cc.
References m_dest, and m_footer.
Referenced by lumiQTWidget.ApplicationWindow::fileQuit(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), Vispa.Gui.FindDialog.FindDialog::keyPressEvent(), and ~L1GtPatternWriter().
|
staticprotected |
Returns an and-mask to truncate an boost::uint32_t to a specified length.
Definition at line 112 of file L1GtPatternWriter.cc.
Referenced by writePatternLine().
|
virtual |
Format a single line.
Definition at line 69 of file L1GtPatternWriter.cc.
References L1GtPatternLine::get(), L1GtPatternLine::has(), i, m_columns, m_defaults, m_dest, m_lengths, m_lineNo, mask(), and relativeConstraints::value.
Referenced by writePatterns().
void L1GtPatternWriter::writePatterns | ( | const L1GtPatternMap & | patterns | ) |
Write the lines from a pattern map to the output stream.
Definition at line 46 of file L1GtPatternWriter.cc.
References L1GtPatternMap::begin(), hcal_timing_source_file_cfg::dump, L1GtPatternMap::end(), spr::find(), edm::isDebugEnabled(), LogTrace, m_bx, m_debug, m_dest, m_lineNo, L1GtPatternMap::print(), and writePatternLine().
|
private |
Definition at line 71 of file L1GtPatternWriter.h.
Referenced by writePatterns().
|
private |
Definition at line 68 of file L1GtPatternWriter.h.
Referenced by writePatternLine().
|
private |
Definition at line 72 of file L1GtPatternWriter.h.
Referenced by writePatterns().
|
private |
Definition at line 70 of file L1GtPatternWriter.h.
Referenced by writePatternLine().
|
private |
Definition at line 65 of file L1GtPatternWriter.h.
Referenced by close(), L1GtPatternWriter(), writePatternLine(), and writePatterns().
|
private |
Definition at line 67 of file L1GtPatternWriter.h.
Referenced by close().
|
private |
Definition at line 66 of file L1GtPatternWriter.h.
Referenced by L1GtPatternWriter().
|
private |
Definition at line 69 of file L1GtPatternWriter.h.
Referenced by writePatternLine().
|
private |
Definition at line 74 of file L1GtPatternWriter.h.
Referenced by writePatternLine(), and writePatterns().