KaliVeda
Toolkit for HIC analysis
KVIDGridManager.h
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 
29 class KVIDGridManager: public KVBase {
30 
31  RQ_OBJECT("KVIDGridManager")
32 
33  friend class KVIDGraph;
34 
35 private:
36 
39 
40 protected:
41 
42  void AddGrid(KVIDGraph*);
43 
44 public:
45 
47  virtual ~ KVIDGridManager();
48 
49  void DeleteGrid(KVIDGraph*, Bool_t update = kTRUE);
50  KVIDGraph* GetGrid(const Char_t* name);
51 
53  {
54  return &fGrids;
55  }
56 
57  void Clear(Option_t* opt = "");
58  Bool_t ReadAsciiFile(const Char_t* filename);
59  const TList* GetLastReadGrids() const
60  {
62  return &fLastReadGrids;
63  }
64  Int_t WriteAsciiFile(const Char_t* filename, const TCollection* selection = 0);
65 
66  void Print(Option_t* /*opt*/ = "") const
67  {
68  ls();
69  };
70  void ls(Option_t* /*opt*/ = "") const
71  {
72  fGrids.ls();
73  }
74 
75  void StartViewer() const;
76 
77  void Modified()
78  {
79  Emit("Modified()");
80  }; // *SIGNAL*
81 
83  {
87 
88  return (KVList*)fGrids.GetSubListWithMethod(label, "GetIDTelescopeLabel");
90  };
92  void Initialize(Option_t* /*opt*/ = "");
93 
94  virtual bool IsSQLROOT() const
95  {
96  return false;
97  }
98  virtual void LoadGridsForRun(UInt_t) {}
99 
100  ClassDef(KVIDGridManager, 0) //Handles a collection of identification grids
101 };
102 
104 R__EXTERN KVIDGridManager* gIDGridManager;
105 
106 #endif
int Int_t
unsigned int UInt_t
#define R__EXTERN
#define RQ_OBJECT(sender_class)
bool Bool_t
char Char_t
const char Option_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:142
Base class for particle identification in a 2D map.
Definition: KVIDGraph.h:32
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:28
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:73
void ls(Option_t *option="") const override