11 #ifndef EVIO_6_0_IEVIOCOMPACTREADER_H
12 #define EVIO_6_0_IEVIOCOMPACTREADER_H
67 virtual void setBuffer(std::shared_ptr<ByteBuffer> & buf) = 0;
93 virtual std::string
getPath() = 0;
114 virtual std::shared_ptr<EvioXMLDictionary>
getDictionary() = 0;
143 virtual std::shared_ptr<EvioNode>
getEvent(
size_t eventNumber) = 0;
153 virtual std::shared_ptr<EvioNode>
getScannedEvent(
size_t eventNumber) = 0;
174 virtual void searchEvent(
size_t eventNumber, uint16_t tag, uint8_t num,
175 std::vector<std::shared_ptr<EvioNode>> & vec) = 0;
192 virtual void searchEvent(
size_t eventNumber, std::string
const & dictName,
193 std::shared_ptr<EvioXMLDictionary> & dictionary,
194 std::vector<std::shared_ptr<EvioNode>> & vec) = 0;
215 virtual std::shared_ptr<ByteBuffer>
removeEvent(
size_t eventNumber) = 0;
234 virtual std::shared_ptr<ByteBuffer>
removeStructure(std::shared_ptr<EvioNode> & removeNode) = 0;
283 virtual std::shared_ptr<ByteBuffer>
getData(std::shared_ptr<EvioNode> & node) = 0;
297 virtual std::shared_ptr<ByteBuffer>
getData(std::shared_ptr<EvioNode> & node,
bool copy) = 0;
309 virtual std::shared_ptr<ByteBuffer>
getData(std::shared_ptr<EvioNode> & node,
310 std::shared_ptr<ByteBuffer> & buf) = 0;
325 virtual std::shared_ptr<ByteBuffer>
getData(std::shared_ptr<EvioNode> & node,
326 std::shared_ptr<ByteBuffer> & buf,
bool copy) = 0;
339 virtual std::shared_ptr<ByteBuffer>
getEventBuffer(
size_t eventNumber) = 0;
355 virtual std::shared_ptr<ByteBuffer>
getEventBuffer(
size_t eventNumber,
bool copy) = 0;
367 virtual std::shared_ptr<ByteBuffer>
getStructureBuffer(std::shared_ptr<EvioNode> & node) = 0;
382 virtual std::shared_ptr<ByteBuffer>
getStructureBuffer(std::shared_ptr<EvioNode> & node,
bool copy) = 0;
385 virtual void close() = 0;
413 virtual void toFile(std::string
const & fileName) = 0;
419 #endif //EVIO_6_0_IEVIOCOMPACTREADER_H
This class is copied from one of the same name in the Java programming language.
Definition: ByteBuffer.h:42
virtual std::shared_ptr< IBlockHeader > getFirstBlockHeader()=0
This returns the FIRST block (or record) header.
virtual std::shared_ptr< EvioXMLDictionary > getDictionary()=0
Get the evio dictionary if is there is one.
virtual std::shared_ptr< ByteBuffer > addStructure(size_t eventNumber, ByteBuffer &addBuffer)=0
This method adds an evio container (bank, segment, or tag segment) as the last structure contained in...
virtual std::shared_ptr< EvioNode > getEvent(size_t eventNumber)=0
Get the EvioNode object associated with a particular event number.
virtual std::shared_ptr< ByteBuffer > getData(std::shared_ptr< EvioNode > &node)=0
Get the data associated with an evio structure in ByteBuffer form.
virtual ByteOrder getByteOrder()=0
Get the byte order of the file/buffer being read.
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
virtual uint32_t getEventCount()=0
This is the number of events in the file/buffer.
virtual void toFile(std::string const &fileName)=0
Save the internal byte buffer to the given file (overwrites existing file).
virtual bool isCompressed()=0
Is the data in the file/buffer compressed?
virtual size_t fileSize()=0
Get the size of the file being read, in bytes.
virtual ByteOrder getFileByteOrder()=0
When reading a file, this method's return value is the byte order of the evio data in the file...
virtual std::shared_ptr< EvioNode > getScannedEvent(size_t eventNumber)=0
Get the EvioNode object associated with a particular event number which has been scanned so all subst...
virtual std::string getDictionaryXML()=0
Get the XML format dictionary is there is one.
virtual std::shared_ptr< ByteBuffer > getStructureBuffer(std::shared_ptr< EvioNode > &node)=0
Get an evio structure (bank, seg, or tagseg) in ByteBuffer form.
virtual std::shared_ptr< ByteBuffer > getByteBuffer()=0
Get the byte buffer being read directly or corresponding to the event file.
virtual std::shared_ptr< ByteBuffer > removeStructure(std::shared_ptr< EvioNode > &removeNode)=0
This method removes the data, represented by the given node, from the buffer.
virtual bool hasDictionary()=0
Does this evio file have an associated XML dictionary?
This is an interface for a compact reader of evio format files and buffers.
Definition: IEvioCompactReader.h:41
virtual std::string getPath()=0
Get the path to the file.
virtual std::shared_ptr< ByteBuffer > removeEvent(size_t eventNumber)=0
This method removes the data of the given event from the buffer.
virtual uint32_t getBlockCount()=0
This is the number of blocks in the file/buffer including the empty block at the end.
virtual bool isClosed()=0
Has close() been called (without reopening by calling setBuffer(std::shared_ptr<ByteBuffer> &))...
virtual std::shared_ptr< ByteBuffer > getEventBuffer(size_t eventNumber)=0
Get an evio bank or event in ByteBuffer form.
virtual void setBuffer(std::shared_ptr< ByteBuffer > &buf)=0
This method can be used to avoid creating additional EvioCompactReader objects by reusing this one wi...
virtual void searchEvent(size_t eventNumber, uint16_t tag, uint8_t num, std::vector< std::shared_ptr< EvioNode >> &vec)=0
This method searches the specified event in a file/buffer and returns a vector of objects each of whi...
virtual void close()=0
This sets the position to its initial value and marks reader as closed.
virtual bool isFile()=0
Is this reader reading a file?
virtual uint32_t getEvioVersion()=0
Get the evio version number.