LCCD  1.3.1
VCollectionStreamer.hh
1 #ifndef VCollectionStreamer_h
2 #define VCollectionStreamer_h
3 
4 #include "lccd.h"
5 
6 // -- lcio headers
7 #include "lcio.h"
8 #include "EVENT/LCCollection.h"
9 
10 // -- CondDB headers
11 #include "ConditionsDB/ICondDBStreamable.h"
12 
13 #include <iostream>
14 
15 namespace lccd {
16 
17 
24  class VCollectionStreamer : public ICondDBStreamable {
25 
26  public:
27 
28  VCollectionStreamer() : _col(0) {}
29 
30  virtual ~VCollectionStreamer() {} ;
31 
32 
35  virtual void setCollection( lcio::LCCollection* col) { _col = col ; } ;
36 
40  virtual lcio::LCCollection* getCollection() { return _col ; }
41 
45  virtual VCollectionStreamer* create()=0 ;
46 
47 
48  protected:
49 
52  virtual void writeParameters( std::string& s ) const ;
53 
56  virtual unsigned readParameters( const std::string& s , unsigned index ) ;
57 
58  lcio::LCCollection* _col ;
59  };
60 
61 } //end namespace
62 
63 #endif // VCollectionStreamer_h
virtual void writeParameters(std::string &s) const
Write the collection's parameters to the string/stream.
Definition: VCollectionStreamer.cc:15
virtual unsigned readParameters(const std::string &s, unsigned index)
Read the collection's parameters from the stream.
Definition: VCollectionStreamer.cc:85
virtual lcio::LCCollection * getCollection()
Get the collection retrieved from the database.
Definition: VCollectionStreamer.hh:40
virtual void setCollection(lcio::LCCollection *col)
Set the collection that will be stored in the database.
Definition: VCollectionStreamer.hh:35
virtual VCollectionStreamer * create()=0
Covariant factory method.
Base class for LCCollection streamer classes.
Definition: VCollectionStreamer.hh:24