ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ControllerIndicatorTHStock.cxx
Go to the documentation of this file.
1 
9 
10 #include "../View/IndicatorFrame.h"
11 #include "../View/THStockFrame.h"
12 
13 #include "../../src_cpp/StockManager.h"
14 
15 // when want to communicate with parent controller again need to include
16 // not a big deal here, they are bound 2 by 2
17 // observer between controller <event>, not really solved
18 // can use name for communicating, and then retrieve the child from the name
19 // maybe in ListController, automatic. Still problem if use base
20 // here need to construct with MainindicatorTHStock ?? yes it the problem
22 
23 // need info MainIndicatorFrame
24 #include "../View/MainIndicatorTHStockFrame.h"
25 //#include <TGCompositeFrame>
26 
27 // add the frames in which to draw in parameters, they are generic frame TGCompositeFrame
28 // here need 2 frames, maybe optional ?
30  TGCompositeFrame *mother_frame_indic, TGCompositeFrame *mother_frame_thstock, std::string frame_name ) :
31  ControllerFrame<NullType>( parent, frame_name )
32 {
33  // test if use local, base and cast should work as well !! or use base class member !
34  myparent_controller = parent;
35 
36  // GetFrame returns a subframe of MaindicatorTHStockFrame, fVframe_indic
37  //findic_frame = parent->GetFrame()->AddIndicatorFrame( frame_name );
38  findic_frame = new IndicatorFrame( mother_frame_indic, frame_name.c_str(), 110, 10 );
39 
40 
41  if ( findic_frame == 0 )
42  std::cout << "\n\tError in creation of IndicatorFrame" << std::endl;
43  // add the new frame to the mother
44  mother_frame_indic->AddFrame(findic_frame, new TGLayoutHints( kLHintsExpandX, 2,2,2,2 ));
45  // assign the controller to the frame, could be in constructor
46  findic_frame->SetController( this );
47 
48  //child_controller->SetTHStockFrame( findic_thstock->AddTHStockFrame( frame_name ) );
49  //fthstock_frame = parent->GetFrame()->AddTHStockFrame( frame_name );
50  fthstock_frame = new THStockFrame(mother_frame_thstock, frame_name.c_str(), 120, 100);
51  if ( fthstock_frame == 0 )
52  std::cout << "Error in creation of THStockFrame" << std::endl;
53 
54  mother_frame_thstock->AddFrame( fthstock_frame, new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 2,2,2,2 ) );
55  // assign the controller to the frame, could be in constructor
57  // strange in controller, but working here
58  fthstock_frame->GetECanvas()->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)","MainIndicatorTHStockFrame",
59  parent->GetFrame(), "EventInfo(Int_t,Int_t,Int_t,TObject*)");
60 
61 #ifdef DEBUG_CONT_FRAME
62  std::cout << "\n\tConstructor ControllerIndicatorTHStock with name " << GetName() << std::endl;
63  std::cout << "this " << this << std::endl;
64  std::cout << "parent controller " << GetParentController() << std::endl;
65  std::cout << "myparent controller " << myparent_controller << std::endl;
66 #endif
67 }
68 
70 {
71 #ifdef DEBUG_CONT_FRAME
72  std::cout << "Destructor ControllerIndicatorTHStock" << std::endl;
73 #endif
74  vec_name_data.clear();
75  // Killed by MainIndicatorTHStockFrame when close frame, double free
76  //delete findic_frame;
77  //findic_frame = 0;
78  //delete fthstock_frame;
79  //fthstock_frame = 0;
81 }
82 
84 
85 bool ControllerIndicatorTHStock::IsPresent( std::string fullname, unsigned int i ) const
86 {
87  it_clist it;
88  it_clist it2;
89  for ( it = vec_name_data[i].begin(), it2 = vec_name_data[i].end(); it != it2; it ++) {
90  if ( (*it) == fullname )
91  return true;
92  }
93  return false;
94 }
95 
96 std::list<std::string> * ControllerIndicatorTHStock::GetList( unsigned int nb_pad )
97 {
98 #ifdef DEBUG_CONT_FRAME
99  std::cout << "Entry ControllerIndicatorTHStock::GetList nb_pad " << nb_pad << std::endl;
100 #endif
101  std::list<std::string> new_list;
102 
103  if ( ( nb_pad < 1 ) || ( nb_pad > vec_name_data.size() ) ) {
104 
105 #ifdef DEBUG_CONT_FRAME
106  std::cout << " Add a new list " << nb_pad << std::endl;
107  std::cout << " size of the vector " << vec_name_data.size() << std::endl;
108  std::cout << "create a new list " << std::endl;
109 #endif
110  vec_name_data.push_back( new_list );
111  //std::cout << "new size of vector " << vec_name_data.size() << std::endl;
112 
113  // last check
114  if ( vec_name_data.size() != nb_pad ) {
115  std::cout << "Error in creation of the new list " << std::endl;
116  exit(1);
117  }
118  }
119  //return vec_name_data.begin() + nb_pad - 1;
120  return &(vec_name_data[ nb_pad -1 ]);
121 }
122 
123 // argument tmscl not used
124 bool ControllerIndicatorTHStock::NeedToUpdate( std::string stockname, ETime tmscl ) const // Indicator indic
125 {
126 #ifdef DEBUG_CONT_FRAME
127  // identical name frame and controller, can delete one ?
128  std::cout << "ControllerIndicatorTHStock::NeedToUpdate " << std::endl;
129  //std::cout << " stockname " << stockname << " timescale " << tmscl << std::endl;
130  std::cout << "name controller " << GetName() << std::endl;
131  std::cout << "name THStockFrame " << GetTHStockFrame()->GetName() << std::endl;
132 #endif
133 
134  //unsigned int i;
135  //std::list<std::string> list_name;
136  //ETime tmscl_list;
137  std::string namestock_list;
138  namestock_list = FullName::GetNameStock( GetName() );
139 
140 #ifdef DEBUG_CONT_FRAME
141  std::cout << "namestock_list " << namestock_list << std::endl;
142 #endif
143 
144  // Timescale may be decided quite early, maybe before in MainControllerIndicatorTHStock
145  // easy for broadcasting
146  // easier to let here, return when as soon as possible
147  //GetTHStockFrame()->GetECanvas()->Update
148 
149  // most cases only the name is needed
150  // assumption : update_dcsv
151  // update all indicator, all timescale
152  if ( stockname == namestock_list ) {
153  std::cout << " namestock identical return true " << std::endl;
154  return true;
155  }
156 
157  // loop over the vector, if need to find CAC & DJ,
158  // certainly need an other way when will be implemented
159  /*
160  for ( i=0; i< vec_name_data.size(); i++ ) {
161  list_name = vec_name_data[i];
162 
163  for ( it_list it_l = list_name.begin(); it_l != list_name.end(); it_l++ ) {
164 
165  namestock_list = FullName::GetNameStock( (*it_l) );
166  tmscl_list = FullName::GetTimeScale( (*it_l) );
167  std::cout << "namestock_list " << namestock_list << std::endl;
168  std::cout << "timescale list " << tmscl_list << std::endl;
169 
170  // all timescale
171  if ( ( namestock_list == stockname ) && ( tmscl_list > DAY ) ) {
172  //std::cout << "need to update i+1: " << i+1 << std::endl;
173  //nb_pads.push_back( i+1 );
174  //continue;
175  }
176  }
177 
178  }
179  //std::cout << "nb_pads.size() " << nb_pads.size() << std::endl;
180  //if ( nb_pads.size() > 0 )
181  // return true;
182  */
183  std::cout << " return false " << std::endl;
184  return false;
185 }
186 
187 
188 int ControllerIndicatorTHStock::AddDataToVecNameData( std::string fullname, unsigned int nb_pad )
189 {
190 #ifdef DEBUG_CONT_FRAME
191  std::cout << "Entry AddDataToVecNameData fullname " << fullname << " nb_pad " << nb_pad << std::endl;
192  std::cout << " size vector " << vec_name_data.size() << std::endl;
193  //std::cout << " nb_pad - 1 " << nb_pad - 1 << std::endl;
194 #endif
195 
196  // not nice, maybe create a new list in GetList is better, here only use reference
197  //std::list<std::string> new_list;
198  std::list<std::string> * list;
199 
200  // always return a valid list, already inserted in the vector
201  list = GetList( nb_pad );
202  if ( list == 0 ) {
203  //error
204  return 1;
205  }
206  list->push_back( fullname );
207  // no error
208  return 0;
209 }
210 
212 // possibiliy of more than one occurence ?? not here ??
213 unsigned int ControllerIndicatorTHStock::GetPadNumber( std::string fullname ) const
214 {
215 #ifdef DEBUG_CONT_FRAME
216  std::cout << "Entry ControllerIndicatorTHStock::GetPadNumber " << std::endl;
217  std::cout << "parameter fullname: " << fullname << std::endl;
218 #endif
219 
220  for ( unsigned int i = 0; i < vec_name_data.size(); i++ ) {
221  if ( IsPresent( fullname, i) )
222  return i+1;
223  }
224  return 0;
225 }
226 
228 
230 void ControllerIndicatorTHStock::AddData( std::string fullname )
231 {
232 #ifdef DEBUG_CONT_FRAME
233  std::cout << "\n\t Entry ControllerIndicatorTHStock::AddData fullname " << fullname << std::endl;
234  std::cout << " this->GetName() " << GetName() << std::endl;
235 #endif
236 
237  int nb_pad_printed;
238  int color = -1;
239 
240  // here only one couple THStockFrame (CanvasStocck) ,IndicatorFrame
241 
242  // better in controller, here or in parent ? !
243  // if a signal update is coming, make its work better if here ??
244  // could have a recurrent getStockManager in controller
245  //StockManager *fstock = myparent_controller->GetStockManager();
246  //no change, strange still with compilation
248  std::cout << "get fstock " << fstock << std::endl;
249 
250  ListDataStockBase * ldata = nullptr;
251  // could be static function
252  try {
253  ldata = fstock->GetListData( fullname );
254  ldata->PrintData( 2 );
255  } catch (StockException &e) {
256  std::cout << "Got Exception e.what: " << e.what() << std::endl;
257  }
258 #ifdef DEBUG_CONT_FRAME
259  std::cout << "After GetListData " << ldata << std::endl;
260  std::cout << "After GetListData GetName() " << ldata->GetName() << std::endl;
261  std::cout << "GetSize " << ldata->GetSize() << std::endl;
262 #endif
263 
264  // only one CanvasStock, by THStockFrame
266 
267  // use default nb_pad == 0, cs will decide which pad to paint
268  // return to which pad the data have been created by factory
269  nb_pad_printed = cs->AddListDataStockToMap( ldata ); // Int_t option force_pad ??
270 
271  // here would need the color, return value or re-use Indicator
272  std::vector<std::string> descp;
273  Indicator indic = Indicator::GetIndicator ( ldata->GetName() );
274  descp = indic.parse_description();
275  if ( descp[0][0] == 'P' ) {
276  std::cout << "Get description indicator PStokline" << std::endl;
277  std::cout << "descp[0][2]" << descp[0][2] << std::endl;
278  std::cout << FactoryObjectStock::MakeColor(descp[0][2]) << std::endl;
279  //color = FactoryObjectStock::MakeColor(descp[0][2]);
280  color = indic.MakeColor( descp[0][2] );
281  }
282 
283 #ifdef DEBUG_CONT_FRAME
284  std::cout << "return AddListDataStockToMap nb_pad_printed " << nb_pad_printed << std::endl;
285 #endif
286 
287  // Add to IndicatorFrame
288  findic_frame->AddIndicator( fullname, color ); //, nb_pad_printed);
289 
290  // save into the local vector
291  AddDataToVecNameData( fullname, nb_pad_printed );
292 #ifdef DEBUG_CONT_FRAME
293  PrintVector();
294 #endif
295 
296  // all regrouped in one now, grouped in CanvasStock
297  UpdateFrames();
298 
299 #ifdef DEBUG_CONT_FRAME
300  std::cout << "End ControllerIndicatorTHStock::AddData fullname " << fullname << std::endl;
301 #endif
302 
303 }
304 
305 // pad_number enough ?? gPad already selected anyway need to see
306 // when called ?
308 {
309 #ifdef DEBUG_CONT_FRAME
310  std::cout << "\n\tEntry ControllerIndicatorTHStock::GetSelected pad_number " << pad_number << std::endl;
311  std::cout << "this " << this << std::endl;
312  //std::cout << "parent controller " << (MainControllerIndicatorTHStock*)GetParentController() << std::endl;
313  //std::cout << "myparent controller " << myparent_controller << std::endl;
314  // same
315  std::cout << "GetParentController " << GetParentController() << std::endl;
316 #endif
317  // needed, need fcurrent, without gPad in controller
318  // will receive the pad ? how to know the sender ?
319  // ok can retrieve from the controller list
320  //fparent_controller->GetSelected( this ); //, pad_number );
321 
322  // need to select the frame, no only one
324  // pad number could be here ?? as selected, easy to retieve from THStockFrame gPad anyway
325 
326  //std::cout << "test" << std::endl;
327 
328  //fthstock_frame
329 
330 }
331 
351 // use only the fullname here
352 void ControllerIndicatorTHStock::UpdateIndicator( std::string mode, std::string fullname )
353 {
354  // pad number is stored in vec_name_data
355  unsigned int nb_pad = GetPadNumber( fullname );
356  // first get the canvas stock
358 
359  // extract the frame name
360  std::string frame_name = FullName::GetFrameName ( fullname );
361 
362  // if cs need to be updated, default yes, but cs may deleted by HIDE/DELETE _ALL
363  bool update_cs = true;
364  // need if data to delete
365  StockManager *fstockmanager = 0;
366 
367 #ifdef DEBUG_CONT_FRAME
368  std::cout << "ControllerIndicatorTHStock::UpdateIndicator " << std::endl;
369  //std::cout << " mode " << mode << " fullname " << fullname << " nb_pad " << nb_pad << std::endl;
370  std::cout << " mode " << mode << " fullname " << fullname << std::endl;
371  std::cout << "CanvasStock name " << cs->GetName() << std::endl;
372  std::cout << "frame_name " << frame_name << std::endl; // CAC40_DAY
373  std::cout << "GetPadNumber from controller " << nb_pad << std::endl;
374  PrintVector();
375 #endif
376 
377  // here is the logic, should call specific function from Frame
378  // avoid call directly to wigdget. CanvasStock is fine
379  if ( mode == "HIDE" ) {
380 #ifdef DEBUG_CONT_FRAME
381  std::cout << "mode HIDE " << std::endl;
382 #endif
383  cs->HideListData( fullname, nb_pad );
384  }
385  // delete completely the data
386  // not working as expected with stockmanager, not deleted if DELETE_ALL, no test if in use by another
387  else if (mode == "DELETE" ) {
388 
389  // test here
390  //findic_frame->DeleteLines( fullname );
391 
392  // delete object toDelete
393  cs->HideListData( fullname, nb_pad, true );
394 
395  // delete data, need check if not used anymore...not sure shared_ptr or more tests
396  fstockmanager = myparent_controller->GetStockManager();
397  fstockmanager->DeleteListData( fullname );
398  }
399  //option all need to hide/delete THStockFrame
400  // should call MainController here
401  else if ( ( mode == "DELETE_ALL" ) || ( mode == "HIDE_ALL" ) ) {
402  std::cout << "In Update mode DELETE_ALL or HIDE_ALL frame_name " << frame_name << std::endl;
403  // need to call for correct update of the frame or deletion
404  // may return Exception if problem in deleting
405  myparent_controller->UpdateIndicator( this, mode );
406 
407  // cs deleted, hiden, should not try to Update() !!
408  update_cs = false;
409  }
410 
411  else if ( mode == "SHOW" ) {
412 #ifdef DEBUG_CONT_FRAME
413  std::cout << "\t\nIn Update mode SHOW " << std::endl;
414 #endif
415  // recreate canvas if needed
416  cs->ShowListData(fullname, nb_pad );
417  } // end SHOW
418 
419  else if ( mode == "SHOW_ALL" ) {
420 #ifdef DEBUG_CONT_FRAME
421  std::cout << "\t\nIn Update mode SHOW_ALL " << std::endl;
422 #endif
423  myparent_controller->UpdateIndicator( this, mode );
424  } // end SHOW_ALL
425 
426  // should be general for all
427  if ( update_cs ) {
428 #ifdef DEBUG_CONT_FRAME
429  std::cout << "Will update cs " << std::endl;
430 #endif
431  cs->Update();
432  }
433 
434 }
435 
436 void ControllerIndicatorTHStock::ModifyColorIndic( std::string fullname, unsigned long color )
437 {
438 #ifdef DEBUG_CONT_FRAME
439  //std::cout << "Entry ControllerIndicatorTHStock::ModifyColorIndic fullname " << fullname << " nb_pad " << nb_pad << std::endl;
440  std::cout << "Entry ControllerIndicatorTHStock::ModifyColorIndic fullname " << fullname << std::endl;
441 #endif
442 
443  std::string frame_name = FullName::GetFrameName ( fullname );
444  // call controller now
445  unsigned int nb_pad = GetPadNumber( fullname );
446 
447  //fthstock_frame->GetECanvas()->Update();
448  fthstock_frame->GetECanvas()->SetColor( nb_pad, fullname, color );
449  fthstock_frame->GetECanvas()->Update();
450 }
451 
456 {
457  std::cout << "\n\t ControllerIndicatorTHStock::Entry PrintVector " << std::endl;
458  for ( unsigned int i= 0; i < vec_name_data.size(); ++i ) {
459  std::cout << "element " << i << std::endl;
460  for ( it_list it= vec_name_data[i].begin(); it != vec_name_data[i].end(); it++ ) {
461  std::cout << (*it) << " ";
462  }
463  std::cout << " " << std::endl;
464  }
465  std::cout << " " << std::endl;
466 }
467 
468 void ControllerIndicatorTHStock::Updated( std::vector<std::string> & message )
469 {
470 #ifdef DEBUG_CONT_FRAME
471  std::cout << "Entry ControllerIndicatorTHStock::Updated " << std::endl;
472  std::cout << "message[0] " << message[0] << std::endl;
473  std::cout << "message[1] " << message[1] << std::endl;
474 #endif
475 
476  std::string namestock;
477  // Indicator indic;
478  ETime tmscl;
479  // return value if need to be inserted
480  //std::vector<unsigned int> nb_pads;
481 
482  // get the list of stuffs for the list, not here
483  // do the same, just broadcast here. Can decide ??
484  if ( message[0] == "update_dcsv" ) {
485  // Here fixed, not used yet
486  // Indicator indic = Indicator::StockInst; //( Indicator::StockInst );
487  namestock = message[1];
488  tmscl = ETime::INST;
489 
490 //#ifdef DEBUG_CONT_FRAME
491  std::cout << "need to check if present in the list " << std::endl;
492  PrintVector();
493 //#endif
494 
495  //NeedToUpdate( std::string stockname, Indicator indic, TimeScale tmscl, unsigned int nb_pad )
496  //if ( NeedToUpdate( namestock, indic, tmscl, nb_pads ) ) {
497 
498  // regroup logic here simple but later CAC40 & DJ more complex
499  // tmscl not used ?
500  if ( NeedToUpdate( namestock, tmscl ) ) {
501  // here call update or easy let in THStock
502  UpdateFrames();
503  }
504 #ifdef DEBUG_CONT_FRAME
505  else {
506  std::cout << "did not find anything to update in this Controller, name Controller " << GetName() << std::endl;
507  }
508 #endif
509  } else {
510  std::cout << "Message not known message[0]" << message[0] << std::endl;
511  }
512 
513 }
514 
515 // good regroup, but UpdateTHStock specialized for update, test size
518 #ifdef DEBUG_CONT_FRAME
519  std::cout << "\n\t ControllerIndicatorTHStock::UpdateFrames " << std::endl;
520 #endif
521  // all grouped in one in CanvaStock, will update all THStock
523 }
524 
Singleton class, stores all loaded stocks.
Definition: StockManager.h:42
void SetColor(UInt_t npad, std::string fullname, unsigned long color)
new version with fname, really Needed ?? GetPad ( nb_pad ) from Controller not so good...
Owns a vector of THStock.
Definition: CanvasStock.h:53
IndicatorFrame * findic_frame
pointer to the frame and indicator.
std::vector< std::string > parse_description() const
Utility function to parse the description.
Definition: Indicator.cpp:112
void ModifyColorIndic(std::string fullname, unsigned long color)
void UpdateIndicator(std::string mode, std::string fullname)
UpdateIndicator, call by IndicatorFrame.
Controller for a dual frame containing Indicator+THStock(s).
"Clever" enumeration of the ListDataStock type : StockCSV, Volume, EMA, BOLL,...
Definition: Indicator.h:29
virtual const char * what() const noexcept
bool NeedToUpdate(std::string stockname, ETime tmscl) const
check if the size of ldata and object match, or if need an update.
std::list< std::string > * GetList(unsigned int nb_pad)
return the list of name of the pad number nb_pad.
virtual void PrintData(const unsigned int verbose=0) const =0
Nice formatting output on console.
std::list< std::string >::iterator it_list
define iterator and const iterator for loop
ControllerIndicatorTHStock(MainControllerIndicatorTHStock *parent, TGCompositeFrame *mother_frame_indic, TGCompositeFrame *mother_frame_thstock, std::string frame_name)
int AddDataToVecNameData(std::string fullname, unsigned int nb_pad=0)
add the name of the new data in the pad nb_pad.
Base Exception for Stock and StockManager, all src_cpp code.
static StockManager * getInstance(std::string new_path=".")
Get a singleton instance.
std::string GetNameStock(const std::string &fname)
Extract the name of the stock.
Definition: FullName.cpp:46
ListDataStockBase * GetListData(const std::string &fullname) const
Retrieve an instance of a ListDataStock.
CanvasStock * GetECanvas()
General function, for tests but may be kept later.
Definition: THStockFrame.h:75
MainIndicatorTHStockFrame * GetFrame() const
Sub-controller : assure drawing and coupling of 1 IndicatorFrame and 1 THStock.
static Indicator GetIndicator(const std::string &str_name)
Constructor with a string label.
Definition: Indicator.cpp:234
static EColor MakeColor(const char str_color)
translate name to integer color in root
int MakeColor(const char str_color)
Definition: Indicator.cpp:362
Int_t AddListDataStockToMap(ListDataStockBase *, Int_t npad=0)
Add a ListDataStock, decide if new pad is created Add a pointeur to the new ListDataStock now decides...
Contains an EmbeddedCanvas and a CanvasStock.
Definition: THStockFrame.h:46
ETime
Enumeration for the different time representation, from instantaneous (INST) to year(YEAR) ...
Definition: TimeScale.h:48
std::string GetName() const
Definition: Controller.h:66
std::vector< std::list< std::string > > vec_name_data
add a list of loaded data, use only name ( fullname ).
std::string GetFrameName(const std::string &fname)
Extract NameStock_Timescale (FrameName) from a fullname.
Definition: FullName.cpp:92
MainControllerIndicatorTHStock * myparent_controller
before base was working, test if explicit, seems necessary depending on the function called ...
void AddData(std::string fullname)
Used when a new ListData is added, need SM access here, or in parent...
ControllerBase * GetParentController()
Definition: Controller.h:70
Show all data loaded in memory, allow to deal with Button.
void SetController(ControllerIndicatorTHStock *controller)
Definition: THStockFrame.h:79
void UpdateIndicator(ControllerIndicatorTHStock *child_controller, std::string mode)
called by controller child for some tasks child cannot do.
void SetController(ControllerIndicatorTHStock *controller)
virtual unsigned int GetSize() const =0
Return the size of the vector.
std::string GetName() const
Definition: ListDataStock.h:78
unsigned int GetPadNumber(std::string fullname) const
want the index of the vector containing the corresponding fullname, i.e.
Abstract base class for the ListDataStock, for storing base pointers in vectors.
Definition: ListDataStock.h:50
std::list< std::string >::const_iterator it_clist
bool IsPresent(std::string fullname, unsigned int i) const
check if fullname is present in the pad number i
void UpdateFrames()
keep only for updating THStockFrame for the moment, how done by Indicator ?
virtual void Updated(std::vector< std::string > &message)
receive an update from observer pattern, from StockManager
void HideListData(std::string fullname, Int_t npad, bool toDelete=false)
Used for showing listdatastock indicator.
see remark below, much easier if composition than derivation in the case of ListController, same for parent_controller as member <U> easily extends to View as well ( ListView possible ), but strong coupling again
Definition: Controller.h:209
void PrintVector()
Print the Content of the vector vec_name_data, for debugging.
THStockFrame * GetTHStockFrame() const
void DeleteListData(const std::string &fname)
Delete a specific ListDataStcok, just wrappers to Stock.
void AddIndicator(std::string, int color)
Add an indicator , call MakeLineLabel now should be called by ControllerIndicatorTHStockFrame.
void UpdateTHStock()
to redefine
THStockFrame * fthstock_frame
pointer to the frame
void ShowListData(std::string fullname, Int_t npad)
Used for Hide and Delete, with option.