#include <LCSplitWriter.h>
Inheritance diagram for UTIL::LCSplitWriter:

Public Member Functions | |
| LCSplitWriter (IO::LCWriter *wrt, EVENT::long64 maxBytes) | |
| virtual | ~LCSplitWriter () |
| virtual void | open (const std::string &filename) throw (IO::IOException, std::exception ) |
| virtual void | open (const std::string &filename, int writeMode) throw (IO::IOException, std::exception ) |
| virtual void | writeRunHeader (const EVENT::LCRunHeader *hdr) throw (IO::IOException, std::exception ) |
| virtual void | writeEvent (const EVENT::LCEvent *evt) throw (IO::IOException, std::exception ) |
| virtual void | close () throw (IO::IOException, std::exception ) |
| virtual void | flush () throw (IO::IOException, std::exception ) |
| EVENT::long64 | fileSize () |
| LCSplitWriter (IO::LCWriter *wrt, EVENT::long64 maxBytes) | |
| virtual | ~LCSplitWriter () |
| virtual void | open (const std::string &filename) throw (IO::IOException, std::exception ) |
| virtual void | open (const std::string &filename, int writeMode) throw (IO::IOException, std::exception ) |
| virtual void | writeRunHeader (const EVENT::LCRunHeader *hdr) throw (IO::IOException, std::exception ) |
| virtual void | writeEvent (const EVENT::LCEvent *evt) throw (IO::IOException, std::exception ) |
| virtual void | close () throw (IO::IOException, std::exception ) |
| virtual void | flush () throw (IO::IOException, std::exception ) |
| EVENT::long64 | fileSize () |
Protected Member Functions | |
| LCSplitWriter () | |
| EVENT::long64 | file_size (const char *fname) |
| const std::string & | getFilename () |
| void | setBaseFilename (const std::string &filename) |
| std::string | getCountingString (unsigned count) |
| LCSplitWriter () | |
| EVENT::long64 | file_size (const char *fname) |
| const std::string & | getFilename () |
| void | setBaseFilename (const std::string &filename) |
| std::string | getCountingString (unsigned count) |
Protected Attributes | |
| IO::LCWriter * | _wrt |
| EVENT::long64 | _maxBytes |
| std::string | _baseFilename |
| std::string | _extension |
| unsigned | _count |
| IO::LCWriter * | _wrt |
Definition at line 18 of file LCSplitWriter.h.
|
||||||||||||
|
The constructor. Takes a pointer to a valid LCWriter instance and the file size in bytes that causes a new file to be opened if exceeded. example: Definition at line 30 of file LCSplitWriter.h. |
|
|
Destructor. Definition at line 41 of file LCSplitWriter.h. |
|
|
|
|
||||||||||||
|
The constructor. Takes a pointer to a valid LCWriter instance and the file size in bytes that causes a new file to be opened if exceeded. example: Definition at line 30 of file LCSplitWriter.h. |
|
|
Destructor. Definition at line 41 of file LCSplitWriter.h. |
|
|
|
|
|
Closes the output file/stream.
Implements IO::LCWriter. |
|
|
Closes the output file/stream.
Implements IO::LCWriter. Definition at line 77 of file LCSplitWriter.cc. References _wrt, and IO::LCWriter::close(). |
|
|
Helper function that returns the file size in bytes - o if the file does not exist |
|
|
Helper function that returns the file size in bytes - o if the file does not exist Definition at line 103 of file LCSplitWriter.cc. References EVENT::long64, and STAT64. Referenced by fileSize(). |
|
|
Return the current file size in bytes. |
|
|
Return the current file size in bytes. Definition at line 115 of file LCSplitWriter.cc. References file_size(), getFilename(), and EVENT::long64. |
|
|
Flushes the output file/stream.
Implements IO::LCWriter. |
|
|
Flushes the output file/stream.
Implements IO::LCWriter. Definition at line 81 of file LCSplitWriter.cc. References _wrt, and IO::LCWriter::flush(). |
|
|
Returns the string representation of the file number, e.g. "007". |
|
|
Returns the string representation of the file number, e.g. "007". Definition at line 149 of file LCSplitWriter.cc. References NDIGITS. Referenced by getFilename(). |
|
|
Get the complete filename w/o extensiomn,e.g. MyFilename.007 |
|
|
Get the complete filename w/o extensiomn,e.g. MyFilename.007 Definition at line 88 of file LCSplitWriter.cc. References _baseFilename, _count, _extension, and getCountingString(). Referenced by fileSize(). |
|
||||||||||||
|
Not implemented - will throw an Exception if called. Overwriting of or appending to split files is not straight forward. Pleas use the default write mode and remove exisiting files.
Implements IO::LCWriter. |
|
|
Opens a file for writing where the filename has to include the extension but not the number, e.g. myfile.slcio. Note that this is different from the LCWriter specification.
Implements IO::LCWriter. |
|
||||||||||||
|
Not implemented - will throw an Exception if called. Overwriting of or appending to split files is not straight forward. Pleas use the default write mode and remove exisiting files.
Implements IO::LCWriter. Definition at line 37 of file LCSplitWriter.cc. |
|
|
Opens a file for writing where the filename has to include the extension but not the number, e.g. myfile.slcio. Note that this is different from the LCWriter specification.
Implements IO::LCWriter. Definition at line 31 of file LCSplitWriter.cc. |
|
|
Helper function to determine base file name, i.e. w/o extension. |
|
|
Helper function to determine base file name, i.e. w/o extension. Definition at line 130 of file LCSplitWriter.cc. References _baseFilename, and _extension. |
|
|
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.
Implements IO::LCWriter. |
|
|
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.
Implements IO::LCWriter. Definition at line 58 of file LCSplitWriter.cc. |
|
|
Writes the given run header to file. Opens a new file if the given file size is already exceeded before the execution of the write access.
Implements IO::LCWriter. |
|
|
Writes the given run header to file. Opens a new file if the given file size is already exceeded before the execution of the write access.
Implements IO::LCWriter. Definition at line 46 of file LCSplitWriter.cc. |
|
|
Definition at line 120 of file LCSplitWriter.h. Referenced by getFilename(), and setBaseFilename(). |
|
|
Definition at line 122 of file LCSplitWriter.h. Referenced by getFilename(). |
|
|
Definition at line 121 of file LCSplitWriter.h. Referenced by getFilename(), and setBaseFilename(). |
|
|
Definition at line 119 of file LCSplitWriter.h. |
|
|
Definition at line 118 of file LCSplitWriter.h. |
|
|
Definition at line 118 of file LCSplitWriter.h. |
1.3.9.1