KaliVeda
Toolkit for HIC analysis
KVIDCutLine.h
1 /*
2 $Id: KVIDCutLine.h,v 1.2 2009/03/03 13:36:00 franklan Exp $
3 $Revision: 1.2 $
4 $Date: 2009/03/03 13:36:00 $
5 */
6 
9 
10 #ifndef __KVIDCUTLINE_H
11 #define __KVIDCUTLINE_H
12 
13 #include "KVIDLine.h"
14 #include "KVString.h"
15 
23 class KVIDCutLine : public KVIDLine {
24 protected:
25  KVString fAcceptedDirection;
26  void WriteAsciiFile_extras(std::ofstream&, const Char_t* name_prefix = "") override;
27  void ReadAsciiFile_extras(std::ifstream&) override;
28  void SetZ(Int_t /*atnum*/) override
29  {
30  ;
31  };
32  void SetA(Int_t /*atnum*/) override
33  {
34  ;
35  };
36  void SetAandZ(Int_t /*atnum*/, Int_t /*ztnum*/) override
37  {
38  ;
39  };
40  void SetMassFormula(Int_t /*mf*/) override
41  {
42  ;
43  };
44 
45 public:
46  KVIDCutLine();
47  virtual ~KVIDCutLine();
48 
49  void SetAcceptedDirection(const Char_t* dir)
50  {
60  fAcceptedDirection = dir;
61  }
63  {
65  return !fAcceptedDirection.IsNull();
66  }
67  void AcceptLeft()
68  {
69  SetAcceptedDirection("left");
71  } // *MENU={Hierarchy="SetAcceptedDirection.../left"}*
72  void AcceptRight()
73  {
74  SetAcceptedDirection("right");
76  } // *MENU={Hierarchy="SetAcceptedDirection.../right"}*
77  void AcceptAbove()
78  {
79  SetAcceptedDirection("above");
81  } // *MENU={Hierarchy="SetAcceptedDirection.../above"}*
82  void AcceptBelow()
83  {
84  SetAcceptedDirection("below");
86  } // *MENU={Hierarchy="SetAcceptedDirection.../below"}*
87 
88  Int_t GetA() const override
89  {
90  return 0;
91  }
92  Int_t GetZ() const override
93  {
94  return 0;
95  }
96  Int_t GetMassFormula()const override
97  {
98  return 0;
99  }
100  Bool_t TestPoint(Double_t x, Double_t y) override;
101 
103  {
104  return fAcceptedDirection.Data();
105  }
106 
108  void SetName(const char* name) override
109  {
111  } // *MENU*
112  const Char_t* GetSelectionType() const override;
113 
114  ClassDefOverride(KVIDCutLine, 1) //Line in ID grid used to delimit regions where identification is possible
115 };
116 
117 #endif
int Int_t
bool Bool_t
char Char_t
double Double_t
#define ClassDefOverride(name, id)
char name[80]
Line in ID grid used to delimit regions where no identification is possible.
Definition: KVIDCutLine.h:23
void AcceptRight()
Definition: KVIDCutLine.h:72
Bool_t TestPoint(Double_t x, Double_t y) override
Definition: KVIDCutLine.cpp:51
Int_t GetZ() const override
Definition: KVIDCutLine.h:92
void AcceptLeft()
Definition: KVIDCutLine.h:67
void AcceptAbove()
Definition: KVIDCutLine.h:77
void AcceptBelow()
Definition: KVIDCutLine.h:82
const Char_t * GetSelectionType() const override
Definition: KVIDCutLine.cpp:77
const Char_t * GetAcceptedDirection() const
Definition: KVIDCutLine.h:102
virtual ~KVIDCutLine()
Destructor.
Definition: KVIDCutLine.cpp:33
void SetName(const char *name) override
This is redeclared to make it appear in context menus for KVIDCutLines.
Definition: KVIDCutLine.h:108
void SetAcceptedDirection(const Char_t *dir)
Definition: KVIDCutLine.h:49
bool IsAcceptedDirectionSet() const
Definition: KVIDCutLine.h:62
KVIDCutLine()
Default constructor.
Definition: KVIDCutLine.cpp:22
Int_t GetA() const override
Definition: KVIDCutLine.h:88
Int_t GetMassFormula() const override
Definition: KVIDCutLine.h:96
Base class for lines/cuts used for particle identification in 2D data maps.
Definition: KVIDLine.h:143
void NotifyParentOfModification()
If identifier belongs to a graph/grid, send signal to say it has been modified.
void SetName(const char *name) override
Definition: KVIDentifier.h:176
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
const char * Data() const
Bool_t IsNull() const