Gaudi Framework, version v20r4

Generated: 8 Jan 2009

RootHistCnv::RRWNTupleCnv Class Reference

#include <RRWNTupleCnv.h>

Inheritance diagram for RootHistCnv::RRWNTupleCnv:

Inheritance graph
[legend]
Collaboration diagram for RootHistCnv::RRWNTupleCnv:

Collaboration graph
[legend]

List of all members.


Detailed Description

Row wise NTuple converter class definition.

Author:
Charles Leggett

Definition at line 19 of file RRWNTupleCnv.h.


Public Member Functions

 RRWNTupleCnv (ISvcLocator *svc)
 Standard constructor.
virtual ~RRWNTupleCnv ()
 Standard destructor.

Static Public Member Functions

static const CLIDclassID ()
 Inquire class type.

Protected Member Functions

virtual StatusCode load (TTree *tree, INTuple *&refpObject)
 Create the transient representation of an object.
virtual StatusCode book (const std::string &desc, INTuple *pObject, TTree *&tree)
 Book the N tuple.
virtual StatusCode writeData (TTree *rtree, INTuple *pObject)
 Write N tuple data.
virtual StatusCode readData (TTree *rtree, INTuple *pObject, long ievt)
 Read N tuple data.

Friends

class CnvFactory< RRWNTupleCnv >
 Creator needs access to constructor/destructor.

Constructor & Destructor Documentation

RootHistCnv::RRWNTupleCnv::RRWNTupleCnv ( ISvcLocator svc  )  [inline]

Standard constructor.

Definition at line 31 of file RRWNTupleCnv.h.

00031                                       : RNTupleCnv(svc, classID())    {
00032     }

virtual RootHistCnv::RRWNTupleCnv::~RRWNTupleCnv (  )  [inline, virtual]

Standard destructor.

Definition at line 34 of file RRWNTupleCnv.h.

00034                               {
00035     }


Member Function Documentation

static const CLID& RootHistCnv::RRWNTupleCnv::classID (  )  [inline, static]

Inquire class type.

Definition at line 26 of file RRWNTupleCnv.h.

00026                                     {
00027       return CLID_RowWiseTuple;
00028     }

StatusCode RootHistCnv::RRWNTupleCnv::load ( TTree *  tree,
INTuple *&  refpObject 
) [protected, virtual]

Create the transient representation of an object.

Implements RootHistCnv::RNTupleCnv.

Definition at line 71 of file RRWNTupleCnv.cpp.

00074 {
00075   return StatusCode::FAILURE;
00076 }

StatusCode RootHistCnv::RRWNTupleCnv::book ( const std::string &  desc,
INTuple pObject,
TTree *&  tree 
) [protected, virtual]

Book the N tuple.

Implements RootHistCnv::RNTupleCnv.

Definition at line 19 of file RRWNTupleCnv.cpp.

00023 {
00024   MsgStream log(msgSvc(), "RRWNTupleCnv");
00025   const INTuple::ItemContainer& itms = nt->items();
00026   // Book the tree
00027   rtree = new TTree(desc.c_str(),nt->title().c_str());
00028   // Add the branches
00029   for (size_t length = itms.size(), i = 0; i < length; i++ )    {
00030     const char* itm = itms[i]->name().c_str();
00031     std::string tag = itm;
00032     tag += rootVarType( itms[i]->type() );
00033     // add the branch
00034     log << MSG::INFO << "ID " << desc << ": added branch: " 
00035         << itm << " / " << tag << endreq;
00036     rtree->Branch(itm,const_cast<void*>(itms[i]->buffer()),tag.c_str());
00037   }
00038   log << MSG::INFO << "Booked TTree with ID:" << desc
00039       << " \"" << nt->title() << "\"" << endreq;
00040   return StatusCode::SUCCESS;
00041 }

StatusCode RootHistCnv::RRWNTupleCnv::writeData ( TTree *  rtree,
INTuple pObject 
) [protected, virtual]

Write N tuple data.

Implements RootHistCnv::RNTupleCnv.

Definition at line 44 of file RRWNTupleCnv.cpp.

00046 {
00047   if ( 0 != rtree )   {
00048     // Fill the tree;
00049     rtree->Fill();
00050     // Reset the NTuple
00051     nt->reset();
00052     return StatusCode::SUCCESS;
00053   }
00054   MsgStream log(msgSvc(), "RRWNTupleCnv");
00055   log << MSG::ERROR << "Attempt to write invalid N-tuple.";
00056   if ( nt != 0 ) log << nt->title();
00057   log << endmsg;
00058   return StatusCode::FAILURE;
00059 }

StatusCode RootHistCnv::RRWNTupleCnv::readData ( TTree *  rtree,
INTuple pObject,
long  ievt 
) [protected, virtual]

Read N tuple data.

Implements RootHistCnv::RNTupleCnv.

Definition at line 62 of file RRWNTupleCnv.cpp.

00066 {
00067   return StatusCode::FAILURE;
00068 }


Friends And Related Function Documentation

friend class CnvFactory< RRWNTupleCnv > [friend]

Creator needs access to constructor/destructor.

Definition at line 22 of file RRWNTupleCnv.h.


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

Generated at Thu Jan 8 17:54:25 2009 for Gaudi Framework, version v20r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004