Configuration.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_CONFIGURATION_HH
00003 #define RIVET_CONFIGURATION_HH
00004 
00005 #include "Rivet/Rivet.hh"
00006 #include "Rivet/Tools/Logging.hh"
00007 #include "Rivet/AnalysisHandler.hh"
00008 #include "Rivet/ParticleName.hh"
00009 
00010 
00011 namespace Rivet {
00012 
00013   /// Typedef for a parameter name:value pair.
00014   typedef pair<string, string> Param;
00015   typedef const pair<string, string> cParam;
00016 
00017   /// Typedef for a parameter container.
00018   typedef vector<Param> ParamMap;
00019   typedef const vector<Param> cParamMap;
00020   //typedef map<string, string> ParamMap;
00021   //typedef const map<string, string> cParamMap;
00022 
00023   /// @author Andy Buckley
00024   /// @date   2007-02-08
00025   class Configuration {
00026   public:
00027     /// Standard constructor
00028     Configuration() :
00029       numEvents(0), generatorName(""), beam1(Rivet::PROTON), beam2(Rivet::PROTON),
00030       mom1(7000.0), mom2(7000.0), histoName("Rivet"), histoFormat(Rivet::AIDAML),
00031       hepmlInFile(""), hepmlOutFile(""), hepmcInFile(""), hepmcOutFile(""),
00032       useLogColors(true), runRivet(false), readHepMC(false), writeHepMC(false),
00033       params(), analyses(), rngSeed(314159)
00034     { }
00035 
00036 
00037     /// Destructor
00038     ~Configuration() { };
00039 
00040   public:
00041     size_t numEvents;
00042     string generatorName;
00043     Rivet::ParticleName beam1, beam2;
00044     double mom1, mom2;
00045     string histoName;
00046     Rivet::HistoFormat histoFormat;
00047     string hepmlInFile, hepmlOutFile;
00048     string hepmcInFile, hepmcOutFile;
00049     Rivet::Log::LevelMap logLevels;
00050     bool useLogColors;
00051     bool runRivet;
00052     bool readHepMC, writeHepMC;
00053     ParamMap params;
00054     vector<string> paramNames;
00055     set<string> analyses;
00056     size_t rngSeed;
00057   };
00058 
00059 
00060   // Forward declarations
00061   class Analysis;
00062   namespace Commandline {
00063     Configuration parseArgs(size_t argc, char** argv);
00064   }
00065 
00066 
00067 }
00068 
00069 #endif