KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVIDGridManager.h
Go to the documentation of this file.
1 /***************************************************************************
2  KVIDGridManager.h - description
3  -------------------
4  begin : Jan 27 2005
5  copyright : (C) 2005 by J.D. Frankland
6  email : frankland@ganil.fr
7 
8 $Id: KVIDGridManager.h,v 1.11 2009/03/03 14:27:15 franklan Exp $
9 ***************************************************************************/
10 
11 #ifndef KVIDGridManager_H
12 #define KVIDGridManager_H
13 
14 #include "KVList.h"
15 #include "KVIDGraph.h"
16 #include "RQ_OBJECT.h"
17 
28 class KVIDGridManager: public KVBase {
29 
30  RQ_OBJECT("KVIDGridManager")
31 
32  friend class KVIDGraph;
33 
34 private:
35 
38 
39 protected:
40 
41  void AddGrid(KVIDGraph*);
42 
43 public:
44 
46  virtual ~ KVIDGridManager();
47 
48  void DeleteGrid(KVIDGraph*, Bool_t update = kTRUE);
49  KVIDGraph* GetGrid(const Char_t* name);
50 
52  {
53  return &fGrids;
54  }
55 
56  void Clear(Option_t* opt = "");
57  Bool_t ReadAsciiFile(const Char_t* filename);
58  const TList* GetLastReadGrids() const
59  {
61  return &fLastReadGrids;
62  }
63  Int_t WriteAsciiFile(const Char_t* filename, const TCollection* selection = 0);
64 
65  void Print(Option_t* /*opt*/ = "") const
66  {
67  ls();
68  };
69  void ls(Option_t* /*opt*/ = "") const
70  {
71  fGrids.ls();
72  }
73 
74  void StartViewer() const;
75 
76  void Modified()
77  {
78  Emit("Modified()");
79  }; // *SIGNAL*
80 
82  {
86 
87  return (KVList*)fGrids.GetSubListWithMethod(label, "GetIDTelescopeLabel");
89  };
91  void Initialize(Option_t* /*opt*/ = "");
92 
93  virtual bool IsSQLROOT() const
94  {
95  return false;
96  }
97  virtual void LoadGridsForRun(UInt_t) {}
98 
99  ClassDef(KVIDGridManager, 0) //Handles a collection of identification grids
100 };
101 
104 
105 #endif
int Int_t
unsigned int UInt_t
#define R__EXTERN
R__EXTERN KVIDGridManager * gIDGridManager
................ global variable
#define RQ_OBJECT(sender_class)
char Char_t
bool Bool_t
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:141
Base class for particle identification in a 2D map.
Definition: KVIDGraph.h:31
Handles a stock of identification grids to be used by one or more identification telescopes.
void GetListOfIDTelescopeLabels(KVString &)
KVList * GetGrids()
void DeleteGrid(KVIDGraph *, Bool_t update=kTRUE)
void Clear(Option_t *opt="")
Delete all grids and empty list, ready to start anew.
Int_t WriteAsciiFile(const Char_t *filename, const TCollection *selection=0)
virtual void LoadGridsForRun(UInt_t)
KVList * GetGridsForIDTelescope(const Char_t *label)
Bool_t ReadAsciiFile(const Char_t *filename)
void Print(Option_t *="") const
void StartViewer() const
Opens GUI for managing grids.
const TList * GetLastReadGrids() const
TList fLastReadGrids
list of grids created by last call to ReadAsciiFile
KVList fGrids
collection of all ID graphs handled by manager
KVIDGraph * GetGrid(const Char_t *name)
Return pointer to grid with name "name".
virtual bool IsSQLROOT() const
void Initialize(Option_t *="")
void AddGrid(KVIDGraph *)
Add a grid to the collection. It will be deleted by the manager.
void ls(Option_t *="") const
Extended TList class which owns its objects by default.
Definition: KVList.h:27
KVSeqCollection * GetSubListWithMethod(const Char_t *retvalue, const Char_t *method) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
virtual void ls(Option_t *option="") const