lcio/src/cpp/include/UTIL
diff -u -r1.1 -r1.2
--- LCSplitWriter.h 7 Mar 2006 09:32:29 -0000 1.1
+++ LCSplitWriter.h 9 Nov 2007 21:00:55 -0000 1.2
@@ -13,7 +13,7 @@
* Note: this is experimental beta code - please use for testing only !
*
* @author gaede
- * @version $Id: LCSplitWriter.h,v 1.1 2006/03/07 09:32:29 gaede Exp $
+ * @version $Id: LCSplitWriter.h,v 1.2 2007/11/09 21:00:55 gaede Exp $
*/
class LCSplitWriter : public IO::LCWriter {
@@ -66,6 +66,13 @@
*/
virtual void writeRunHeader(const EVENT::LCRunHeader * hdr) throw (IO::IOException, std::exception ) ;
+ /** Set CompressionLevel.
+ * @see LCWriter::setCompressionLevel()
+ */
+ virtual void setCompressionLevel(int level) {
+ _wrt->setCompressionLevel(level) ;
+ }
+
/** Writes the given file to file. Opens a new file if the given file size is already exceeded
* before the execution of the write access.
lcio/src/cpp/src/EXAMPLE
diff -u -r1.56 -r1.57
--- simjob.cc 9 Nov 2007 20:21:09 -0000 1.56
+++ simjob.cc 9 Nov 2007 21:00:55 -0000 1.57
@@ -24,9 +24,11 @@
#include "UTIL/CellIDEncoder.h"
#include "UTIL/LCTypedVector.h"
+#include "UTIL/LCSplitWriter.h"
// #include "UTIL/LCIOTypeInfo.h"
+
#include <cstdlib>
#include <iostream>
#include <sstream>
@@ -57,7 +59,7 @@
for(int rn=0;rn<NRUN;rn++){
// create sio writer
- LCWriter* lcWrt = LCFactory::getInstance()->createLCWriter() ;
+ LCWriter* lcWrt = new LCSplitWriter( LCFactory::getInstance()->createLCWriter() , 20000 ) ;
if( argc > 1 ) { FILEN = argv[1] ; }