CMS 3D CMS Logo

CatalogIO.cc
Go to the documentation of this file.
1 #include "Alignment/Geners/interface/CatalogIO.hh"
2 
3 namespace gs {
4  bool writeBinaryCatalog(std::ostream& os, const unsigned compressionCode,
5  const unsigned mergeLevel,
6  const std::vector<std::string>& annotations,
7  const AbsCatalog& catalog, const unsigned formatId)
8  {
9  os.seekp(0, std::ios_base::beg);
10 
11  const unsigned endianness = 0x01020304;
12  const unsigned char sizelong = sizeof(long);
13 
14  write_pod(os, formatId);
15  write_pod(os, endianness);
16  write_pod(os, sizelong);
17  write_pod(os, compressionCode);
18  write_pod(os, mergeLevel);
19  write_pod_vector(os, annotations);
20 
21  return !os.fail() &&
22  catalog.classId().write(os) && catalog.write(os);
23  }
24 }
bool writeBinaryCatalog(std::ostream &os, const unsigned compressionCode, const unsigned mergeLevel, const std::vector< std::string > &annotations, const AbsCatalog &catalog, const unsigned formatId)
Definition: CatalogIO.cc:4
Definition: AbsArchive.cc:53