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

GlastTuple.cxx

Go to the documentation of this file.
00001 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00002 //             Implement GlastTuple
00003 
00004 #include "reconstruction/GlastTuple.h"
00005 #include <cassert>
00006 
00007 GlastTuple *GlastTuple::s_instance;
00008 
00009 
00010 
00011 GlastTuple::GlastTuple (const char* title)
00012 : Tuple(title)
00013 {
00014     assert(s_instance==0);
00015     s_instance = this;
00016 }
00017 
00018 GlastTuple::~GlastTuple ()
00019 {
00020 }
00021 void GlastTuple::addItem (const char* name, const float *datum)
00022 {
00023         new TupleItem(name);
00024         m_column = end();
00025         *back() = *datum;
00026         m_float_array.push_back(datum);
00027 }
00028 
00029 void GlastTuple::dumpData ()
00030 {
00031    //don't need anymore  m_column = begin();  // reset column pointer to begin
00032 }
00033 
00034 void GlastTuple::fill()
00035 {
00036     iterator column = begin();
00037     for(std::vector<const float*>::iterator it = m_float_array.begin();
00038                                             it != m_float_array.end();  
00039                                             ++it)
00040     {
00041         **column++ = **it;
00042     }
00043 }

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