CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GtPatternWriter.h
Go to the documentation of this file.
1 #ifndef GlobalTriggerAnalyzer_L1GtPatternWriter_h
2 #define GlobalTriggerAnalyzer_L1GtPatternWriter_h
3 
20 #include <iosfwd>
21 #include <string>
22 #include <vector>
23 #include <boost/cstdint.hpp>
24 
25 class L1GtPatternMap;
26 class L1GtPatternLine;
27 
31 public:
43  L1GtPatternWriter(std::ostream& destination, const std::string& header,
44  const std::string& footer, const std::vector<std::string> columns,
45  const std::vector<boost::uint32_t>& lengths,
46  const std::vector<boost::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 protected:
63  static boost::uint32_t mask(boost::uint32_t length);
64 
65 
66 private:
67  std::ostream& m_dest;
68  std::string m_header;
69  std::string m_footer;
70  std::vector<std::string> m_columns;
71  std::vector<boost::uint32_t> m_lengths;
72  std::vector<boost::uint32_t> m_defaults;
73  std::vector<int> m_bx;
74  bool m_debug;
75 
76  boost::uint32_t m_lineNo;
77 };
78 
79 
80 #endif /*GlobalTriggerAnalyzer_L1GtPatternWriter_h*/
void writePatterns(const L1GtPatternMap &patterns)
boost::uint32_t m_lineNo
std::vector< boost::uint32_t > m_defaults
std::vector< boost::uint32_t > m_lengths
static boost::uint32_t mask(boost::uint32_t length)
std::ostream & m_dest
std::vector< std::string > m_columns
virtual void writePatternLine(const L1GtPatternLine &line)
#define debug
Definition: MEtoEDMFormat.h:34
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)
std::vector< int > m_bx