20 #include "KVIDGridManager.h"
42 gIDGridManager =
this;
43 fGrids.SendModifiedSignals(
kTRUE);
44 fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
54 KVIDGridManager::~KVIDGridManager()
59 if (gIDGridManager ==
this)
61 fGrids.Disconnect(
"Modified()",
this,
"Modified()");
62 fLastReadGrids.
Clear();
90 if (!
update) fGrids.Disconnect(
"Modified()",
this,
"Modified()");
93 if (!
update) fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
105 fGrids.Disconnect(
"Modified()",
this,
"Modified()");
106 fLastReadGrids.Clear();
109 fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
139 fLastReadGrids.Clear();
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") {
171 Fatal(
"ReadAsciiFile",
172 "Cannot load TClass information for %s", s.Data());
175 fLastReadGrids.Add(grid);
185 fGrids.Connect(
"Modified()",
"KVIDGridManager",
this,
"Modified()");
206 const TCollection* list_of_grids = (selection ? selection : &fGrids);
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");
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 * GetIDTelescopeLabel() const
const Char_t * GetName() 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)
Bool_t ReadAsciiFile(const Char_t *filename)
void StartViewer() const
Opens GUI for managing grids.
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.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
static TClass * GetClass(Bool_t load=kTRUE, Bool_t silent=kFALSE)
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)