17 #ifndef _ABSTRACTOBJECTSTOCK_H_
18 #define _ABSTRACTOBJECTSTOCK_H_
30 #include "../../utils/Indicator.h"
31 #include "../Hparam_stock.h"
106 virtual unsigned int GetSize()
const {
return 0;}
107 virtual void Resize(
unsigned int ) {std::cout <<
"AbstractObjectStock::Resize to overide !" << std::endl;}
115 virtual void SetValues(
unsigned int bin, std::vector<double>
values,
double xmin,
double ymax, time_t date,
unsigned int opt_value = 0) = 0;
116 virtual void GetExtrema(
double & ,
double & )
const = 0;
143 virtual int DistancetoPoint(
int ,
int ,
double & ,
int bin = -1)
const = 0;
146 virtual void Paint(
const Option_t* =
"") = 0;
152 std::cout <<
"SetLineColorObject abstract !" << std::endl;
179 unsigned int & xfirst,
unsigned int & xlast,
int & shift_left );
200 std::cout <<
"IndicatorStock:: MakeString for status bar to override" << std::endl;
201 std::vector<std::string> toto;
return toto;
212 #ifdef DEBUG_OBJSTOCK
213 std::cout <<
"\nIndicatorObjectStock::ClearObjectStock SHOULD NOT BE CALLED, to override\n" << std::endl;
235 std::cout <<
"SetLineColorObject from IndicatorObjectStock, color " << lcolor << std::endl;
236 SetLineColor( lcolor );
virtual ~AbstractObjectStock()
virtual default destructor, needed
virtual void SetLineColorObject(Color_t)
virtual void Paint(const Option_t *="")=0
Paint the objet, to overide.
virtual void GetExtrema(double &, double &) const =0
Derive from TH1 will draw the graph.
std::string name_indic
add a name to the base class convenient to get a indicator, can retrieve from the name...
virtual void AddToVecObject(AbstractObjectStock *)
for all indicators, size and if update need to resize
virtual ~IndicatorObjectStock()
virtual void SetParent(THStock *thstock)
virtual void ClearObjectStock()=0
general function called when drawing
virtual std::string GetNameObject() const =0
pure-virtual access
virtual bool ToPaint() const
virtual std::vector< std::string > MakeStringForStatusBar(int, int) const =0
create the string for the StatusBar
Hparam_stock_t Hparam_stock
virtual std::string GetNameObject() const
IndicatorObjectStock(std::string name)
Define a base class for drawing indicator only, they are sorted in ListDataStock object.
void ComputeBinRange(ListDataStockBase *ldata, CommonXAxis *fcommon_xaxis_th, Hparam_stock_t &Hparam_stock, unsigned int &xfirst, unsigned int &xlast, int &shift_left)
set up bin first/ last.
virtual Int_t DistancetoPrimitive(int, int, AbstractObjectStock **)=0
used for selection of object, for const need attention to the pointer
virtual void ClearObjectStock()
general function called when drawing
virtual void SetNameObject(std::string &new_name)
ClassDef(AbstractObjectStock, 1)
bool kPaint
set to true if the object need be draw or not depend on common_xaxis and user input ( slider ) used b...
virtual std::vector< std::string > MakeStringForStatusBar(int, int) const
create the string for the StatusBar
virtual void SetValues(unsigned int bin, std::vector< double > values, double xmin, double ymax, time_t date, unsigned int opt_value=0)=0
more general call for setting the values, even ObjectLine ?? no use/need but maybe if protected probe...
virtual void SetToPaint(bool k)
Public access to kPaint.
virtual void SetObjectStock(ListDataStockBase *, CommonXAxis *, Hparam_stock_t &)
used for from the listdata
Abstract base class for the ListDataStock, for storing base pointers in vectors.
virtual int DistancetoPoint(int, int, double &, int bin=-1) const =0
called by THStock for anchoring.
Define an abstract base class for all objects to be painted in a THStock.
virtual unsigned int GetSize() const
AbstractObjectStock()
default constructor
virtual void Resize(unsigned int)
virtual THStock * GetParent() const
public access to parent THStock
virtual void SetLineColorObject(Color_t lcolor)
called by THStock::SetColor