thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
ThePEG.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // ThePEG.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2019 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef ThePEG_H
10 #define ThePEG_H
11 
19 #ifndef ThePEG_ALTERNATE_CONFIG
20 
21 #include "ThePEG/Pointer/Ptr.h"
22 #include "ThePEG/Pointer/PtrTraits.h"
23 #include "ThePEG/Pointer/RCPtr.h"
24 #include "ThePEG/Utilities/Rebinder.fh"
25 #include "ThePEG/Utilities/Interval.fh"
26 #include "ThePEG/Utilities/ClassDescription.fh"
27 #include "ThePEG/Interface/InterfaceBase.fh"
28 #include "ThePEG/Persistency/PersistentOStream.fh"
29 #include "ThePEG/Persistency/PersistentIStream.fh"
30 #include "TemplateTools.h"
31 #include "Complex.h"
32 #include "Unitsystem.h"
33 #include "Constants.h"
34 #include "std.h"
35 
36 
43 namespace ThePEG {
44 
45 // Introduce some identifiers in the ThePEG namespace/
46 using namespace ThePEG::Pointer;
48 using namespace ThePEG::Units;
49 
54 struct Base: public ReferenceCounted {
55 
57  virtual ~Base() {}
58 
65  static void Init() {}
66 
72  void debug() const;
73 
78  virtual void debugme() const;
79 
80 };
81 
87 
94 struct TraitsType {};
95 
99 struct Veto {
100 
102  Veto();
103 };
104 
109 struct Stop {};
110 
115 template <typename T>
116 inline constexpr
117 auto sqr(const T& x) -> decltype(x*x) {
118  return x*x;
119 }
120 
121 // Debugging in ThePEG may be swithced off completely by this
122 // compilation swithc, eliminating possible overhead in error
123 // checking.
124 #ifndef ThePEG_NO_DEBUG
125 
126 #define ThePEG_DEBUG_LEVEL Debug::level
127 
128 #define ThePEG_DEBUG_ITEM(item) Debug::debugItem(item)
129 #else
130 
131 #define ThePEG_DEBUG_LEVEL 0
132 
133 #define ThePEG_DEBUG_ITEM(item) false
134 #endif
135 
136 }
137 
138 #include "Pointers.h"
139 #include "Containers.h"
140 
141 #else
142 
143 #include ThePEG_ALTERNATIVE_CONFIG
144 
145 #endif
146 
147 #endif /* ThePEG_H */
148 
The namespace for the reference counted pointer classes.
Definition: Ptr.h:18
Define the base class from which all (polymorphic) classes in ThePEG are derived. ...
Definition: ThePEG.h:54
TraitsType is an empty, non-polymorphic, base class.
Definition: ThePEG.h:94
constexpr auto sqr(const T &x) -> decltype(x *x)
The square function should really have been included in the standard C++ library. ...
Definition: ThePEG.h:117
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
static void Init()
The standard Init function used to initialize the interfaces.
Definition: ThePEG.h:65
This file declares typedefs of commonly used pointers in ThePEG.
A standard exception class to be used to temporarily stop the generation of an event.
Definition: ThePEG.h:109
A standard exception class to be used for vetoing a whole event.
Definition: ThePEG.h:99
This file introduces a number of std:: classes into the ThePEG namespace.
Base PersistentBase
Define the base class from which all persistent classes in ThePEG are derived.
Definition: ThePEG.h:86
ReferenceCounted must be the (virtual) base class of all classes which may be pointed to by the RCPtr...
Ptr is a templated class to provide typedefs for pointers types ThePEG should use for a given type...
Definition: Ptr.h:35
virtual ~Base()
The virtual destructor.
Definition: ThePEG.h:57
The Units namespace contains the declaration of a number of classes for variables with dimension...
Definition: Unitsystem.h:35
This file defines a number of containers.
Useful template machinery.