#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< uint32_t > &lengths, const std::vector< 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 uint32_t | mask (uint32_t length) |
Private Attributes | |
std::vector< int > | m_bx |
std::vector< std::string > | m_columns |
bool | m_debug |
std::vector< uint32_t > | m_defaults |
std::ostream & | m_dest |
std::string | m_footer |
std::string | m_header |
std::vector< uint32_t > | m_lengths |
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< uint32_t > & | lengths, | ||
const std::vector< 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.
|
virtual |
void L1GtPatternWriter::close | ( | void | ) |
Close the output stream
Definition at line 107 of file L1GtPatternWriter.cc.
References m_dest, and m_footer.
Referenced by esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), and ~L1GtPatternWriter().
|
staticprotected |
Returns an and-mask to truncate an uint32_t to a specified length.
Definition at line 115 of file L1GtPatternWriter.cc.
References mitigatedMETSequence_cff::U.
Referenced by writePatternLine().
|
virtual |
Format a single line.
Definition at line 74 of file L1GtPatternWriter.cc.
References TauDecayModes::dec, mps_fire::i, mps_splice::line, 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 50 of file L1GtPatternWriter.cc.
References L1GtPatternMap::begin(), l1GtPatternGenerator_cfi::bx, TauDecayModes::dec, submitPVValidationJobs::dump, L1GtPatternMap::end(), spr::find(), edm::isDebugEnabled(), LogTrace, m_bx, m_debug, m_dest, m_lineNo, L1GtPatternMap::print(), and writePatternLine().
|
private |
Definition at line 73 of file L1GtPatternWriter.h.
Referenced by writePatterns().
|
private |
Definition at line 70 of file L1GtPatternWriter.h.
Referenced by writePatternLine().
|
private |
Definition at line 74 of file L1GtPatternWriter.h.
Referenced by writePatterns().
|
private |
Definition at line 72 of file L1GtPatternWriter.h.
Referenced by writePatternLine().
|
private |
Definition at line 67 of file L1GtPatternWriter.h.
Referenced by close(), L1GtPatternWriter(), writePatternLine(), and writePatterns().
|
private |
Definition at line 69 of file L1GtPatternWriter.h.
Referenced by close().
|
private |
Definition at line 68 of file L1GtPatternWriter.h.
Referenced by L1GtPatternWriter().
|
private |
Definition at line 71 of file L1GtPatternWriter.h.
Referenced by writePatternLine().
|
private |
Definition at line 76 of file L1GtPatternWriter.h.
Referenced by writePatternLine(), and writePatterns().