Interface for reading data from LCIO. More...
#include <pre-generated/IO/LCReader.h>
Public Member Functions | |
virtual | ~LCReader () |
Destructor. | |
virtual void | open (const std::string &filename)=0 throw (IOException, std::exception ) |
Opens a file for reading (read-only). More... | |
virtual void | open (const std::vector< std::string > &filenames)=0 throw (IOException, std::exception ) |
Opens a list of files for reading (read-only). More... | |
virtual EVENT::LCRunHeader * | readNextRunHeader ()=0 throw (IOException, std::exception ) |
Reads the next run header from the file. More... | |
virtual EVENT::LCRunHeader * | readNextRunHeader (int accessMode)=0 throw (IOException, std::exception ) |
Same as readNextRunHeader() but allows to set the access mode LCIO::READ_ONLY (default) or LCIO::Update. More... | |
virtual EVENT::LCEvent * | readNextEvent ()=0 throw (IOException, std::exception ) |
Reads the next event from the file. More... | |
virtual EVENT::LCEvent * | readNextEvent (int accessMode)=0 throw (IOException, std::exception ) |
Same as readNextEvent() but allows to set the access mode LCIO::READ_ONLY (default) or LCIO::Update. More... | |
virtual int | getNumberOfEvents ()=0 throw (IOException, std::exception ) |
Return the number of events in the file - the file has to be open. More... | |
virtual int | getNumberOfRuns ()=0 throw (IOException, std::exception ) |
Return the number of runs (run headers) in the file - the file has to be open. More... | |
virtual void | getRuns (EVENT::IntVec &runs)=0 |
Return the run numbers of the runs (run headers) in the file - the file has to be open. More... | |
virtual void | getEvents (EVENT::IntVec &events)=0 |
Return the run and event numbers of the events in the file - the file has to be open. More... | |
virtual void | setReadCollectionNames (const std::vector< std::string > &colnames)=0 |
Limit the collection names that are going to be read to the subset given in the vector - all other collection will be ignored. More... | |
virtual void | skipNEvents (int n)=0 throw (IOException, std::exception ) |
Skips the next n events from the current position. More... | |
virtual EVENT::LCRunHeader * | readRunHeader (int runNumber)=0 throw (IOException, std::exception ) |
Reads the specified runHeader from file. More... | |
virtual EVENT::LCRunHeader * | readRunHeader (int runNumber, int accessMode)=0 throw (IOException, std::exception ) |
Same as LCEvent* readRunHeader(int runNumber) allowing to set the access mode LCIO::READ_ONLY (default) or LCIO::Update. More... | |
virtual EVENT::LCEvent * | readEvent (int runNumber, int evtNumber)=0 throw (IOException, std::exception ) |
Reads the specified event from file. More... | |
virtual EVENT::LCEvent * | readEvent (int runNumber, int evtNumber, int accessMode)=0 throw (IOException, std::exception ) |
Same as LCEvent* readEvent(int runNumber, int evtNumber) allowing to set the access mode LCIO::READ_ONLY (default) or LCIO::Update. More... | |
virtual void | close ()=0 throw (IOException, std::exception ) |
Closes the output file/stream etc. More... | |
virtual void | registerLCEventListener (LCEventListener *ls)=0 |
Registers a listener for reading LCEvents from a stream. | |
virtual void | removeLCEventListener (LCEventListener *ls)=0 |
Remove a listener for reading LCEvents from a stream. | |
virtual void | registerLCRunListener (LCRunListener *ls)=0 |
Registers a listener for reading LCEventsLCRunHeaders from a stream. | |
virtual void | removeLCRunListener (LCRunListener *ls)=0 |
Remove a listener for reading LCRunHeaders from a stream. | |
virtual void | readStream ()=0 throw (IOException, std::exception ) |
Reads the input stream and notifies registered listeners according to the object type found in the stream. More... | |
virtual void | readStream (int maxRecord)=0 throw (IOException, std::exception ) |
Reads maxRecord from the input stream and notifies registered listeners according to the object type found in the stream. More... | |
Static Public Attributes | |
static const int | directAccess = 0x00000001 << 0 |
Configuration flags for the LCReader instance - to be used with LCFactory::createLCReader(). More... | |
Interface for reading data from LCIO.
Use LCFactory to instantiate a corresponding LCWriter object for the output format at hand (SIO only, so far).
|
pure virtual |
|
pure virtual |
Return the run and event numbers of the events in the file - the file has to be open.
In case several input files are specified in the open() method - the run and event numbers of the events in the file that is currently open are returned. The size of the vector events will be twice the number of events, where i-th run number will be in events[2*i] and the i-th event number in events[2*i+].
Implemented in SIO::SIOReader.
|
pure virtual |
Return the number of events in the file - the file has to be open.
In case several input files are specified in the open() method - the number of events in the file that is currently open is returned.
Implemented in SIO::SIOReader.
|
pure virtual |
Return the number of runs (run headers) in the file - the file has to be open.
In case several input files are specified in the open() method - the number of runs (run headers) in the file that is currently open is returned.
Implemented in SIO::SIOReader.
|
pure virtual |
Return the run numbers of the runs (run headers) in the file - the file has to be open.
In case several input files are specified in the open() method - the run numbers of the runs (run headers) in the file that is currently open is returned.
Implemented in SIO::SIOReader.
|
pure virtual |
|
pure virtual |
Opens a list of files for reading (read-only).
All subsequent read operations will operate on the list, i.e. if an EOF is encountered the next file in the list will be opened and read transparently to the user.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Reads the specified event from file.
Returns NULL if the specified event hasn't been found in the file.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Same as LCEvent* readEvent(int runNumber, int evtNumber) allowing to set the access mode LCIO::READ_ONLY (default) or LCIO::Update.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Reads the next event from the file.
Returns NULL if 'EOF' read.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Same as readNextEvent() but allows to set the access mode LCIO::READ_ONLY (default) or LCIO::Update.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Reads the next run header from the file.
Returns NULL if 'EOF' read.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Same as readNextRunHeader() but allows to set the access mode LCIO::READ_ONLY (default) or LCIO::Update.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Reads the specified runHeader from file.
Returns NULL if the specified runHeader hasn't been found in the file.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Same as LCEvent* readRunHeader(int runNumber) allowing to set the access mode LCIO::READ_ONLY (default) or LCIO::Update.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Reads the input stream and notifies registered listeners according to the object type found in the stream.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Reads maxRecord from the input stream and notifies registered listeners according to the object type found in the stream.
An exception is thrown if less than maxRecord where read from the file.
IOException |
Implemented in SIO::SIOReader.
|
pure virtual |
Limit the collection names that are going to be read to the subset given in the vector - all other collection will be ignored.
This might improve the reading performance considerably in cases where only a small subset of the collections in the event is needed.
Implemented in SIO::SIOReader.
|
pure virtual |
Skips the next n events from the current position.
IOException |
Implemented in SIO::SIOReader.
|
static |
Configuration flags for the LCReader instance - to be used with LCFactory::createLCReader().