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

GaudiTuple.cxx

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/aoRecon/src/GaudiTuple.cxx,v 1.3 2001/05/23 00:45:33 igable Exp $
00002 // Original author: Ian Gable
00003 // GaudiTuple.cxx: implementation of the GaudiTuple class.
00004 //
00006 
00007 #include "GaudiTuple.h"
00008 
00009 static std::string tupleRoot("/NTUPLES/");
00010 
00014 GaudiTuple::GaudiTuple (INTupleWriterSvc* ntSvc, const char* title, const char * logicalFileName ) 
00015 :  m_ntSvc(ntSvc), m_fileName(logicalFileName)
00016 {
00017 }
00018 
00019 GaudiTuple::~GaudiTuple ()
00020 {
00021 }
00022 /*
00023 class MyItem : public NTuple::Item<float> {
00024 public:
00025     MyItem(float * d) {
00026         m_ptr = d;
00027     }
00028 };
00029 */
00030 
00031 void GaudiTuple::addItem (const char* name, const float *datum)
00032 {
00033     m_ntupleItemList.push_back( std::make_pair(name,datum) );
00034 }
00035 
00036 
00040 void GaudiTuple::fill()
00041 {
00042     for( iterator tupit = m_ntupleItemList.begin();
00043             tupit !=  m_ntupleItemList.end(); ++tupit) {
00044                                 m_ntSvc->addItem(m_fileName.c_str(),(*tupit).first,(float)*((*tupit).second));
00045     }
00046 }
00047 
00048 
00049 

Generated at Wed Nov 21 12:21:01 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000