CMS 3D CMS Logo

edm::FRDOutputService Class Reference

#include <EventFilter/StorageManager/interface/FRDOutputService.h>

Inheritance diagram for edm::FRDOutputService:

edm::OutputService

List of all members.

Public Member Functions

 FRDOutputService (boost::shared_ptr< FileRecord >)
void report (std::ostream &os, int indentation) const
void writeEvent (const uint8 *const)
 ~FRDOutputService ()

Private Member Functions

void closeFile ()

Private Attributes

boost::shared_ptr
< FRDEventFileWriter
writer_


Detailed Description

Definition at line 11 of file FRDOutputService.h.


Constructor & Destructor Documentation

FRDOutputService::FRDOutputService ( boost::shared_ptr< FileRecord file  ) 

Definition at line 16 of file FRDOutputService.cc.

References edm::OutputService::file_, aod_PYTHIA_cfg::fileName, edm::OutputService::getTimeStamp(), and writer_.

00017 {
00018   file_ = file;
00019 
00020   string fileName = file_ -> filePath() + file_ -> fileName() + file_ -> fileCounterStr() + ".dat";
00021 
00022   writer_ = shared_ptr<FRDEventFileWriter> (new FRDEventFileWriter(fileName));
00023 
00024   file_ -> firstEntry(getTimeStamp());
00025   file_ -> insertFileInDatabase();
00026 }

FRDOutputService::~FRDOutputService (  ) 

Definition at line 32 of file FRDOutputService.cc.

References closeFile().

00033 {
00034   //std::cout << "FRDOutputService Destructor called." << std::endl;
00035   closeFile();
00036 }


Member Function Documentation

void FRDOutputService::closeFile (  )  [private]

Definition at line 62 of file FRDOutputService.cc.

References edm::OutputService::file_, and writer_.

Referenced by ~FRDOutputService().

00063 {
00064   writer_ -> stop();
00065   file_   -> moveErrorFileToClosed();
00066   file_   -> writeToSummaryCatalog();
00067   file_   -> updateDatabase();
00068 }

void edm::FRDOutputService::report ( std::ostream &  os,
int  indentation 
) const [virtual]

Implements edm::OutputService.

void FRDOutputService::writeEvent ( const uint8 * const  bufPtr  )  [virtual]

Implements edm::OutputService.

Definition at line 45 of file FRDOutputService.cc.

References edm::OutputService::file_, edm::OutputService::getTimeStamp(), edm::OutputService::lastEntry(), FRDEventMsgView::size(), and writer_.

00046 {
00047   FRDEventMsgView view((void *) bufPtr);
00048   writer_ -> doOutputEvent(view);
00049   file_   -> increaseFileSize(view.size());
00050   file_   -> lastEntry(getTimeStamp());
00051   file_   -> increaseEventCount();
00052 }


Member Data Documentation

boost::shared_ptr<FRDEventFileWriter> edm::FRDOutputService::writer_ [private]

Definition at line 23 of file FRDOutputService.h.

Referenced by closeFile(), FRDOutputService(), and writeEvent().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:41:02 2009 for CMSSW by  doxygen 1.5.4