CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/TopQuarkAnalysis/TopHitFit/interface/Defaults.h

Go to the documentation of this file.
00001 //
00002 // $Id: Defaults.h,v 1.1 2011/05/26 09:46:53 mseidel Exp $
00003 //
00004 // File: hitfit/Defaults.h
00005 // Purpose: Define an interface for getting parameter settings.
00006 // Created: Nov, 2000, sss.
00007 //
00008 // This defines a very simple abstract interface for retrieving settings
00009 // for named parameters.  Using this ensures that the hitfit code doesn't
00010 // have to depend on something like rcp.  There is a lightweight concrete
00011 // implementation of this interface, Defaults_Text, which can be used
00012 // for standalone applications.  If this code gets used with the D0 framework,
00013 // a Defaults_RCP can be provided too.
00014 //
00015 // CMSSW File      : interface/Defaults.h
00016 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
00017 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
00018 //
00019 
00020 
00048 #ifndef HITFIT_DEFAULTS_H
00049 #define HITFIT_DEFAULTS_H
00050 
00051 
00052 #include <string>
00053 
00054 
00055 namespace hitfit {
00056 
00057 
00062 class Defaults
00063 //
00064 // Purpose: Define an interface for getting parameter settings.
00065 //
00066 {
00067 public:
00068   // Constructor, destructor.
00069 
00073   Defaults () {}
00074 
00078   virtual ~Defaults () {}
00079 
00080   // Test to see if parameter NAME exists.
00087   virtual bool exists (std::string name) const = 0;
00088 
00089   // Get the value of NAME as an integer.
00096   virtual int get_int (std::string name) const = 0;
00097 
00098   // Get the value of NAME as a boolean.
00105   virtual bool get_bool (std::string name) const = 0;
00106 
00107   // Get the value of NAME as a float.
00115   virtual double get_float (std::string name) const = 0;
00116 
00117   // Get the value of NAME as a string.
00124   virtual std::string get_string (std::string name) const = 0;
00125 };
00126 
00127 
00128 } // namespace hitfit
00129 
00130 
00131 #endif // not HITFIT_DEFAULTS_H