File indexing completed on 2024-04-06 11:56:20
0001 #ifndef GENERS_RPFOOTERREFERENCE_HH_
0002 #define GENERS_RPFOOTERREFERENCE_HH_
0003
0004 #include "Alignment/Geners/interface/AbsArchive.hh"
0005 #include "Alignment/Geners/interface/AbsReference.hh"
0006 #include "Alignment/Geners/interface/GenericIO.hh"
0007
0008 namespace gs {
0009 namespace Private {
0010 struct RPFooterReference : public AbsReference
0011 {
0012 inline RPFooterReference(
0013 AbsArchive& ar, const ClassId& classId,
0014 const char* name, const char* category)
0015 : AbsReference(ar, classId, "gs::RPFooter",
0016 name, category) {}
0017
0018 void fillItems(
0019 unsigned long* nrows, unsigned long long* headerId,
0020 std::vector<std::pair<unsigned long,unsigned long long> >* ids,
0021 unsigned long long* offset,
0022 const unsigned long number) const
0023 {
0024 const unsigned long long itemId = this->id(number);
0025 assert(itemId);
0026 std::istream& s = this->positionInputStream(itemId);
0027 *offset = archive().catalogEntry(itemId)->offset();
0028 read_pod(s, nrows);
0029 read_pod(s, headerId);
0030 restore_item(s, ids, false);
0031 }
0032 };
0033 }
0034 }
0035
0036 #endif
0037