| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# OutputFSRStream Class Reference

`#include <OutputFSRStream.h>`

Inheritance diagram for OutputFSRStream:

[legend]
Collaboration diagram for OutputFSRStream:

[legend]

List of all members.

## Detailed Description

Extension of OutputStream to write File Summary Records (FSR) after last event.

Author:
  Marco Cattaneo

Definition at line 17 of file OutputFSRStream.h.

## Public Member Functions
| OutputFSRStream (const std::string &name, ISvcLocator *pSvcLocator)
| Standard algorithm Constructor.
virtual | ~OutputFSRStream ()
| Standard Destructor.
virtual StatusCode | stop ()
| Over-ride stop() of base class.
virtual StatusCode | finalize ()
| Over-ride finalize() of base class.
## Private Attributes
std::vector< std::string > | m_FSRItemNames
| Mandatory items to be written as File Summary Records.
std::vector< std::string > | m_FSROptItemNames
| Optional items to be written as File Summary Records.
## Friends
class | AlgFactory< OutputFSRStream >
class | Factory< OutputFSRStream, IAlgorithm *(std::string, ISvcLocator *)>

## Constructor & Destructor Documentation

OutputFSRStream::OutputFSRStream | ( | const std::string & | name,
|  | ISvcLocator * | pSvcLocator |
| ) |  |  |

Standard algorithm Constructor.

Definition at line 19 of file OutputFSRStream.cpp.

    00020  : OutputStream(name, pSvcLocator)
    00021 {
    00022   m_FSRItemNames.clear();
    00023   m_FSROptItemNames.clear();
    00024
    00025   declareProperty( "FSRItemList",    m_FSRItemNames,    "Mandatory items to be written as FSRs" );
    00026   declareProperty( "FSROptItemList", m_FSROptItemNames, "Optional  items to be written as FSRs" );
    00027 }

OutputFSRStream::~OutputFSRStream | ( |  | ) | `[virtual]`

Standard Destructor.

Definition at line 30 of file OutputFSRStream.cpp.

    00030                                     {
    00031 }

## Member Function Documentation

StatusCode OutputFSRStream::stop | ( |  | ) | `[virtual]`

Over-ride stop() of base class.

Reimplemented from Algorithm.

Definition at line 33 of file OutputFSRStream.cpp.

    00033                                  {
    00034   MsgStream log(msgSvc(), name());
    00035   log << MSG::INFO << "Set up File Summary Record" << endmsg;
    00036
    00037   // Clear last real event from TES, and prepare it to receive FSR objects
    00038   StatusCode sc = m_pDataManager->setRoot ("/Event", new DataObject());
    00039   if( !sc.isSuccess() )  {
    00040     log << MSG::WARNING << "Error declaring event root DataObject" << endmsg;
    00041   }
    00042   return OutputStream::stop();
    00043 }

StatusCode OutputFSRStream::finalize | ( | void |  | ) | `[virtual]`

Over-ride finalize() of base class.

Reimplemented from OutputStream.

Definition at line 45 of file OutputFSRStream.cpp.

    00045                                      {
    00046
    00047   MsgStream log(msgSvc(), name());
    00048
    00049   // Clear any previously existing item list
    00050   clearSelection();
    00051
    00052   // Clear the list with optional items
    00053   clearItems(m_optItemList);
    00054   // Clear the item list
    00055   clearItems(m_itemList);
    00056
    00057   ItemNames::iterator i;
    00058   // Take the new item list from the FSRItemList properties
    00059   for(i = m_FSRItemNames.begin(); i != m_FSRItemNames.end(); i++)   {
    00060     addItem( m_itemList, *i );
    00061   }
    00062   for(i = m_FSROptItemNames.begin(); i != m_FSROptItemNames.end(); i++)   {
    00063     addItem( m_optItemList, *i );
    00064   }
    00065
    00066   // And write them out
    00067   log << MSG::INFO << "Write File Summary Record" << endmsg;
    00068   StatusCode sc = writeObjects();
    00069   if( sc.isFailure() ) {
    00070     // Log the error, but don't fail finalize!
    00071     log << MSG::ERROR << "Unable to write File Summary Record" << endmsg;
    00072   }
    00073
    00074   return OutputStream::finalize();
    00075 }

## Friends And Related Function Documentation

friend class AlgFactory< OutputFSRStream >`[friend]`

Definition at line 18 of file OutputFSRStream.h.

friend class Factory< OutputFSRStream, IAlgorithm *(std::string, ISvcLocator *)>`[friend]`

Definition at line 19 of file OutputFSRStream.h.

## Member Data Documentation

std::vector<std::string> OutputFSRStream::m_FSRItemNames`[private]`

Mandatory items to be written as File Summary Records.

Definition at line 33 of file OutputFSRStream.h.

std::vector<std::string> OutputFSRStream::m_FSROptItemNames`[private]`

Optional items to be written as File Summary Records.

Definition at line 35 of file OutputFSRStream.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiSvc/src/PersistencySvc/OutputFSRStream.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiSvc/src/PersistencySvc/OutputFSRStream.cpp