1 #ifndef UTIL_LCSplitWriter_H
2 #define UTIL_LCSplitWriter_H 1
92 virtual void close() ;
99 virtual void flush() ;
std::string _baseFilename
virtual void setCompressionLevel(int level)=0
Set the compression level - needs to be called before open() otherwise call will have no effect...
EVENT::long64 fileSize()
Return the current file size in bytes.
virtual void writeEvent(const EVENT::LCEvent *evt)
Writes the given file to file.
virtual void flush()
Flushes the output file/stream.
const std::string & getFilename()
Get the complete filename w/o extensiomn,e.g.
virtual void setCompressionLevel(int level)
Set CompressionLevel.
long long long64
64 bit signed integer,e.g.to be used for timestamps
LCWriter wrapper that automatically splits files if a given number of bytes is exceeded.
LCSplitWriter(IO::LCWriter *wrt, EVENT::long64 maxBytes)
The constructor.
virtual ~LCSplitWriter()
Destructor.
std::string getCountingString(unsigned count)
Returns the string representation of the file number, e.g.
EVENT::long64 file_size(const char *fname)
Helper function that returns the file size in bytes - o if the file does not exist.
LCSplitWriter & operator=(const LCSplitWriter &)=delete
no assignment operator
virtual void writeRunHeader(const EVENT::LCRunHeader *hdr)
Writes the given run header to file.
void setBaseFilename(const std::string &filename)
Helper function to determine base file name, i.e.
The main event interface.
pair< int, string > level
Interface for writing data with LCIO.
virtual void close()
Closes the output file/stream.
virtual void open(const std::string &filename)
Opens a file for writing where the filename has to include the extension but not the number...