00001 // -*- C++ -*- 00002 // 00003 // Graphviz.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 1999-2007 Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef THEPEG_GraphvizPlot_H 00010 #define THEPEG_GraphvizPlot_H 00011 // 00012 // This is the declaration of the GraphvizPlot class. 00013 // 00014 00015 #include "ThePEG/Repository/CurrentGenerator.h" 00016 #include "ThePEG/Handlers/AnalysisHandler.h" 00017 00018 namespace ThePEG { 00019 00027 class GraphvizPlot: public AnalysisHandler { 00028 00029 public: 00030 00036 GraphvizPlot() : _eventNumber(1), _quiet(false) {} 00038 00039 public: 00040 00060 virtual void analyze(tEventPtr event, long ieve, int loop, int state); 00062 00063 public: 00064 00071 void persistentOutput(PersistentOStream & os) const; 00072 00078 void persistentInput(PersistentIStream & is, int version); 00080 00087 static void Init(); 00088 00089 protected: 00090 00097 virtual IBPtr clone() const {return new_ptr(*this);} 00098 00103 virtual IBPtr fullclone() const {return new_ptr(*this);} 00105 00106 protected: 00107 00114 virtual void dofinish(); 00116 00120 string particleName(tcPPtr) const; 00121 00122 private: 00123 00128 static ClassDescription<GraphvizPlot> initGraphvizPlot; 00129 00134 GraphvizPlot & operator=(const GraphvizPlot &); 00135 00136 private: 00137 00141 long _eventNumber; 00142 00146 bool _quiet; 00147 00148 00149 }; 00150 00151 } 00152 00153 #include "ThePEG/Utilities/ClassTraits.h" 00154 00155 namespace ThePEG { 00156 00161 template <> 00162 struct BaseClassTrait<GraphvizPlot,1> { 00164 typedef AnalysisHandler NthBase; 00165 }; 00166 00169 template <> 00170 struct ClassTraits<GraphvizPlot> 00171 : public ClassTraitsBase<GraphvizPlot> { 00173 static string className() { return "ThePEG::GraphvizPlot"; } 00177 static string library() { return "GraphvizPlot.so"; } 00178 }; 00179 00182 } 00183 00184 #endif /* THEPEG_GraphvizPlot_H */