CMS 3D CMS Logo

L1GtPatternWriter.h
Go to the documentation of this file.
1 #ifndef GlobalTriggerAnalyzer_L1GtPatternWriter_h
2 #define GlobalTriggerAnalyzer_L1GtPatternWriter_h
3 
18 #include <iosfwd>
19 #include <string>
20 #include <vector>
21 #include <cstdint>
22 
23 class L1GtPatternMap;
24 class L1GtPatternLine;
25 
29 public:
41  L1GtPatternWriter(std::ostream& destination,
42  const std::string& header,
43  const std::string& footer,
44  const std::vector<std::string>& columns,
45  const std::vector<uint32_t>& lengths,
46  const std::vector<uint32_t>& defaultValues,
47  const std::vector<int>& bx,
48  bool debug = false);
49 
51  void writePatterns(const L1GtPatternMap& patterns);
52 
54  virtual void writePatternLine(const L1GtPatternLine& line);
55 
57  void close();
58 
59  virtual ~L1GtPatternWriter();
60 
61 protected:
64  static uint32_t mask(uint32_t length);
65 
66 private:
67  std::ostream& m_dest;
70  std::vector<std::string> m_columns;
71  std::vector<uint32_t> m_lengths;
72  std::vector<uint32_t> m_defaults;
73  std::vector<int> m_bx;
74  bool m_debug;
75 
76  uint32_t m_lineNo;
77 };
78 
79 #endif /*GlobalTriggerAnalyzer_L1GtPatternWriter_h*/
void writePatterns(const L1GtPatternMap &patterns)
std::ostream & m_dest
std::vector< std::string > m_columns
std::vector< uint32_t > m_lengths
#define debug
Definition: HDRShower.cc:19
virtual void writePatternLine(const L1GtPatternLine &line)
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)
std::vector< uint32_t > m_defaults
static uint32_t mask(uint32_t length)
std::vector< int > m_bx