20#include "KVIDGridManager.h"
42 gIDGridManager =
this;
44 fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
59 if (gIDGridManager ==
this)
61 fGrids.Disconnect(
"Modified()",
this,
"Modified()");
90 if (!
update)
fGrids.Disconnect(
"Modified()",
this,
"Modified()");
93 if (!
update)
fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
105 fGrids.Disconnect(
"Modified()",
this,
"Modified()");
109 fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
143 if (!gridfile.good()) {
144 Error(
"ReadAsciiFile",
"File %s cannot be opened",
filename);
150 fGrids.Disconnect(
"Modified()",
this,
"Modified()");
151 while (gridfile.good()) {
153 s.ReadLine(gridfile);
154 if (s.BeginsWith(
"++")) {
165 if (s ==
"KVIDZGrid") {
169 TClass* clas = TClass::GetClass(s.Data());
171 Fatal(
"ReadAsciiFile",
172 "Cannot load TClass information for %s", s.Data());
185 fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
207 TIter next(list_of_grids);
213 Info(
"WriteAsciiFile",
"%s saved", grid->
GetName());
241 if (
gROOT->IsBatch()) {
242 Warning(
"StartViewer",
"To launch graphical interface, you should not use ROOT in batch mode");
245 TClass* cl = TClass::GetClass(
"KVIDGridManagerGUI");
272 if (list.
EqualTo(
",")) list =
"";
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Base class for particle identification in a 2D map.
virtual void WriteToAsciiFile(std::ofstream &gridfile)
virtual void ReadFromAsciiFile(std::ifstream &gridfile)
const Char_t * GetName() const
const Char_t * GetIDTelescopeLabel() const
virtual void SetOnlyZId(Bool_t yes=kTRUE)
Handles a stock of identification grids to be used by one or more identification telescopes.
void GetListOfIDTelescopeLabels(KVString &)
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 ~KVIDGridManager()
Bool_t ReadAsciiFile(const Char_t *filename)
void StartViewer() const
Opens GUI for managing grids.
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".
void Initialize(Option_t *="")
void AddGrid(KVIDGraph *)
Add a grid to the collection. It will be deleted by the manager.
virtual void SendModifiedSignals(Bool_t yes=kTRUE)
virtual void SetOwner(Bool_t enable=kTRUE)
virtual void Clear(Option_t *option="")
virtual TObject * FindObjectByName(const Char_t *name) const
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from list.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
void Clear(Option_t *option="") override
void Add(TObject *obj) override
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Fatal(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
Bool_t EqualTo(const char *cs, ECaseCompare cmp=kExact) const
TString & Append(char c, Ssiz_t rep=1)
void Form(const char *fmt,...)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
void update(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData, double factorWeightDecay, EnumRegularization regularization)