11 #ifndef EVIO_6_0_RECORDINPUT_H
12 #define EVIO_6_0_RECORDINPUT_H
108 static const uint32_t DEFAULT_BUF_SIZE = 8 * 1024 * 1024;
111 uint32_t nEntries = 0;
115 uint32_t userHeaderOffset = 0;
119 uint32_t eventsOffset = 0;
123 uint32_t uncompressedEventsLength = 0;
129 std::shared_ptr<RecordHeader> header;
133 std::shared_ptr<ByteBuffer> dataBuffer;
144 void allocate(
size_t size);
145 void setByteOrder(
const ByteOrder & order);
146 void showIndex()
const;
160 std::shared_ptr<RecordHeader>
getHeader();
167 std::shared_ptr<ByteBuffer>
getEvent(std::shared_ptr<ByteBuffer> & buffer, uint32_t index,
size_t bufOffset = 0);
170 std::shared_ptr<ByteBuffer>
getUserHeader(std::shared_ptr<ByteBuffer> & buffer,
size_t bufOffset = 0);
173 std::shared_ptr<uint8_t>
getEvent(uint32_t index, uint32_t * len);
180 void readRecord(std::ifstream & file,
size_t position);
183 static uint32_t
uncompressRecord(std::shared_ptr<ByteBuffer> & srcBuf,
size_t srcOff,
184 std::shared_ptr<ByteBuffer> & dstBuf,
192 #endif //EVIO_6_0_RECORDINPUT_H
This class is copied from one of the same name in the Java programming language.
Definition: ByteBuffer.h:42
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
static const ByteOrder ENDIAN_LOCAL
Local host's byte order.
Definition: ByteOrder.h:61