1 #ifndef SIO_SIOREADER_H
2 #define SIO_SIOREADER_H 1
7 #include "IO/LCReader.h"
8 #include "IO/LCEventListener.h"
9 #include "IO/LCRunListener.h"
11 #include "IOIMPL/LCEventIOImpl.h"
12 #include "IOIMPL/LCRunHeaderIOImpl.h"
14 #include "LCIORandomAccessMgr.h"
15 #include "LCIOTypes.h"
16 #include "EVENT/LCIO.h"
25 class SIORunHeaderHandler ;
26 class SIOEventHandler ;
54 virtual void open(
const std::vector<std::string>& filenames)
215 void setUpHandlers() ;
219 void postProcessEvent() ;
223 void recreateEventMap() ;
231 SIO_record *_dummyRecord ;
232 SIO_stream *_stream ;
243 std::set<IO::LCRunListener*> _runListeners ;
244 std::set<IO::LCEventListener*> _evtListeners ;
246 std::vector<std::string> _myFilenames ;
247 unsigned int _currentFileIndex ;
Manager class for LCIO direct access.
Definition: LCIORandomAccessMgr.h:38
virtual int getNumberOfRuns()
Return the number of runs (run headers) in the file - the file has to be open.
Definition: SIOReader.cc:189
virtual void getEvents(EVENT::IntVec &events)
Return the run and event numbers of the events in the file - the file has to be open.
Definition: SIOReader.cc:226
virtual void readStream()
Reads the input stream and notifies registered listeners according to the object type found in the st...
Definition: SIOReader.cc:657
virtual void registerLCEventListener(IO::LCEventListener *ls)
Registers a listener for reading LCEvents from a stream.
Definition: SIOReader.cc:642
virtual EVENT::LCEvent * readNextEvent()
Reads the next event from the file.
Definition: SIOReader.cc:379
virtual void removeLCRunListener(IO::LCRunListener *ls)
Remove a listener for reading LCRunHeaders from a stream.
Definition: SIOReader.cc:653
SIOReader(int lcReaderFlag=0)
Default constructor.
Definition: SIOReader.cc:48
virtual void close()
Closes the output file/stream etc.
Definition: SIOReader.cc:626
Listener for the occurence of LCEvents when reading a stream.
Definition: LCEventListener.h:24
virtual void open(const std::vector< std::string > &filenames)
Opens a list of files for reading (read-only).
Definition: SIOReader.cc:104
virtual void setReadCollectionNames(const std::vector< std::string > &colnames)
Limit the collection names that are going to be read to the subset given in the vector - all other co...
Definition: SIOReader.cc:98
virtual EVENT::LCRunHeader * readRunHeader(int runNumber)
Reads the specified runHeader from file.
Definition: SIOReader.cc:477
Handler for LCEvent/LCEventIOImpl objects.
Definition: SIOEventHandler.h:19
virtual EVENT::LCRunHeader * readNextRunHeader()
Reads the next run header from the file.
Definition: SIOReader.cc:303
virtual int getNumberOfEvents()
Return the number of events in the file - the file has to be open.
Definition: SIOReader.cc:175
Listener for the occurence of LCRunHeader when reading a stream.
Definition: LCRunListener.h:24
IOException used for reading/writing errors.
Definition: Exceptions.h:92
Interface for reading data from LCIO.
Definition: LCReader.h:32
Adding stuff needed for io (friend declarations, etc.)
Definition: LCEventIOImpl.h:22
virtual void getRuns(EVENT::IntVec &runs)
Return the run numbers of the runs (run headers) in the file - the file has to be open...
Definition: SIOReader.cc:203
Handler for LCRunHeader/LCRunHeaderImpl objects.
Definition: SIORunHeaderHandler.h:20
The main event interface.
Definition: LCEvent.h:30
Concrete implementation of LCWriter using SIO.
Definition: SIOReader.h:33
std::vector< int > IntVec
Vector of ints.
Definition: LCIOSTLTypes.h:22
virtual void registerLCRunListener(IO::LCRunListener *ls)
Registers a listener for reading LCEventsLCRunHeaders from a stream.
Definition: SIOReader.cc:649
EndOfDataException for signaling the end of a data stream.
Definition: Exceptions.h:108
virtual EVENT::LCEvent * readEvent(int runNumber, int evtNumber)
Reads the specified event from file.
Definition: SIOReader.cc:522
virtual void removeLCEventListener(IO::LCEventListener *ls)
Remove a listener for reading LCEvents from a stream.
Definition: SIOReader.cc:645
virtual void skipNEvents(int n)
Skips the next n events from the current position.
Definition: SIOReader.cc:440