00001 // $Id: PrintReconData.h,v 1.4 2000/11/27 02:16:43 burnett Exp $ 00002 00003 #ifndef PRINTRECONDATA_H 00004 #define PRINTRECONDATA_H 1 00005 00006 #include "reconstruction/ReconVisitor.h" 00007 00008 #include "reconstruction/GlastRecon.h" 00009 #include "reconstruction/MCRecon.h" 00010 #include "reconstruction/CalRecon.h" 00011 #include "reconstruction/TrackerRecon.h" 00012 #include "reconstruction/TriggerRecon.h" 00013 #include "reconstruction/VetoRecon.h" 00014 #include "reconstruction/CalProfile.h" 00015 00016 #include <string> 00017 00018 class PrintReconData : public ReconVisitor 00019 { 00020 public: 00021 PrintReconData (std::ostream& os) 00022 :_os(os) 00023 { 00024 os << "======================================\n" 00025 << " GlastRecon Tuple\n" 00026 << "======================================\n" ; 00027 00028 } 00029 00030 private: // needed before first use so it can be inlined 00031 void printTitle (const char* title) 00032 { 00033 _os << title << "--------------------\n"; 00034 } 00035 00036 public: 00037 void visit (GlastRecon* recon) 00038 { 00039 printTitle("glast "); recon->data.printOn(_os); 00040 } 00041 00042 void visit (CalRecon* recon) 00043 { 00044 printTitle("calorimeter");recon->data.printOn(_os); 00045 } 00046 00047 void visit (TrackerRecon* recon) 00048 { 00049 printTitle("tracker "); recon->data.printOn(_os); 00050 } 00051 00052 void visit (VetoRecon* recon) 00053 { 00054 printTitle("veto ");recon->data.printOn(_os); 00055 } 00056 00057 void visit (CalProfile* recon) 00058 { 00059 printTitle("Profile ");recon->data.printOn(_os); 00060 } 00061 00062 void visit (MCRecon* recon) 00063 { 00064 printTitle("MC truth ");recon->data.printOn(_os); 00065 } 00066 00067 void visit (TriggerRecon* recon) 00068 { 00069 printTitle("trigger ");recon->data.printOn(_os); 00070 } 00071 private: 00072 std::ostream &_os; 00073 }; 00074 00075 #endif
1.2.3 written by Dimitri van Heesch,
© 1997-2000