File indexing completed on 2024-04-06 12:29:42
0001 #ifndef SimDataFormats_GeneratorProducts_LHEXMLStringProduct_h
0002 #define SimDataFormats_GeneratorProducts_LHEXMLStringProduct_h
0003
0004
0005
0006
0007
0008 #include <string>
0009 #include <vector>
0010 #include <cstdint>
0011
0012 class LHEXMLStringProduct {
0013 public:
0014
0015 LHEXMLStringProduct();
0016 LHEXMLStringProduct(const std::string& content);
0017 virtual ~LHEXMLStringProduct();
0018
0019
0020 const std::vector<std::string>& getStrings() const { return content_; }
0021
0022 const std::vector<std::vector<uint8_t> >& getCompressed() const { return compressedContent_; }
0023
0024 void fillCompressedContent(std::istream& input, unsigned int initialSize = 4 * 1024 * 1024);
0025 void writeCompressedContent(std::ostream& output, unsigned int i) const;
0026
0027
0028 bool mergeProduct(LHEXMLStringProduct const& other);
0029 void swap(LHEXMLStringProduct& other);
0030
0031 private:
0032 std::vector<std::string> content_;
0033 std::vector<std::vector<uint8_t> > compressedContent_;
0034 };
0035
0036 #endif