9 #ifndef ThePEG_Repository_H 10 #define ThePEG_Repository_H 13 #include "ThePEG/Config/ThePEG.h" 14 #include "BaseRepository.h" 15 #include "EventGenerator.h" 16 #include "ThePEG/PDT/ParticleData.h" 17 #include "ThePEG/PDT/MatcherBase.h" 146 static void saveRun(
string EGname,
string name,
string filename);
156 static string load(
string filename);
161 static void save(
string filename);
171 static void stats(ostream &);
179 static void help(
string command, ostream & os);
185 static void remove(
tIBPtr);
193 static string remove(
const ObjectSet & rmset);
203 static void read(istream & is, ostream & os,
string prompt =
"");
216 static string read(
string filename, ostream & os);
224 static string exec(
string cmd, ostream &);
Repository()
The default constructor is the only one that should be used.
PID is a helper class implementing the type of PDG particle ids.
static void read(istream &is, ostream &os, string prompt="")
Read commands from a stream and send them one by one to exec().
static tPDPtr findParticle(string name)
Get a pointer to a particle based on the given path or name.
ThePEG::Ptr< InterfacedBase >::transient_pointer tIBPtr
Alias for a transient pointer to InterfacedBase .
static int & exitOnError()
If non-zero the setup program will exit with this error code as soon as an error is encountered...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Repository inherits from the BaseRepository class.
~Repository()
The destructor will do some clean-up when the last Repository is deleted.
This is the main namespace within which all identifiers in ThePEG are declared.
static void defaultParticle(tPDPtr)
Add a particle to the list of default ones.
Repository & operator=(const Repository &)
It makes no sense to copy a Repository, so this assignment is not implemented.
static GeneratorMap & generators()
All isolated generators mapped to their run name.
static string banner()
Return a string with a ThePEG banner.
static ParticleMap & defaultParticles()
The set of default particles.
static void cleanup()
Call this function to clean up the repository at the end of your program if you are using the static ...
static string version()
Return the version number of ThePEG.
static string load(string filename)
Load a whole repository from the given file.
static void registerMatcher(tPMPtr)
Used by Register.
static EGPtr makeRun(tEGPtr eg, string name)
Isolate an event generator, eg, and save it to disk in a file named name (with .run appended...
static const ParticleDataSet & allParticles()
Return the set of all particles in the repository.
static MatcherSet & matchers()
The set of all matchers.
static void Register(IBPtr)
Register an object with BaseRepository::Register() and add it to the list of particles or matchers if...
static const MatcherSet & allMatchers()
Return the set of all matchers in the repository.
BaseRepository is a purely static class which keeps a set of InterfacedBase objects indexed by their ...
RCPtr is a reference counted (smart) pointer.
static void save()
Save the repository to the default file.
static string & currentFileName()
The default file name used by save().
static string copyParticle(tPDPtr, string)
Special function for copying particles.
static void help(string command, ostream &os)
Print out a help message.
static tPMPtr findMatcher(string name)
Find a matcher with a given generic name.
static ParticleDataSet & particles()
The set of all particles.
static void stats(ostream &)
Write some statistics about the repository to the standard output.
static void registerParticle(tPDPtr)
Used by Register.
static string exec(string cmd, ostream &)
Interpret the command in cmd and return possible messages.
static void execAndCheckReply(string, ostream &)
Used by read()
map< string, EGPtr > GeneratorMap
A map of EventGenerator objects indexed by their run name.
static int ninstances
Count the number of repositorys instantiated.
static void saveRun(string EGname, string name, string filename)
Isolate an event generatorn, named EGname, set its run name and save it to a file named filename...