CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
5  const unsigned compressionCode,
6  const unsigned mergeLevel,
7  const std::vector<std::string> &annotations,
8  const AbsCatalog &catalog,
9  const unsigned formatId) {
10  os.seekp(0, std::ios_base::beg);
11 
12  const unsigned endianness = 0x01020304;
13  const unsigned char sizelong = sizeof(long);
14 
15  write_pod(os, formatId);
16  write_pod(os, endianness);
17  write_pod(os, sizelong);
18  write_pod(os, compressionCode);
19  write_pod(os, mergeLevel);
20  write_pod_vector(os, annotations);
21 
22  return !os.fail() && catalog.classId().write(os) && catalog.write(os);
23  }
24 } // namespace gs
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