MarlinTrk  02.08
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMarlinTrkSystem.h
Go to the documentation of this file.
1 #ifndef IMarlinTrkSystem_h
2 #define IMarlinTrkSystem_h
3 
4 #include "MarlinTrkDiagnostics.h"
5 
6 #include <exception>
7 #include "ConfigFlags.h"
8 
9 namespace MarlinTrk{
10  class IMarlinTrack ;
11 }
12 
13 
14 namespace MarlinTrk {
15 
19  class Exception : public std::exception {
20 
21  protected:
23 
24  Exception(){ /*no_op*/ ; }
25 
26  public:
27  virtual ~Exception() throw() { /*no_op*/; }
28 
29  Exception( const std::string& text ){
30  message = "MarlinTrk::Exception: " + text ;
31  }
32 
33  virtual const char* what() const throw() { return message.c_str() ; }
34 
35  };
36 
37  //----------------------------------------------------------------------------------------------------
38 
46 
47  public:
48 
51  struct CFG {
53  static const unsigned useQMS = 1 ;
55  static const unsigned usedEdx = 2 ;
57  static const unsigned useSmoothing = 3 ;
58  //---
59  static const unsigned size = 4 ;
60 
61  } ;
62 
63 
65  virtual ~IMarlinTrkSystem() {};
66 
67 
72  virtual void setOption(unsigned CFGOption, bool val) ;
73 
76  bool getOption( unsigned CFGOption) ;
77 
81 
83  virtual std::string name() { return "Unknown" ; }
84 
88  virtual void init() = 0 ;
89 
90 
93  virtual MarlinTrk::IMarlinTrack* createTrack() = 0 ;
94 
95 
96 #ifdef MARLINTRK_DIAGNOSTICS_ON
97 
100  virtual void * getDiagnositicsPointer() = 0 ;
101 
102 #endif
103 
104  protected:
105 
107 
110  void registerOptions() ;
111 
112 
113 
114  private:
115 
116  IMarlinTrkSystem& operator=( const IMarlinTrkSystem&) ; // disallow assignment operator
117 
118 
119  } ;
120 
121 } // end of MarlinTrk namespace
122 
123 
124 #include "TrkSysConfig.h"
125 
126 
127 #endif
128 
void registerOptions()
Register the possible configuration options.
virtual const char * what() const
virtual void setOption(unsigned CFGOption, bool val)
Sets the specified option ( one of the constants defined in IMarlinTrkSystem::CFG ) to the given valu...
static const unsigned usedEdx
Use multiple scattering in the track fits.
static const unsigned useSmoothing
Use smoothing when calling fit( bool fitDirection )
STL class.
virtual ~IMarlinTrkSystem()
D&#39;tor - cleans up any allocated resources.
virtual std::string name()
the name of the implementation
Interface for generic tracks in MarlinTrk.
Definition: IMarlinTrack.h:36
Exception(const std::string &text)
bool getOption(unsigned CFGOption)
Return the option&#39;s current value - false if option not defined.
IMarlinTrkSystem & operator=(const IMarlinTrkSystem &)
std::string getOptions()
String with all configuration options and their current values.
T c_str(T...args)
Base class for tracking system implementations in MarlinTrk.
&#39;Enums&#39; for configuration options to be used with setOption().
virtual MarlinTrk::IMarlinTrack * createTrack()=0
Return an instance of IMarlinTrack corresponding to the current implementation.
Exception thrown in IMarlinTrk namespace (implemetations of IMarlinTrkSystem and IMarlinTrack).
virtual void init()=0
Initialise tracking system - to be called after configuration with setOption() - IMarlinTrkSystem can...
static const unsigned useQMS
Use multiple scattering in the track fits.