GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AgataEventDisplay.h
Go to the documentation of this file.
1 
2 
3 
4 #ifndef Gw_AgataEventDisplay
5 #define Gw_AgataEventDisplay
6 
7 
8 #include <map>
9 
10 #ifndef Gw_BaseEventDisplay
11 #include "BaseEventDisplay.h"
12 #endif
13 
14 #ifndef ROOT_TArrayF
15 #include "TArrayF.h"
16 #endif
17 
18 #ifndef ROOT_TString
19 #include "TString.h"
20 #endif
21 
22 #ifndef ROOT_TGFrame
23 #include "TGFrame.h"
24 #endif
25 
26 class TEveDigitSet;
27 class TGTextView;
28 class TGTextEntry;
29 class TGCheckButton;
30 class TList;
31 class TGeoVolume;
32 
33 namespace Gw {
34 class AgataEventContainer;
39 {
40 private:
41 
42  static AgataEventDisplay* fgInstance; // static instance of class
43 
44  static Bool_t fgAgataGeoDone; // geometry done flag for Agata
45  static Bool_t fgDanteGeoDone; // geometry done flag for Dante
46  static Bool_t fgPrismaGeoDone; // geometry done flag for Prisma
47  static Bool_t fgPassiveGeoDone; // geometry done flag for target, beam pipe & floor
48  static Bool_t fgFloorGeoDone; // geometry done special flag for floor
49 
50  static const Char_t* fgDefaultAgataPath; // Default path for Agata geometry files
51  static const Char_t* fgDefaultDanteConf; // Default configuration file for Dante geometry
52  static const Char_t* fgDefaultPrismaConf; // Default configuration file for Prisma geometry
53 
54 public:
55  virtual ~AgataEventDisplay();
56 
57  static AgataEventDisplay* Instance();
58 
59  void FirstEvent(); //*MENU*
60  void NextEvent(); //*MENU*
61  void PrevEvent(); //*MENU*
62 
63  void ShowDisplay();
64 
65  AgataEventContainer* GetEventContainer() const { return fAgataContainer; }
66 
67  // ! build default geometry dante or/and prima and Agata and Cie
68  void BuildDefaultGeometry(Bool_t danteGeo = true, Bool_t prismaGeo = true, Bool_t agataGeo = true, Bool_t passiveGeo = true);
69 
71  void SetBoxDefWidth(Float_t w) { fBoxDefWidth = w; }
72  void SetBoxDefHeight(Float_t h) { fBoxDefHeight = h; }
73 
75  void SetQuadDefWidth(Float_t w) { fQuadDefWidth = w; }
76  void SetQuadDefHeight(Float_t h) { fQuadDefHeight = h; }
77 
79  Float_t GetBoxDefWidth() { return fBoxDefWidth; }
80  Float_t GetBoxDefHeight() { return fBoxDefHeight; }
81 
83  Float_t GetQuadDefWidth() { return fQuadDefWidth; }
84  Float_t GetQuadDefHeight() { return fQuadDefHeight; }
85 
87  void SetTrackStyle(const Char_t* s, Option_t* type = "Agata");
88 
90  void UpdateHitInfo(TEveDigitSet* qs, Int_t idx);
91 
93  void UpdateTrackInfo(TEveDigitSet* qs, Int_t idx);
94 
96  void ClearInfoView();
97 
99  void DisableGUI() { fGUIFlag = false; }
100 
102  void Reset();
103 
105  const Char_t* RegisterBranch(Option_t* type = "");
106 
107 public:
108  static void EnableDrawFloor() { fgFloorGeoDone = true; }
109  static void DisableDrawFloor() { fgFloorGeoDone = false; }
110 
111  static void SetDefaultAgataPath(const Char_t* name) { fgDefaultAgataPath = name; }
112  static void SetDefaultDanteConf(const Char_t* name) { fgDefaultDanteConf = name; }
113  static void SetDefaultPrismaConf(const Char_t* name) { fgDefaultPrismaConf = name; }
114 
115  static const Char_t* GetDefaultAgataPath() { return fgDefaultAgataPath; }
116  static const Char_t* GetDefaultDanteConf() { return fgDefaultDanteConf; }
117  static const Char_t* GetDefaultPrismaConf() { return fgDefaultPrismaConf; }
118 
119 protected:
120 
122  void UpdateElements();
123 
125  void MakeGUI();
126 
127 private:
128 
130 
131 private:
132 
133  AgataEventContainer* fAgataContainer; // container of hits
134 
135  TList* fQuadHitList; // list of quad to display hits
136  TList* fLineTrackList; // list of line to display tracks
137 
138  Float_t fBoxDefWidth; // default width of track box
139  Float_t fBoxDefHeight; // default height of track box
140 
141  Float_t fQuadDefWidth; // default width of hit quad
142  Float_t fQuadDefHeight; // default height of hit quad
143 
144  TGTextView* fInfoView; // text view for hit/track info
145  TGTextEntry* fEventEntry; // text entry for event number
146  TGCheckButton* fRefreshButton; // refresh display for each event otherwise superimpose events
147  Bool_t fGUIFlag; // flag to disable or enable gui interface
148 
149  std::map<const Char_t*, const Char_t*> fMapStyle;// map style
150 
151  ClassDef(AgataEventDisplay, 0); // Base class for facilities to play with level scheme
152 };
153 
154 } // end namespace
155 
156 #endif
AgataEventContainer class that contains agata event to be displayed.
const Char_t * RegisterBranch(Option_t *type="")
Register branch.
static void SetDefaultDanteConf(const Char_t *name)
AgataEventDisplay a class to work on a specific event display.
static const Char_t * GetDefaultAgataPath()
void DisableGUI()
Disable GUI.
BaseEventDisplay base class to work on event display.
Float_t GetQuadDefWidth()
Get width/height of quad.
AgataEventContainer * GetEventContainer() const
void UpdateTrackInfo(TEveDigitSet *qs, Int_t idx)
Update tracks info.
static void DisableDrawFloor()
void BuildDefaultGeometry(Bool_t danteGeo=true, Bool_t prismaGeo=true, Bool_t agataGeo=true, Bool_t passiveGeo=true)
static const Char_t * GetDefaultPrismaConf()
void ClearInfoView()
Clear info view.
void SetBoxDefWidth(Float_t w)
Set width/height of box.
void SetBoxDefHeight(Float_t h)
void UpdateElements()
Update elements to be displayed.
static void EnableDrawFloor()
void SetQuadDefWidth(Float_t w)
Set width/height of quad.
void SetQuadDefHeight(Float_t h)
void SetTrackStyle(const Char_t *s, Option_t *type="Agata")
Set track style (rec/cone)
static void SetDefaultAgataPath(const Char_t *name)
Float_t GetBoxDefWidth()
Get width/height of box.
static const Char_t * GetDefaultDanteConf()
void UpdateHitInfo(TEveDigitSet *qs, Int_t idx)
Update hits info.
static AgataEventDisplay * Instance()
static void SetDefaultPrismaConf(const Char_t *name)