#include <FRDStreamHandler.h>
Public Member Functions | |
FRDStreamHandler (const ErrorStreamConfigurationInfo &, const SharedResourcesPtr, const DbFileHandlerPtr) | |
Private Member Functions | |
virtual double | fractionToDisk () const |
virtual int | getStreamMaxFileSize () const |
virtual FileHandlerPtr | newFileHandler (const I2OChain &event) |
virtual std::string | streamLabel () const |
Private Attributes | |
ErrorStreamConfigurationInfo | streamConfig_ |
Handle one FED Raw Data (error) event stream written to disk.
Definition at line 25 of file FRDStreamHandler.h.
stor::FRDStreamHandler::FRDStreamHandler | ( | const ErrorStreamConfigurationInfo & | streamConfig, |
const SharedResourcesPtr | sharedResources, | ||
const DbFileHandlerPtr | dbFileHandler | ||
) |
Definition at line 13 of file FRDStreamHandler.cc.
References python::StorageManager_cfg::streamLabel.
: StreamHandler(sharedResources, dbFileHandler), streamConfig_(streamConfig) { streamRecord_->streamName = streamLabel(); streamRecord_->fractionToDisk = fractionToDisk(); }
virtual double stor::FRDStreamHandler::fractionToDisk | ( | ) | const [inline, private, virtual] |
Return the fraction-to-disk parameter This value is not configurable for FRD events, i.e. all events are always written
Implements stor::StreamHandler.
Definition at line 50 of file FRDStreamHandler.h.
{ return 1; }
virtual int stor::FRDStreamHandler::getStreamMaxFileSize | ( | ) | const [inline, private, virtual] |
Return the maximum file size for the stream in MB
Implements stor::StreamHandler.
Definition at line 61 of file FRDStreamHandler.h.
References stor::ErrorStreamConfigurationInfo::maxFileSizeMB(), and streamConfig_.
{ return streamConfig_.maxFileSizeMB(); }
FRDStreamHandler::FileHandlerPtr stor::FRDStreamHandler::newFileHandler | ( | const I2OChain & | event | ) | [private, virtual] |
Return a new file handler for the provided event
Implements stor::StreamHandler.
Definition at line 27 of file FRDStreamHandler.cc.
References stor::StreamHandler::dbFileHandler_, stor::StreamHandler::fileHandlers_, stor::StreamHandler::getMaxFileSize(), and stor::StreamHandler::getNewFileRecord().
{ FilesMonitorCollection::FileRecordPtr fileRecord = getNewFileRecord(event); FileHandlerPtr newFileHandler( new FRDFileHandler(fileRecord, dbFileHandler_, getMaxFileSize()) ); fileHandlers_.push_back(newFileHandler); return newFileHandler; }
virtual std::string stor::FRDStreamHandler::streamLabel | ( | ) | const [inline, private, virtual] |
Return the stream label
Implements stor::StreamHandler.
Definition at line 42 of file FRDStreamHandler.h.
References streamConfig_, and stor::ErrorStreamConfigurationInfo::streamLabel().
{ return streamConfig_.streamLabel(); }
Definition at line 65 of file FRDStreamHandler.h.
Referenced by getStreamMaxFileSize(), and streamLabel().