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 
46  KVIDGridManager(Bool_t owns_grids = kFALSE);
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 = "") override;
58  Bool_t ReadAsciiFile(const Char_t* filename);
59  const TList* GetLastReadGrids() const
60  {
62  return &fLastReadGrids;
63  }
64  void AddLastReadGrids();
65 
66  Int_t WriteAsciiFile(const Char_t* filename, const TCollection* selection = 0);
67 
68  void Print(Option_t* /*opt*/ = "") const override
69  {
70  ls();
71  };
72  void ls(Option_t* /*opt*/ = "") const override
73  {
74  fGrids.ls();
75  }
76 
77  void StartViewer() const;
78 
79  void Modified()
80  {
81  Emit("Modified()");
82  }; // *SIGNAL*
83 
85  {
89 
90  return (KVList*)fGrids.GetSubListWithMethod(label, "GetIDTelescopeLabel");
92  };
94  void Initialize(Option_t* /*opt*/ = "");
95 
96  virtual bool IsSQLROOT() const
97  {
98  return false;
99  }
100  virtual void LoadGridsForRun(UInt_t) {}
101 
102  ClassDefOverride(KVIDGridManager, 0) //Handles a collection of identification grids
103 };
104 
106 R__EXTERN KVIDGridManager* gIDGridManager;
107 
108 #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 ClassDefOverride(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:139
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 Print(Option_t *="") const override
void Clear(Option_t *opt="") override
Delete all grids and empty list, ready to start anew.
void GetListOfIDTelescopeLabels(KVString &)
KVList * GetGrids()
void DeleteGrid(KVIDGraph *, Bool_t update=kTRUE)
Int_t WriteAsciiFile(const Char_t *filename, const TCollection *selection=0)
virtual void LoadGridsForRun(UInt_t)
KVList * GetGridsForIDTelescope(const Char_t *label)
void AddLastReadGrids()
Add all grids read the last time ReadAsciiFile() was called to the grid manager.
Bool_t ReadAsciiFile(const Char_t *filename)
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 ls(Option_t *="") const override
void Initialize(Option_t *="")
void AddGrid(KVIDGraph *)
Add a grid to the collection.
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