Implementation of ByteStreamDataWriter for version 5 (run1) of EventStorage.  
 More...
#include <ByteStreamDataWriterV5.h>
 | 
|   | ByteStreamDataWriterV5 (const std::string &writingPath, const std::string &fileNameCore, const EventStorage::run_parameters_record &rPar, const std::vector< std::string > &fmdStrings, unsigned int maxFileNE, unsigned int maxFileMB, unsigned int startIndex, EventStorage::CompressionType compression, unsigned int compLevel) | 
|   | 
|   | ByteStreamDataWriterV5 (const std::string &writingPath, boost::shared_ptr< EventStorage::FileNameCallback > theFNCB, const EventStorage::run_parameters_record &rPar, const std::string &project, const std::string &streamType, const std::string &streamName, const std::string &stream, unsigned int lumiBlockNumber, const std::string &applicationName, const std::vector< std::string > &fmdStrings, unsigned int maxFileNE, unsigned int maxFileMB, EventStorage::CompressionType compression, unsigned int compLevel) | 
|   | 
| virtual  | ~ByteStreamDataWriterV5 () | 
|   | 
|   | ByteStreamDataWriterV5 (const ByteStreamDataWriterV5 &)=delete | 
|   | 
| ByteStreamDataWriterV5 &  | operator= (const ByteStreamDataWriterV5 &)=delete | 
|   | 
| virtual EventStorage::DWError  | putData (unsigned int dataSize, const void *data) override | 
|   | Write a single block of data.  More...
  | 
|   | 
| virtual bool  | good () const override | 
|   | Feedback to user, check if open and last write went OK.  More...
  | 
|   | 
 | 
| static std::unique_ptr< ByteStreamDataWriter >  | makeWriter (int version, const std::string &writingPath, const std::string &fileNameCore, const EventStorage::run_parameters_record &rPar, const std::vector< std::string > &fmdStrings, unsigned int maxFileNE=0, unsigned int maxFileMB=0, unsigned int startIndex=1, EventStorage::CompressionType compression=EventStorage::NONE, unsigned int compLevel=1) | 
|   | Factory method returning data writer instance for specified version.  More...
  | 
|   | 
| static std::unique_ptr< ByteStreamDataWriter >  | makeWriter (int version, const std::string &writingPath, boost::shared_ptr< EventStorage::FileNameCallback > theFNCB, const EventStorage::run_parameters_record &rPar, const std::string &project, const std::string &streamType, const std::string &streamName, const std::string &stream, unsigned int lumiBlockNumber, const std::string &applicationName, const std::vector< std::string > &fmdStrings, unsigned int maxFileNE=0, unsigned int maxFileMB=0, EventStorage::CompressionType compression=EventStorage::NONE, unsigned int compLevel=1) | 
|   | Factory method returning data writer instance for specified version.  More...
  | 
|   | 
| static std::unique_ptr< ByteStreamDataWriter >  | makeWriter (const DataWriterParameters ¶meters) | 
|   | Factory method returning data writer instance for specified version.  More...
  | 
