Go to the documentation of this file.00001 #include "Alignment/Geners/interface/CatalogIO.hh"
00002
00003 namespace gs {
00004 bool writeBinaryCatalog(std::ostream& os, const unsigned compressionCode,
00005 const unsigned mergeLevel,
00006 const std::vector<std::string>& annotations,
00007 const AbsCatalog& catalog, const unsigned formatId)
00008 {
00009 os.seekp(0, std::ios_base::beg);
00010
00011 const unsigned endianness = 0x01020304;
00012 const unsigned char sizelong = sizeof(long);
00013
00014 write_pod(os, formatId);
00015 write_pod(os, endianness);
00016 write_pod(os, sizelong);
00017 write_pod(os, compressionCode);
00018 write_pod(os, mergeLevel);
00019 write_pod_vector(os, annotations);
00020
00021 return !os.fail() &&
00022 catalog.classId().write(os) && catalog.write(os);
00023 }
00024 }