KiTrack  1.7.0
ICriterion.h
1 #ifndef ICriterion_h
2 #define ICriterion_h
3 
4 #include <vector>
5 #include <map>
6 #include <string>
7 
8 #include "KiTrack/Segment.h"
9 #include "KiTrack/KiTrackExceptions.h"
10 
11 
12 
13 namespace KiTrack{
14 
15 
20  class ICriterion{
21 
22 
23  public:
24 
28  virtual bool areCompatible( Segment* parent , Segment* child )throw( BadSegmentLength ) = 0;
29 
30 
33  std::map < std::string , float > getMapOfValues() {return _map_name_value; };
34 
35 
36  virtual ~ICriterion(){};
37 
40  void setSaveValues( bool saveValues ){ _saveValues = saveValues;}
41 
42 
44  std::string getName(){return _name;}
45 
47  std::string getType(){return _type;}
48 
49  protected:
50 
51 
52  std::map < std::string , float > _map_name_value;
53 
54  bool _saveValues;
55 
56  std::string _name;
57  std::string _type;
58 
59  };
60 
61 }
62 
63 
64 #endif
65 
66 
67 
68 
virtual bool areCompatible(Segment *parent, Segment *child)=0
std::string getName()
Definition: ICriterion.h:44
std::string getType()
Definition: ICriterion.h:47
std::map< std::string, float > getMapOfValues()
Definition: ICriterion.h:33
A Segment is something like a track or a part of a track: it consists of hits linked together...
Definition: Segment.h:40
Wrong segment length exception.
Definition: KiTrackExceptions.h:72
An Interface for Criteria.
Definition: ICriterion.h:20
void setSaveValues(bool saveValues)
Sets, whether the calculated values shall be saved in a map.
Definition: ICriterion.h:40