Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:54

0001 #ifndef GENERS_RPHEADERRECORD_HH_
0002 #define GENERS_RPHEADERRECORD_HH_
0003 
0004 #include "Alignment/Geners/interface/AbsRecord.hh"
0005 #include "Alignment/Geners/interface/binaryIO.hh"
0006 
0007 namespace gs {
0008     namespace Private {
0009         template<class Ntuple>
0010         class RPHeaderRecord : public AbsRecord
0011         {
0012         public:
0013             inline RPHeaderRecord(const Ntuple& obj)
0014                 : AbsRecord(obj.thisClass_, "gs::RPHeader",
0015                             obj.name_.c_str(), obj.category_.c_str()),
0016                   obj_(obj) {}
0017 
0018             inline bool writeData(std::ostream& os) const
0019             {
0020                 obj_.thisClass_.write(os);
0021                 obj_.bufferClass_.write(os);
0022                 write_pod_vector(os, obj_.colNames_);
0023                 write_pod(os, obj_.title_);
0024                 write_pod(os, obj_.bufferSize_);
0025                 return !os.fail();
0026             }
0027 
0028         private:
0029             RPHeaderRecord();
0030             const Ntuple& obj_;
0031         };
0032     }
0033 }
0034 
0035 #endif // GENERS_RPHEADERRECORD_HH_
0036