1 #include "Alignment/Geners/interface/ColumnBuffer.hh"
2 #include "Alignment/Geners/interface/streamposIO.hh"
8 write_pod(os, firstrow);
9 write_pod(os, lastrowp1);
10 const unsigned char isPod = (podsize ? 1 : 0);
13 write_pod(os, podsize);
15 write_pod_vector(os, offsets);
16 return !os.fail() && buf.write(os);
19 void ColumnBuffer::restore(
const ClassId&
id,
const ClassId& bufId,
20 std::istream& is, ColumnBuffer*
obj)
23 obj->classId().ensureSameId(
id);
25 read_pod(is, &obj->firstrow);
26 read_pod(is, &obj->lastrowp1);
32 read_pod(is, &obj->podsize);
37 read_pod_vector(is, &obj->offsets);
39 if (is.fail())
throw IOReadFailure(
40 "In gs::Private::ColumnBuffer::restore: input stream failure");
43 if (isPod && !obj->podsize)
throw IOInvalidData(
44 "In gs::Private::ColumnBuffer::restore: corrupted record");
46 CharBuffer::restore(bufId, is, &obj->buf);
51 return firstrow == r.firstrow &&
52 lastrowp1 == r.lastrowp1 &&
53 podsize == r.podsize &&
54 offsets == r.offsets &&
58 const ClassId& ColumnBuffer::static_classId()
bool operator==(const QGLikelihoodParameters &lhs, const QGLikelihoodCategory &rhs)
Test if parameters are compatible with category.