Gaudi Framework, version v21r4

Home   Generated: 7 Sep 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 72 of file RRWNTupleCnv.cpp.

00075 {
00076   return StatusCode::FAILURE;
00077 }

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

Book the N tuple.

Implements RootHistCnv::RNTupleCnv.

Definition at line 20 of file RRWNTupleCnv.cpp.

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

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

Write N tuple data.

Implements RootHistCnv::RNTupleCnv.

Definition at line 45 of file RRWNTupleCnv.cpp.

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

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

Read N tuple data.

Implements RootHistCnv::RNTupleCnv.

Definition at line 63 of file RRWNTupleCnv.cpp.

00067 {
00068   return StatusCode::FAILURE;
00069 }


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 Mon Sep 7 18:27:39 2009 for Gaudi Framework, version v21r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004