File indexing completed on 2024-04-06 11:56:18
0001 #ifndef GENERS_CPFOOTERREFERENCE_HH_
0002 #define GENERS_CPFOOTERREFERENCE_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 CPFooterReference : public AbsReference
0011 {
0012 inline CPFooterReference(
0013 AbsArchive& ar, const ClassId& classId,
0014 const char* name, const char* category)
0015 : AbsReference(ar, classId, "gs::CPFooter",
0016 name, category) {}
0017
0018
0019 inline bool isIOCompatible(const CatalogEntry& r) const
0020 {return this->isSameIOPrototype(r);}
0021
0022 void fillItems(
0023 unsigned long* nrows, unsigned long long* headerId,
0024 std::vector<std::vector<
0025 std::pair<unsigned long,unsigned long long> > >* ids,
0026 unsigned long long* offset,
0027 const unsigned long number) const
0028 {
0029 const unsigned long long itemId = this->id(number);
0030 assert(itemId);
0031 std::istream& s = this->positionInputStream(itemId);
0032 *offset = archive().catalogEntry(itemId)->offset();
0033 read_pod(s, nrows);
0034 read_pod(s, headerId);
0035 restore_item(s, ids, false);
0036 }
0037 };
0038 }
0039 }
0040
0041 #endif
0042