CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
stor::FRDStreamHandler Class Reference

#include <FRDStreamHandler.h>

Inheritance diagram for stor::FRDStreamHandler:
stor::StreamHandler

Public Member Functions

 FRDStreamHandler (const ErrorStreamConfigurationInfo &, const SharedResourcesPtr, const DbFileHandlerPtr)
 
- Public Member Functions inherited from stor::StreamHandler
void closeAllFiles ()
 
bool closeFilesForLumiSection (const uint32_t &lumiSection, std::string &)
 
void closeTimedOutFiles (utils::TimePoint_t currentTime=utils::getCurrentTime())
 
 StreamHandler (const SharedResourcesPtr, const DbFileHandlerPtr)
 
void writeEvent (const I2OChain &event)
 
virtual ~StreamHandler ()
 

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_
 

Additional Inherited Members

- Protected Types inherited from stor::StreamHandler
typedef std::map< std::string,
unsigned int > 
CoreFileNamesMap
 
typedef boost::shared_ptr
< FileHandler
FileHandlerPtr
 
typedef std::vector
< FileHandlerPtr
FileHandlers
 
- Protected Member Functions inherited from stor::StreamHandler
virtual FileHandlerPtr getFileHandler (const I2OChain &event)
 
unsigned long long getMaxFileSize () const
 
FilesMonitorCollection::FileRecordPtr getNewFileRecord (const I2OChain &event)
 
- Protected Attributes inherited from stor::StreamHandler
const DbFileHandlerPtr dbFileHandler_
 
const DiskWritingParamsdiskWritingParams_
 
FileHandlers fileHandlers_
 
const SharedResourcesPtr sharedResources_
 
const StatisticsReporterPtr statReporter_
 
const
StreamsMonitorCollection::StreamRecordPtr 
streamRecord_
 
CoreFileNamesMap usedCoreFileNames_
 

Detailed Description

Handle one FED Raw Data (error) event stream written to disk.

Author:
mommsen
Revision:
1.7
Date:
2011/03/07 15:31:31

Definition at line 25 of file FRDStreamHandler.h.

Constructor & Destructor Documentation

stor::FRDStreamHandler::FRDStreamHandler ( const ErrorStreamConfigurationInfo streamConfig,
const SharedResourcesPtr  sharedResources,
const DbFileHandlerPtr  dbFileHandler 
)

Definition at line 13 of file FRDStreamHandler.cc.

References StorageManager_cfg::streamLabel.

17  :
18  StreamHandler(sharedResources, dbFileHandler),
19  streamConfig_(streamConfig)
20  {
21  streamRecord_->streamName = streamLabel();
22  streamRecord_->fractionToDisk = fractionToDisk();
23  }
virtual double fractionToDisk() const
ErrorStreamConfigurationInfo streamConfig_
StreamHandler(const SharedResourcesPtr, const DbFileHandlerPtr)
const StreamsMonitorCollection::StreamRecordPtr streamRecord_
virtual std::string streamLabel() const

Member Function Documentation

virtual double stor::FRDStreamHandler::fractionToDisk ( ) const
inlineprivatevirtual

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.

51  { return 1; }
virtual int stor::FRDStreamHandler::getStreamMaxFileSize ( ) const
inlineprivatevirtual

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_.

62  { return streamConfig_.maxFileSizeMB(); }
ErrorStreamConfigurationInfo streamConfig_
FRDStreamHandler::FileHandlerPtr stor::FRDStreamHandler::newFileHandler ( const I2OChain event)
privatevirtual

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(), stor::StreamHandler::getNewFileRecord(), and stor::StreamHandler::streamRecord_.

28  {
30 
32  new FRDFileHandler(fileRecord, dbFileHandler_, getMaxFileSize())
33  );
34  fileHandlers_.push_back(newFileHandler);
35 
36  streamRecord_->incrementFileCount(fileRecord->lumiSection);
37 
38  return newFileHandler;
39  }
const DbFileHandlerPtr dbFileHandler_
boost::shared_ptr< FileRecord > FileRecordPtr
unsigned long long getMaxFileSize() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
FilesMonitorCollection::FileRecordPtr getNewFileRecord(const I2OChain &event)
const StreamsMonitorCollection::StreamRecordPtr streamRecord_
FileHandlers fileHandlers_
virtual FileHandlerPtr newFileHandler(const I2OChain &event)
boost::shared_ptr< FileHandler > FileHandlerPtr
Definition: StreamHandler.h:67
virtual std::string stor::FRDStreamHandler::streamLabel ( ) const
inlineprivatevirtual

Return the stream label

Implements stor::StreamHandler.

Definition at line 42 of file FRDStreamHandler.h.

References streamConfig_, and stor::ErrorStreamConfigurationInfo::streamLabel().

43  { return streamConfig_.streamLabel(); }
ErrorStreamConfigurationInfo streamConfig_

Member Data Documentation

ErrorStreamConfigurationInfo stor::FRDStreamHandler::streamConfig_
private

Definition at line 65 of file FRDStreamHandler.h.

Referenced by getStreamMaxFileSize(), and streamLabel().