AnalysisLoader.hh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef RIVET_AnalysisLoader_HH 00003 #define RIVET_AnalysisLoader_HH 00004 00005 #include "Rivet/Rivet.hh" 00006 #include <map> 00007 #include <string> 00008 00009 namespace Rivet { 00010 00011 00012 // Forward declarations 00013 class Analysis; 00014 class AnalysisBuilderBase; 00015 class Log; 00016 00017 00018 /// Internal class which loads and registers analyses from plugin libs 00019 class AnalysisLoader { 00020 public: 00021 00022 /// Get all the available analyses' names. 00023 static vector<string> analysisNames(); 00024 static set<string> getAllAnalysisNames(); 00025 00026 /// Get an analysis by name. 00027 /// Warning: a name arg which matches no known analysis will return a null 00028 /// pointer. Check your return values before using them! 00029 static Analysis* getAnalysis(const string& analysisname); 00030 00031 /// Get all the available analyses. 00032 static vector<Analysis*> getAllAnalyses(); 00033 00034 00035 private: 00036 00037 /// Allow the analysis builders to call the private _registerBuilder function 00038 friend class AnalysisBuilderBase; 00039 00040 /// Register a new analysis builder 00041 static void _registerBuilder(const AnalysisBuilderBase* a); 00042 00043 /// Load the available analyses at runtime. 00044 static void _loadAnalysisPlugins(); 00045 00046 typedef map<string, const AnalysisBuilderBase*> AnalysisBuilderMap; 00047 static AnalysisBuilderMap _ptrs; 00048 00049 }; 00050 00051 00052 } 00053 00054 #endif Generated on Thu Feb 6 2014 17:38:41 for The Rivet MC analysis system by 1.7.6.1 |