LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LCFactory.cc
Go to the documentation of this file.
1 #include "IOIMPL/LCFactory.h"
2 
3 
4 
5 #include "IO/LCWriter.h"
6 #include "IO/LCReader.h"
7 
8 #include "SIO/SIOWriter.h"
9 #include "SIO/SIOReader.h"
10 
11 
12 
13 using namespace IO ;
14 using namespace SIO ;
15 
16 namespace IOIMPL{
17 
18  LCFactory* LCFactory::_me = 0 ;
19 
20 
21  LCFactory::LCFactory() {
22  }
23 
24 
25  LCFactory* LCFactory::getInstance() {
26 
27  if( !_me ) _me = new LCFactory ;
28  return _me ;
29  }
30 
31 
32  LCFactory::~LCFactory() {
33  delete _me ;
34  }
35 
36  LCWriter * LCFactory::createLCWriter() {
37 
38  // the reason for having this class
39  // so far we just create SIO objects
40  auto* wrt = new SIOWriter ;
41  wrt->setCompressionLevel( -1 ) ; // default compression level
42  return wrt ;
43  }
44 
45  LCReader * LCFactory::createLCReader(int lcReaderFlag) {
46 
47  // so far we just create SIO objects
48  return new SIOReader( lcReaderFlag );
49  }
50 
51 
52 } // namespace
Concrete implementation of LCWriter using SIO.
Definition: SIOWriter.h:29
virtual void setCompressionLevel(int level)
Set the compression level - needs to be called before open() otherwise call will have no effect...
Definition: SIOWriter.cc:99
Interface for reading data from LCIO.
Definition: LCReader.h:32
Concrete implementation of LCWriter using SIO.
Definition: SIOReader.h:31
Interface for writing data with LCIO.
Definition: LCWriter.h:27
Factory to create LCWriter and Reader object for the known data formats, e.g.
Definition: LCFactory.h:19