00001 // -*- C++ -*- 00002 #ifndef THEPEG_RivetAnalysis_H 00003 #define THEPEG_RivetAnalysis_H 00004 // 00005 // This is the declaration of the RivetAnalysis class. 00006 // 00007 00008 #include "ThePEG/Handlers/AnalysisHandler.h" 00009 #include "Rivet/AnalysisHandler.hh" 00010 00011 namespace ThePEG { 00012 00019 class RivetAnalysis: public ThePEG::AnalysisHandler { 00020 00021 public: 00022 00026 RivetAnalysis(); 00027 00028 public: 00029 00049 virtual void analyze(ThePEG::tEventPtr event, long ieve, int loop, int state); 00051 00052 public: 00053 00060 void persistentOutput(ThePEG::PersistentOStream & os) const; 00061 00067 void persistentInput(ThePEG::PersistentIStream & is, int version); 00069 00076 static void Init(); 00077 00078 protected: 00079 00086 virtual ThePEG::IBPtr clone() const; 00087 00092 virtual ThePEG::IBPtr fullclone() const; 00094 00095 protected: 00096 00103 virtual void doinitrun(); 00104 00109 virtual void dofinish(); 00111 00112 private: 00113 00118 static ThePEG::ClassDescription<RivetAnalysis> initRivetAnalysis; 00119 00124 RivetAnalysis & operator=(const RivetAnalysis &); 00125 00126 private: 00127 00131 vector<string> _analyses; 00132 00136 string filename; 00137 00141 Rivet::AnalysisHandler * _rivet; 00142 }; 00143 00144 } 00145 00146 #include "ThePEG/Utilities/ClassTraits.h" 00147 00148 namespace ThePEG { 00149 00154 template <> 00155 struct BaseClassTrait<RivetAnalysis,1> { 00157 typedef AnalysisHandler NthBase; 00158 }; 00159 00162 template <> 00163 struct ClassTraits<RivetAnalysis> 00164 : public ClassTraitsBase<RivetAnalysis> { 00166 static string className() { return "ThePEG::RivetAnalysis"; } 00174 static string library() { return "RivetAnalysis.so"; } 00175 }; 00176 00179 } 00180 00181 #endif /* THEPEG_RivetAnalysis_H */