11 #ifndef EVIO_6_0_EVIOREADERV6_H
12 #define EVIO_6_0_EVIOREADERV6_H
57 std::shared_ptr<Reader> reader;
63 std::shared_ptr<EventParser> parser;
66 bool synchronized =
false;
75 explicit EvioReaderV6(std::string
const & path,
bool checkRecNumSeq =
false,
bool synced =
false);
76 explicit EvioReaderV6(std::shared_ptr<ByteBuffer> & byteBuffer,
bool checkRecNumSeq =
false,
bool synced =
false);
79 void setBuffer(std::shared_ptr<ByteBuffer> & buf)
override ;
86 std::shared_ptr<EventParser> &
getParser()
override ;
87 void setParser(std::shared_ptr<EventParser> & evParser)
override ;
99 std::shared_ptr<EvioEvent>
getEvent(
size_t index)
override ;
100 std::shared_ptr<EvioEvent>
parseEvent(
size_t index)
override ;
101 std::shared_ptr<EvioEvent>
nextEvent()
override ;
103 void parseEvent(std::shared_ptr<EvioEvent> evioEvent)
override ;
105 uint32_t
getEventArray(
size_t evNumber, std::vector<uint8_t> & vec)
override;
110 void close()
override ;
122 #endif //EVIO_6_0_EVIOREADERV6_H
std::shared_ptr< EventParser > & getParser() override
Get the file/buffer parser.file/buffer parser.
Definition: EvioReaderV6.cpp:103
std::shared_ptr< EvioEvent > getFirstEvent() override
Get the "first" event if there is one.It's also called the Beginning-Of-Run event. This event is defined once but included in each of the related split files written out. the first event is it existed, else null.
Definition: EvioReaderV6.cpp:121
This class is copied from one of the same name in the Java programming language.
Definition: ByteBuffer.h:42
std::shared_ptr< IBlockHeader > getFirstBlockHeader() override
This returns the FIRST block (record) header.the first block (record) header.
Definition: EvioReaderV6.cpp:160
size_t fileSize() override
Get the size of the file being read, in bytes.the file size in bytes
Definition: EvioReaderV6.cpp:156
bool hasFirstEvent() override
Does this evio file have an associated first event? It's also called the Beginning-Of-Run event...
Definition: EvioReaderV6.cpp:144
size_t getNumEventsRemaining() override
Get the number of events remaining in the file.Useful only if doing a sequential read.number of events remaining in the file if failed reading from file
Definition: EvioReaderV6.cpp:148
uint32_t getEvioVersion() override
Get the evio version number.evio version number.
Definition: EvioReaderV6.cpp:95
std::shared_ptr< IBlockHeader > getCurrentBlockHeader() override
This returns the current (active) block (physical record) header.Since most users have no interest in...
Definition: EvioReaderV6.cpp:290
Numerical values associated with endian byte order.
Definition: ByteOrder.h:53
std::shared_ptr< ByteBuffer > getByteBuffer() override
Get the byte buffer being read.Not useful when reading files. the byte buffer being read (in certain ...
Definition: EvioReaderV6.cpp:152
This pure, virtual class is meant to encapsulate the operation of reading both 2 differently formatte...
Definition: IEvioReader.h:39
std::string getPath() override
Get the path to the file.path to the file
Definition: EvioReaderV6.cpp:99
std::string getDictionaryXML() override
Get the XML format dictionary if there is one.XML format dictionary, else null.
Definition: EvioReaderV6.cpp:115
EvioReaderV6(std::string const &path, bool checkRecNumSeq=false, bool synced=false)
Constructor for reading an event file.
Definition: EvioReaderV6.cpp:32
bool checkBlockNumberSequence() override
Is this reader checking the block number sequence and throwing an exception if it's not sequential an...
Definition: EvioReaderV6.cpp:87
This class is used to read an evio version 6 format file or buffer.
Definition: EvioReaderV6.h:52
void setParser(std::shared_ptr< EventParser > &evParser) override
Set the file/buffer parser.file/buffer parser.
Definition: EvioReaderV6.cpp:107
ByteOrder & getByteOrder() override
Get the byte order of the file/buffer being read.byte order of the file/buffer being read...
Definition: EvioReaderV6.cpp:91
size_t getEventCount() override
This is the number of events in the file/buffer.Any dictionary or first event are not included in the...
Definition: EvioReaderV6.cpp:322
std::shared_ptr< EvioEvent > nextEvent() override
Get the next event in the file/buffer.As useful as this sounds, most applications will probably call ...
Definition: EvioReaderV6.cpp:187
bool isClosed() override
Has close() been called (without reopening by calling setBuffer(std::shared_ptr<ByteBuffer> &))...
Definition: EvioReaderV6.cpp:83
std::shared_ptr< EvioEvent > parseEvent(size_t index) override
This is a workhorse method.It retrieves the desired event from the file/buffer, and then parses it SA...
Definition: EvioReaderV6.cpp:176
void close() override
This is closes the file, but for buffers it only sets the position to 0.
Definition: EvioReaderV6.cpp:275
size_t getBlockCount() override
This is the number of blocks/records in the file/buffer including the empty block, record or trailer at the end.if object closed. the number of records in the file/buffer (estimate for version 3 files).
Definition: EvioReaderV6.cpp:335
uint32_t getEventBuffer(size_t evNumber, ByteBuffer &buf) override
Get an evio bank or event in ByteBuffer form.number of event of interest buffer to contain bank's/eve...
Definition: EvioReaderV6.cpp:244
uint32_t getEventArray(size_t evNumber, std::vector< uint8_t > &vec) override
Get an evio bank or event in vector-of-bytes form.number of event of interest (starting at 1)...
Definition: EvioReaderV6.cpp:224
bool hasDictionaryXML() override
Does this evio file have an associated XML dictionary?true if this evio file has an associated XML di...
Definition: EvioReaderV6.cpp:118
std::shared_ptr< EvioEvent > gotoEventNumber(size_t evNumber) override
In this version, this method is a wrapper on parseEvent(size_t).
Definition: EvioReaderV6.cpp:303
void setBuffer(std::shared_ptr< ByteBuffer > &buf) override
This method can be used to avoid creating additional EvioReader objects by reusing this one with anot...
Definition: EvioReaderV6.cpp:68
std::shared_ptr< EvioEvent > parseNextEvent() override
This is a workhorse method.It retrieves the next event from the file/buffer, and then parses it SAX-l...
Definition: EvioReaderV6.cpp:203
std::shared_ptr< EvioEvent > getEvent(size_t index) override
Get the event in the file/buffer at a given index (starting at 1).As useful as this sounds...
Definition: EvioReaderV6.cpp:164
void rewind() override
This method is not relevant in evio 6 and does nothing.
Definition: EvioReaderV6.cpp:261
ssize_t position() override
This method is not relevant in evio 6, does nothing, and returns 0.
Definition: EvioReaderV6.cpp:268