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

SummaryData.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/reconstruction/reconstruction/SummaryData.h,v 1.4 2001/02/28 05:29:40 burnett Exp $
00002 // Original author: Ian Gable
00003 
00004 #ifndef GLASTRECON_SUMMARYDATA_H
00005 #define GLASTRECON_SUMMARYDATA_H 1
00006 
00007 #include "reconstruction/ReconVisitor.h"
00008 
00009 #include "reconstruction/CalRecon.h"
00010 #include "reconstruction/MCRecon.h"
00011 #include "reconstruction/Recon.h"
00012 #include "reconstruction/TrackerRecon.h"
00013 #include "reconstruction/TriggerRecon.h"
00014 #include "reconstruction/VetoRecon.h"
00015 #include "reconstruction/CalProfile.h"
00016 
00017 class GlastRecon;
00018 
00025 template <class T>
00026 class SummaryData : public ReconVisitor {
00027     
00028 public:
00030     SummaryData (T& t):m_tuple(t){}
00031     
00033     ~SummaryData () { delete tuple(); }
00034     
00036     T* tuple () {  return &m_tuple;   }
00037 
00038     // visit method for each type of Recon object
00039     void visit (GlastRecon* r)  { addData(r); }
00040     void visit (MCRecon* r)     { addData(r); }
00041     void visit (CalRecon* r)    { addData(r); }
00042     void visit (TrackerRecon* r){ addData(r); }
00043     void visit (TriggerRecon* r){ addData(r); }
00044     void visit (VetoRecon* r)   { addData(r); }
00045     void visit (CalProfile* r)  { addData(r); }
00046     
00047     
00048 private:
00049     
00050     void addData (const Recon* r)
00051     {
00052         const LbldData& data = r->data;
00053         for( LbldData::const_iterator it = data.begin();it!=data.end(); ++it) {
00054             m_tuple.addItem((*it).first.c_str(), &((*it).second));
00055         }
00056     }
00057     
00058     T& m_tuple;
00059     
00060 };
00061 #endif

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