![]() |
|
|
Generated: 18 Jul 2008 |
#include <RRWNTupleCnv.h>
Inheritance diagram for RootHistCnv::RRWNTupleCnv:


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 CLID & | classID () |
| 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. | |
| 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] |
| static const CLID& RootHistCnv::RRWNTupleCnv::classID | ( | ) | [inline, static] |
Inquire class type.
Definition at line 26 of file RRWNTupleCnv.h.
References CLID_RowWiseTuple.
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.
References StatusCode::FAILURE.
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.
References std::basic_string< _CharT, _Traits, _Alloc >::c_str(), endreq(), MSG::INFO, name, std::vector< _Tp, _Alloc >::size(), and StatusCode::SUCCESS.
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.
References endmsg(), MSG::ERROR, StatusCode::FAILURE, Converter::msgSvc(), INTuple::reset(), StatusCode::SUCCESS, and INTuple::title().
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.
References StatusCode::FAILURE.
00066 { 00067 return StatusCode::FAILURE; 00068 }
friend class CnvFactory< RRWNTupleCnv > [friend] |