00001 // -*- C++ -*- 00002 // 00003 // Main.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_Main_H 00010 #define THEPEG_Main_H 00011 // This is the declaration of the Main class. 00012 00013 #include "ThePEG/Config/ThePEG.h" 00014 #include "ThePEG/Repository/EventGenerator.h" 00015 00016 namespace ThePEG { 00017 00035 class Main: public Base { 00036 00037 public: 00038 00042 static void eventGenerator(tEGPtr eg) { theEventGenerator = eg; } 00043 00047 static tEGPtr eventGenerator() { return theEventGenerator; } 00048 00052 static void N(long n) { theN = n; } 00053 00057 static long N() { return theN; } 00058 00059 00063 static void arguments(const vector<string> & args) 00064 { 00065 theArguments = args; 00066 } 00067 00071 static const vector<string> & arguments() { return theArguments; } 00072 00073 public: 00074 00078 static void Init() {} 00079 00080 private: 00081 00085 static EGPtr theEventGenerator; 00086 00090 static long theN; 00091 00095 static vector<string> theArguments; 00096 00097 private: 00098 00102 static AbstractNoPIOClassDescription<Main> initMain; 00103 00107 Main & operator=(const Main &); 00108 00109 }; 00110 00111 } 00112 00113 00114 namespace ThePEG { 00115 00120 template <> 00121 struct BaseClassTrait<Main,1>: public ClassTraitsType { 00123 typedef int NthBase; 00124 }; 00125 00128 template <> 00129 struct ClassTraits<Main>: public ClassTraitsBase<Main> { 00131 static string className() { return "ThePEG::Main"; } 00132 00133 }; 00134 00137 } 00138 00139 #endif /* THEPEG_Main_H */