11 #ifndef EVIO_6_0_IEVIOREADER_H
12 #define EVIO_6_0_IEVIOREADER_H
68 virtual void setBuffer(std::shared_ptr<ByteBuffer> & buf) = 0;
101 virtual std::string
getPath() = 0;
107 virtual std::shared_ptr<EventParser> &
getParser() = 0;
113 virtual void setParser(std::shared_ptr<EventParser> & evParser) = 0;
185 virtual std::shared_ptr<EvioEvent>
getEvent(
size_t index) = 0;
199 virtual std::shared_ptr<EvioEvent>
parseEvent(
size_t index) = 0;
218 virtual std::shared_ptr<EvioEvent>
nextEvent() = 0;
246 virtual void parseEvent(std::shared_ptr<EvioEvent> evioEvent) = 0;
258 virtual uint32_t
getEventArray(
size_t evNumber, std::vector<uint8_t> & vec) = 0;
279 virtual void rewind() = 0;
292 virtual void close() = 0;
312 virtual std::shared_ptr<EvioEvent>
gotoEventNumber(
size_t evNumber) = 0;
337 #endif //EVIO_6_0_IEVIOREADER_H
virtual uint32_t getEventArray(size_t evNumber, std::vector< uint8_t > &vec)=0
Get an evio bank or event in vector-of-bytes form.
This class is copied from one of the same name in the Java programming language.
Definition: ByteBuffer.h:42
virtual std::shared_ptr< EvioEvent > parseEvent(size_t index)=0
This is a workhorse method.
virtual size_t getBlockCount()=0
This is the number of blocks/records in the file/buffer including the empty block, record or trailer at the end.
ReadWriteStatus
This enum denotes the status of a read/write.
Definition: IEvioReader.h:54
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
virtual std::shared_ptr< EvioEvent > getEvent(size_t index)=0
Get the event in the file/buffer at a given index (starting at 1).
Definition: IEvioReader.h:55
This pure, virtual class is meant to encapsulate the operation of reading both 2 differently formatte...
Definition: IEvioReader.h:39
Definition: IEvioReader.h:55
virtual std::shared_ptr< ByteBuffer > getByteBuffer()=0
Get the byte buffer being read.
virtual std::shared_ptr< EvioEvent > nextEvent()=0
Get the next event in the file/buffer.
virtual std::shared_ptr< EvioEvent > getFirstEvent()=0
Get the "first" event if there is one.
virtual size_t fileSize()=0
Get the size of the file being read, in bytes.
virtual uint32_t getEvioVersion()=0
Get the evio version number.
virtual void setParser(std::shared_ptr< EventParser > &evParser)=0
Set the file/buffer parser.
virtual std::shared_ptr< EventParser > & getParser()=0
Get the file/buffer parser.
virtual size_t getEventCount()=0
This is the number of events in the file/buffer.
virtual bool isClosed()=0
Has close() been called (without reopening by calling setBuffer(std::shared_ptr<ByteBuffer> &))...
Definition: IEvioReader.h:55
virtual void rewind()=0
The equivalent of rewinding the file.
virtual bool checkBlockNumberSequence()=0
Is this reader checking the block number sequence and throwing an exception if it's not sequential an...
virtual std::string getDictionaryXML()=0
Get the XML format dictionary if there is one.
virtual void setBuffer(std::shared_ptr< ByteBuffer > &buf)=0
This method can be used to avoid creating additional EvioReader objects by reusing this one with anot...
virtual size_t getNumEventsRemaining()=0
Get the number of events remaining in the file.
Definition: IEvioReader.h:55
virtual uint32_t getEventBuffer(size_t evNumber, ByteBuffer &buf)=0
Get an evio bank or event in ByteBuffer form.
virtual ssize_t position()=0
This is equivalent to obtaining the current position in the file.
virtual std::string getPath()=0
Get the path to the file.
virtual std::shared_ptr< IBlockHeader > getFirstBlockHeader()=0
This returns the FIRST block (record) header.
virtual std::shared_ptr< EvioEvent > parseNextEvent()=0
This is a workhorse method.
virtual bool hasFirstEvent()=0
Does this evio file have an associated first event? It's also called the Beginning-Of-Run event...
virtual bool hasDictionaryXML()=0
Does this evio file have an associated XML dictionary?
virtual ByteOrder & getByteOrder()=0
Get the byte order of the file/buffer being read.
Definition: IEvioReader.h:55
virtual std::shared_ptr< IBlockHeader > getCurrentBlockHeader()=0
This returns the current (active) block (physical record) header.
virtual void close()=0
This is closes the file, but for buffers it only sets the position to 0.
virtual std::shared_ptr< EvioEvent > gotoEventNumber(size_t evNumber)=0
Go to a specific event in the file.