Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ntupleWriterSvc Class Reference

A service that handles the ins and outs of writing to a ROOT ntuple. More...

#include <ntupleWriterSvc.h>

Inheritance diagram for ntupleWriterSvc:

Service IIncidentListener INTupleWriterSvc IInterface List of all members.

Public Methods

virtual StatusCode initialize ()
 perform initializations for this service. More...

virtual StatusCode finalize ()
virtual void handle (const Incident& inc)
 Handles incidents, implementing IIncidentListener interface. More...

virtual StatusCode queryInterface ( const IID& riid, void** ppvUnknown )
 Query interface. More...

virtual SmartDataPtr<NTuple::Tuple> getNTuple (const char *tupleName)
 Provide the named ntuple Ptr from the data store. More...

virtual StatusCode addItem (const char *tupleName, const char *item, double val)
 add a new item to an ntuple. More...

virtual StatusCode saveNTuples ()
 force writing of the ntuple to disk. More...

virtual void storeRowFlag (bool flag)
virtual bool storeRowFlag ()
int isFinite (float val)
 check for NaN and infinity. More...


Protected Methods

 ntupleWriterSvc ( const std::string& name, ISvcLocator* al )
 Standard Constructor. More...


Private Methods

void beginEvent ()
 routine to be called at the beginning of an event. More...

void endEvent ()
 routine that is called when we reach the end of an event. More...

StatusCode bookNTuple (int index, const char *title)
 create the ntuple. More...

StatusCode writeNTuple (int index)
 write an event's data into the ntuple. More...

StatusCode addValue (const char *tupleName, const char *item, double val)
 add an entry into an ntuple, where the item has already been declared. More...


Private Attributes

INTupleSvc* ntupleSvc
std::vector<std::string> m_tuple_name
 Maintain a list of each item so that this algorithm could handle multiple ntuples set non-blank to enable tuples. More...

std::vector<std::string> m_TDS_tuple_name
 of the form "/1". More...

std::vector<std::string> m_fileName
 path into the data store where the ntuple is located. More...

std::map<std::string, std::string> m_tuples
 Store ntuple Id and ntuple path in data store. More...

bool m_storeFlag

Static Private Attributes

unsigned int m_tupleCounter

Friends

class  SvcFactory< ntupleWriterSvc >

Detailed Description

A service that handles the ins and outs of writing to a ROOT ntuple.

Definition at line 21 of file ntupleWriterSvc.h.


Constructor & Destructor Documentation

ntupleWriterSvc::ntupleWriterSvc ( const std::string & name,
ISvcLocator * svc ) [protected]
 

Standard Constructor.

Definition at line 44 of file ntupleWriterSvc.cxx.


Member Function Documentation

StatusCode ntupleWriterSvc::addItem ( const char * tupleName,
const char * item,
double val ) [virtual]
 

add a new item to an ntuple.

Reimplemented from INTupleWriterSvc.

Definition at line 261 of file ntupleWriterSvc.cxx.

StatusCode ntupleWriterSvc::addValue ( const char * tupleName,
const char * item,
double val ) [private]
 

add an entry into an ntuple, where the item has already been declared.

Definition at line 237 of file ntupleWriterSvc.cxx.

Referenced by addItem().

void ntupleWriterSvc::beginEvent ( ) [private]
 

routine to be called at the beginning of an event.

Definition at line 165 of file ntupleWriterSvc.cxx.

Referenced by handle().

StatusCode ntupleWriterSvc::bookNTuple ( int index,
const char * title ) [private]
 

create the ntuple.

Definition at line 130 of file ntupleWriterSvc.cxx.

Referenced by initialize().

void ntupleWriterSvc::endEvent ( ) [private]
 

routine that is called when we reach the end of an event.

Definition at line 171 of file ntupleWriterSvc.cxx.

Referenced by handle().

StatusCode ntupleWriterSvc::finalize ( ) [virtual]
 

Reimplemented from INTupleWriterSvc.

Definition at line 213 of file ntupleWriterSvc.cxx.

SmartDataPtr< NTuple::Tuple > ntupleWriterSvc::getNTuple ( const char * tupleName ) [virtual]
 

Provide the named ntuple Ptr from the data store.

Reimplemented from INTupleWriterSvc.

Definition at line 232 of file ntupleWriterSvc.cxx.

void ntupleWriterSvc::handle ( const Incident & inc ) [virtual]
 

Handles incidents, implementing IIncidentListener interface.

Definition at line 159 of file ntupleWriterSvc.cxx.

StatusCode ntupleWriterSvc::initialize ( ) [virtual]
 

perform initializations for this service.

Reimplemented from INTupleWriterSvc.

Definition at line 56 of file ntupleWriterSvc.cxx.

int ntupleWriterSvc::isFinite ( float val )
 

check for NaN and infinity.

Definition at line 293 of file ntupleWriterSvc.cxx.

Referenced by addItem(), and addValue().

StatusCode ntupleWriterSvc::queryInterface ( const IID & riid,
void ** ppvInterface ) [virtual]
 

Query interface.

Definition at line 221 of file ntupleWriterSvc.cxx.

StatusCode ntupleWriterSvc::saveNTuples ( ) [virtual]
 

force writing of the ntuple to disk.

Reimplemented from INTupleWriterSvc.

Definition at line 199 of file ntupleWriterSvc.cxx.

Referenced by finalize().

bool ntupleWriterSvc::storeRowFlag ( ) [inline, virtual]
 

Reimplemented from INTupleWriterSvc.

Definition at line 55 of file ntupleWriterSvc.h.

Referenced by beginEvent().

void ntupleWriterSvc::storeRowFlag ( bool flag ) [inline, virtual]
 

Reimplemented from INTupleWriterSvc.

Definition at line 53 of file ntupleWriterSvc.h.

StatusCode ntupleWriterSvc::writeNTuple ( int index ) [private]
 

write an event's data into the ntuple.

Definition at line 188 of file ntupleWriterSvc.cxx.


Friends And Related Function Documentation

class SvcFactory [friend]
 

Definition at line 71 of file ntupleWriterSvc.h.


Member Data Documentation

std::vector< std::string > ntupleWriterSvc::m_TDS_tuple_name [private]
 

of the form "/1".

Definition at line 89 of file ntupleWriterSvc.h.

std::vector< std::string > ntupleWriterSvc::m_fileName [private]
 

path into the data store where the ntuple is located.

Definition at line 91 of file ntupleWriterSvc.h.

bool ntupleWriterSvc::m_storeFlag [private]
 

Definition at line 96 of file ntupleWriterSvc.h.

unsigned int ntupleWriterSvc::m_tupleCounter [static, private]
 

Definition at line 33 of file ntupleWriterSvc.cxx.

std::vector< std::string > ntupleWriterSvc::m_tuple_name [private]
 

Maintain a list of each item so that this algorithm could handle multiple ntuples set non-blank to enable tuples.

Definition at line 87 of file ntupleWriterSvc.h.

std::map< std::string,std::string > ntupleWriterSvc::m_tuples [private]
 

Store ntuple Id and ntuple path in data store.

Definition at line 94 of file ntupleWriterSvc.h.

INTupleSvc * ntupleWriterSvc::ntupleSvc [private]
 

Definition at line 68 of file ntupleWriterSvc.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:38 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000