ThePEG  1.8.0
GraphvizPlot.h
1 // -*- C++ -*-
2 //
3 // Graphviz.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef THEPEG_GraphvizPlot_H
10 #define THEPEG_GraphvizPlot_H
11 //
12 // This is the declaration of the GraphvizPlot class.
13 //
14 
15 #include "ThePEG/Repository/CurrentGenerator.h"
16 #include "ThePEG/Handlers/AnalysisHandler.h"
17 
18 namespace ThePEG {
19 
28 
29 public:
30 
36  GraphvizPlot() : _eventNumber(1), _quiet(false) {}
38 
39 public:
40 
60  virtual void analyze(tEventPtr event, long ieve, int loop, int state);
62 
63 public:
64 
71  void persistentOutput(PersistentOStream & os) const;
72 
78  void persistentInput(PersistentIStream & is, int version);
80 
87  static void Init();
88 
89 protected:
90 
97  virtual IBPtr clone() const {return new_ptr(*this);}
98 
103  virtual IBPtr fullclone() const {return new_ptr(*this);}
105 
106 protected:
107 
114  virtual void dofinish();
116 
120  string particleName(tcPPtr) const;
121 
122 private:
123 
129 
135 
136 private:
137 
142 
146  bool _quiet;
147 
148 
149 };
150 
151 }
152 
153 #include "ThePEG/Utilities/ClassTraits.h"
154 
155 namespace ThePEG {
156 
161 template <>
162 struct BaseClassTrait<GraphvizPlot,1> {
164  typedef AnalysisHandler NthBase;
165 };
166 
169 template <>
170 struct ClassTraits<GraphvizPlot>
171  : public ClassTraitsBase<GraphvizPlot> {
173  static string className() { return "ThePEG::GraphvizPlot"; }
177  static string library() { return "GraphvizPlot.so"; }
178 };
179 
182 }
183 
184 #endif /* THEPEG_GraphvizPlot_H */
static void Init()
The standard Init function used to initialize the interfaces.
Ptr< T >::pointer new_ptr()
Simple interface to the PtrTraits<Ptr>::create()
Definition: PtrTraits.h:195
PersistentIStream is used to read persistent objects from a stream where they were previously written...
bool _quiet
Tell the object not to write out messages to the standard output.
Definition: GraphvizPlot.h:146
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: GraphvizPlot.h:103
GraphvizPlot & operator=(const GraphvizPlot &)
The assignment operator is private and must never be called.
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition: RCPtr.h:681
The GraphvizPlot class generates an output of the tree structure of the event which can be viewed usi...
Definition: GraphvizPlot.h:27
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:509
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
The AnalysisHandler is the base class of all analysis objects which may be handled by the FullEventGe...
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: GraphvizPlot.h:97
virtual void analyze(tEventPtr event, long ieve, int loop, int state)
Analyze a given Event.
string particleName(tcPPtr) const
Helper function to obtain the name of a particle.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
GraphvizPlot()
The default constructor.
Definition: GraphvizPlot.h:36
long _eventNumber
Event number that should be drawn.
Definition: GraphvizPlot.h:141
InitState state() const
Return the state of initialization of this object.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
static ClassDescription< GraphvizPlot > initGraphvizPlot
The static object used to initialize the description of this class.
Definition: GraphvizPlot.h:128
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
virtual void dofinish()
Finalize this object.