|   | 
◆ ByteStreamDataWriterV5() [1/3]
      
        
          | ByteStreamDataWriterV5::ByteStreamDataWriterV5  | 
          ( | 
          const std::string &  | 
          writingPath,  | 
        
        
           | 
           | 
          const std::string &  | 
          fileNameCore,  | 
        
        
           | 
           | 
          const EventStorage::run_parameters_record &  | 
          rPar,  | 
        
        
           | 
           | 
          const std::vector< std::string > &  | 
          fmdStrings,  | 
        
        
           | 
           | 
          unsigned int  | 
          maxFileNE,  | 
        
        
           | 
           | 
          unsigned int  | 
          maxFileMB,  | 
        
        
           | 
           | 
          unsigned int  | 
          startIndex,  | 
        
        
           | 
           | 
          EventStorage::CompressionType  | 
          compression,  | 
        
        
           | 
           | 
          unsigned int  | 
          compLevel  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ ByteStreamDataWriterV5() [2/3]
      
        
          | ByteStreamDataWriterV5::ByteStreamDataWriterV5  | 
          ( | 
          const std::string &  | 
          writingPath,  | 
        
        
           | 
           | 
          boost::shared_ptr< EventStorage::FileNameCallback >  | 
          theFNCB,  | 
        
        
           | 
           | 
          const EventStorage::run_parameters_record &  | 
          rPar,  | 
        
        
           | 
           | 
          const std::string &  | 
          project,  | 
        
        
           | 
           | 
          const std::string &  | 
          streamType,  | 
        
        
           | 
           | 
          const std::string &  | 
          streamName,  | 
        
        
           | 
           | 
          const std::string &  | 
          stream,  | 
        
        
           | 
           | 
          unsigned int  | 
          lumiBlockNumber,  | 
        
        
           | 
           | 
          const std::string &  | 
          applicationName,  | 
        
        
           | 
           | 
          const std::vector< std::string > &  | 
          fmdStrings,  | 
        
        
           | 
           | 
          unsigned int  | 
          maxFileNE,  | 
        
        
           | 
           | 
          unsigned int  | 
          maxFileMB,  | 
        
        
           | 
           | 
          EventStorage::CompressionType  | 
          compression,  | 
        
        
           | 
           | 
          unsigned int  | 
          compLevel  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ ~ByteStreamDataWriterV5()
  
  
      
        
          | ByteStreamDataWriterV5::~ByteStreamDataWriterV5  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
◆ ByteStreamDataWriterV5() [3/3]
◆ good()
  
  
      
        
          | bool ByteStreamDataWriterV5::good  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
overridevirtual   | 
  
 
 
◆ makeWriter() [1/3]
Factory method returning data writer instance for specified version. 
Throws exception in case of problems, never returns zero pointer.
- Parameters
 - 
  
    | parameters | set of parameters needed to initiate DataWriter | 
  
   
- Exceptions
 - 
  
    | std::exception | (or sub-class) is thrown in case of problems.  | 
  
   
Definition at line 170 of file ByteStreamDataWriter.cxx.
 
 
◆ makeWriter() [2/3]
  
  
      
        
          | std::unique_ptr< ByteStreamDataWriter > ByteStreamDataWriter::makeWriter  | 
          ( | 
          int  | 
          version,  | 
         
        
           | 
           | 
          const std::string &  | 
          writingPath,  | 
         
        
           | 
           | 
          boost::shared_ptr< EventStorage::FileNameCallback >  | 
          theFNCB,  | 
         
        
           | 
           | 
          const EventStorage::run_parameters_record &  | 
          rPar,  | 
         
        
           | 
           | 
          const std::string &  | 
          project,  | 
         
        
           | 
           | 
          const std::string &  | 
          streamType,  | 
         
        
           | 
           | 
          const std::string &  | 
          streamName,  | 
         
        
           | 
           | 
          const std::string &  | 
          stream,  | 
         
        
           | 
           | 
          unsigned int  | 
          lumiBlockNumber,  | 
         
        
           | 
           | 
          const std::string &  | 
          applicationName,  | 
         
        
           | 
           | 
          const std::vector< std::string > &  | 
          fmdStrings,  | 
         
        
           | 
           | 
          unsigned int  | 
          maxFileNE = 0,  | 
         
        
           | 
           | 
          unsigned int  | 
          maxFileMB = 0,  | 
         
        
           | 
           | 
          EventStorage::CompressionType  | 
          compression = EventStorage::NONE,  | 
         
        
           | 
           | 
          unsigned int  | 
          compLevel = 1  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticinherited   | 
  
 
Factory method returning data writer instance for specified version. 
Throws exception in case of problems, never returns zero pointer.
- Parameters
 - 
  
    | version | writer version to instantiate, 0 for most current version, other supported values: 5 for run1-compatible output. Exception is thrown is version is not supported.  | 
    | writingPath | directory where to write data  | 
    | theFNCB | callback method for generating file names  | 
    | rPar | other parameters from IS including the run number  | 
    | fmdStrings | optional vector of strings containing metadata  | 
    | maxFileNE | max size of a file in number of data blocks (or events)  | 
    | maxFileMB | max size of a file in MB. The file is closed before this limit is overrun.  | 
    | startIndex | initial file sequence index  | 
    | compression | Compression type  | 
    | compLevel | Compression level | 
  
   
- Exceptions
 - 
  
    | std::exception | (or sub-class) is thrown in case of problems.  | 
  
   
Definition at line 112 of file ByteStreamDataWriter.cxx.
  131         res = 
new ByteStreamDataWriterCurrent(writingPath,
 
  166     return std::unique_ptr<ByteStreamDataWriter>(
res);
 
 
 
 
◆ makeWriter() [3/3]
  
  
      
        
          | std::unique_ptr< ByteStreamDataWriter > ByteStreamDataWriter::makeWriter  | 
          ( | 
          int  | 
          version,  | 
         
        
           | 
           | 
          const std::string &  | 
          writingPath,  | 
         
        
           | 
           | 
          const std::string &  | 
          fileNameCore,  | 
         
        
           | 
           | 
          const EventStorage::run_parameters_record &  | 
          rPar,  | 
         
        
           | 
           | 
          const std::vector< std::string > &  | 
          fmdStrings,  | 
         
        
           | 
           | 
          unsigned int  | 
          maxFileNE = 0,  | 
         
        
           | 
           | 
          unsigned int  | 
          maxFileMB = 0,  | 
         
        
           | 
           | 
          unsigned int  | 
          startIndex = 1,  | 
         
        
           | 
           | 
          EventStorage::CompressionType  | 
          compression = EventStorage::NONE,  | 
         
        
           | 
           | 
          unsigned int  | 
          compLevel = 1  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticinherited   | 
  
 
Factory method returning data writer instance for specified version. 
Throws exception in case of problems, never returns zero pointer.
- Parameters
 - 
  
    | version | writer version to instantiate, 0 for most current version, other supported values: 5 for run1-compatible output. Exception is thrown if version is not supported.  | 
    | writingPath | directory where to write data  | 
    | fileNameCore | file name not including the ending "._NNNN.data"  | 
    | rPar | other parameters from IS including the run number  | 
    | fmdStrings | optional vector of strings containing metadata  | 
    | maxFileNE | max size of a file in number of data blocks (or events)  | 
    | maxFileMB | max size of a file in MB. The file is closed before this limit is overrun.  | 
    | startIndex | initial file sequence index  | 
    | compression | Compression type  | 
    | compLevel | Compression level | 
  
   
- Exceptions
 - 
  
    | std::exception | (or sub-class) is thrown in case of problems.  | 
  
   
Definition at line 69 of file ByteStreamDataWriter.cxx.
   83         res = 
new ByteStreamDataWriterCurrent(writingPath,
 
  108     return std::unique_ptr<ByteStreamDataWriter>(
res);
 
 
 
 
◆ operator=()
◆ putData()
  
  
      
        
          | EventStorage::DWError ByteStreamDataWriterV5::putData  | 
          ( | 
          unsigned int  | 
          dataSize,  | 
         
        
           | 
           | 
          const void *  | 
          data  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
overridevirtual   | 
  
 
Write a single block of data. 
If one of the size limits would be exceeded, the current file will be closed and another one will be opened automatically.
- Parameters
 - 
  
    | dataSize | size of the data block in bytes  | 
    | data | start of the event data in memory  | 
  
   
Implements ByteStreamDataWriter.
Definition at line 105 of file ByteStreamDataWriterV5.cxx.
 
 
◆ m_writer
The documentation for this class was generated from the following files:
 
static std::unique_ptr< ByteStreamDataWriter > makeWriter(int version, const std::string &writingPath, const std::string &fileNameCore, const EventStorage::run_parameters_record &rPar, const std::vector< std::string > &fmdStrings, unsigned int maxFileNE=0, unsigned int maxFileMB=0, unsigned int startIndex=1, EventStorage::CompressionType compression=EventStorage::NONE, unsigned int compLevel=1)
Factory method returning data writer instance for specified version.