LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
SIOObjectHandler.h
1 #ifndef SIO_SIOOBJECTHANDLER_H
2 #define SIO_SIOOBJECTHANDLER_H 1
3 
4 #include "EVENT/LCObject.h"
5 #include "EVENT/LCCollection.h"
6 //#include "SIO_functions.h"
7 #include "SIO_block.h"
8 
9 class SIO_stream ;
10 
11 
12 namespace SIO{
13 
14 
22 
23 public:
24 
25  virtual ~SIOObjectHandler(){ /* nop */; }
26 
29  virtual unsigned int read(SIO_stream* stream,
30  EVENT::LCObject** objP) =0 ;
31 
34  virtual unsigned int write(SIO_stream* stream,
35  const EVENT::LCObject* obj ) =0 ;
36 
37 
42  virtual unsigned int init( SIO_stream* stream,
43  SIO_operation op,
45  unsigned int vers ) ;
46 
47 
49  virtual unsigned int readBase(SIO_stream* stream,
50  EVENT::LCObject** objP) ;
51 
52 
54  virtual unsigned int writeBase(SIO_stream* stream,
55  const EVENT::LCObject* obj ) ;
56 
57  protected:
58 
59 
60  unsigned int _flag ;
61  unsigned int _vers ;
62 
63 }; // class
64 
65 } // namespace
66 #endif /* ifndef hep_lcio_event_SIOOBJECTHANDLER_H */
The generic object that is held in an LCCollection.
Definition: LCObject.h:30
virtual unsigned int init(SIO_stream *stream, SIO_operation op, EVENT::LCCollection *col, unsigned int vers)
Initialize the handler and/or the collection.
Definition: SIOObjectHandler.cc:16
virtual unsigned int readBase(SIO_stream *stream, EVENT::LCObject **objP)
Calls read() if the collection is not a subset otherwise only reads the pointers. ...
Definition: SIOObjectHandler.cc:51
virtual unsigned int writeBase(SIO_stream *stream, const EVENT::LCObject *obj)
Calls write() if the collection is not a subset otherwise only writes the pointers.
Definition: SIOObjectHandler.cc:68
Interface for all lcio object SIO-handlers, has to be implemented for all event entities (hits...
Definition: SIOObjectHandler.h:21
virtual unsigned int read(SIO_stream *stream, EVENT::LCObject **objP)=0
Reads lcio objects from an SIO stream.
virtual unsigned int write(SIO_stream *stream, const EVENT::LCObject *obj)=0
Writes lcio objects to an SIO stream.
The generic collection used in LCIO.
Definition: LCCollection.h:29