11 #ifndef _OBJECTSTOCK_H_
12 #define _OBJECTSTOCK_H_
64 Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value = 0 );
65 virtual void GetExtrema(
double & min,
double & max )
const;
82 virtual Int_t
DistancetoPoint(
int px,
int py,
double &yvalue,
int bin = -1)
const;
85 void virtual Paint(
const Option_t* =
"");
127 virtual void GetExtrema(
double & min,
double & max )
const;
129 virtual void SetValues( UInt_t bin, std::vector<double>
values, Double_t xmin, Double_t xmax,
130 time_t date, UInt_t opt_value = 0 );
133 virtual int DistancetoPoint(
int ,
int ,
double &yvalue,
int bin = -1)
const;
134 virtual void Paint(
const Option_t* =
"" );
145 std::vector<double>
fx;
150 float ExtrapolateYPad (
int px,
int bin0,
int bin1,
float x0,
float x1 )
const;
155 std::vector<float>
GetValues(
int px,
int py, time_t &date )
const;
159 { std::cout <<
"Construtor Default PStockLine" << std::endl;}
163 PStockLine( std::string name,
unsigned size );
164 virtual ~PStockLine() { std::cout <<
"Destructor PStockLine" << std::endl;}
169 virtual void Resize(
unsigned int new_size);
172 virtual void GetExtrema(
double & min,
double & max )
const ;
174 Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value=0 );
186 void virtual Paint(
const Option_t* =
"");
207 CollectionObjectStock(
unsigned int size, std::string name_contained= std::string(),
bool ref0 =
false );
223 virtual void Resize(
unsigned int new_size);
227 virtual void GetExtrema(
double & min,
double & max )
const ;
229 Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value = 0 );
237 { std::cout <<
"CollectionObjectStock::DistancetoPoint never called " << std::endl;
return 9999; }
239 virtual void Paint(
const Option_t* =
"");
246 #endif // _OBJECTSTOCK_H_
int DistancetoPoint(int, int py, double &yvalue, int) const
called by THStock for anchoring.
virtual int DistancetoPoint(int, int, double &yvalue, int bin=-1) const
called by THStock for anchoring.
virtual time_t GetDate() const
virtual void GetExtrema(double &min, double &max) const
virtual void ClearObjectStock()
Call ClearObject on every objects contained in the collection.
virtual void GetExtrema(double &min, double &max) const
override abstract base function
virtual ~CollectionObjectStock()
virtual void ClearObjectStock()
different from Candle/Bar, delete the PstockLine.
virtual void Paint(const Option_t *="")
Paint the object.
Derive from TH1 will draw the graph.
virtual void Paint(const Option_t *="")
Paint the objet, to overide.
std::vector< float > GetValues(int px, int py, time_t &date) const
protected version, used by MakeStringForStatusBar difficult to extrapolate..., need optional bin2 ...
virtual void AddToVecObject(AbstractObjectStock *obj)
for all indicators, size and if update need to resize
virtual void SetObjectStock(ListDataStockBase *ldata, CommonXAxis *fcommon_xaxis_th, Hparam_stock_t &Hparam_stock)
called by , here need to send the correct ldata, but cannot split ldata so need to set up manually ...
Define Base classes for ObjectStock.
virtual unsigned int GetSize() const
virtual std::string GetNameObject() const
pure-virtual access
virtual void GetExtrema(double &min, double &max) const
overide base class
std::vector< time_t > dates
easy if date is here, still extrapolate data
std::vector< AbstractObjectStock * > vec_object
slight difference with ListObjectStock, here pointer to object, not object
Hparam_stock_t Hparam_stock
virtual std::string GetNameObject() const
pure-virtual access
Define a base class for drawing indicator only, they are sorted in ListDataStock object.
virtual void GetExtrema(double &min, double &max) const
override the Abstract base class
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py, AbstractObjectStock **obj)
virtual void ClearObjectStock()
Set kPaint to false, keep in memory.
virtual int DistancetoPoint(int, int, double &, int=-1) const
called by THStock for anchoring.
virtual void SetObjectStock(ListDataStockBase *ldata, CommonXAxis *fcommon_xaxis_th, Hparam_stock_t &Hparam_stock)
used for from the listdata
virtual void Paint(const Option_t *="")
realize the painting, not setting the values
bool kPaint
set to true if the object need be draw or not depend on common_xaxis and user input ( slider ) used b...
virtual Int_t DistancetoPoint(int px, int py, double &yvalue, int bin=-1) const
specific, called only by ListDataStock do not use bin, but follow the hierarchy pixel better return a...
virtual time_t GetDate() const
virtual std::vector< std::string > MakeStringForStatusBar(int px, int py) const
create the string for the StatusBar
float ExtrapolateYPad(int px, int bin0, int bin1, float x0, float x1) const
CollectionObjectStock(std::string name)
std::vector< float > GetValues() const
return the 4 values of a candle use fby MakeStringForStatus and GetExtrema
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py, AbstractObjectStock **)
always called from ListObjectStock, aadd **pointer to overide abstract base, but not used ...
ClassDef(CollectionObjectStock, 1)
virtual int DistancetoPrimitive(int px, int py, AbstractObjectStock **obj)
used for selection of object, for const need attention to the pointer
virtual void SetValues(UInt_t, std::vector< double > values, Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value=0)
implementeation of pure virtual in Abstract, need double here
virtual int DistancetoPrimitive(int px, int py, AbstractObjectStock **)
used for selection of object, for const need attention to the pointer
virtual std::vector< std::string > MakeStringForStatusBar(int px, int py) const
create the string for the StatusBar
virtual void SetParent(THStock *thstock)
different from AbstractObjectStock, broadcast to all, needed ? could set to himself as well ...
virtual std::vector< std::string > MakeStringForStatusBar(int px, int py) const
create the string for the StatusBar
virtual unsigned int GetSize() const
Abstract base class for the ListDataStock, for storing base pointers in vectors.
std::vector< double > fx
x coordinates, middle of the bin for painting
virtual void Paint(const Option_t *="")
Paint one candle.
virtual void SetValues(UInt_t bin, std::vector< double > values, Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value=0)
Set the values .
Define an abstract base class for all objects to be painted in a THStock.
std::vector< double > plvalues
virtual void Resize(unsigned int new_size)
std::vector< float > GetValues() const
return 1 one value in a vector used by MakeStringForStatus and GetExtrema
virtual void ClearObjectStock()
set kPaint to false, keep in memory
virtual void SetValues(UInt_t bin, std::vector< double > values, Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value=0)
virtual void Resize(unsigned int new_size)
virtual void SetValues(UInt_t bin, std::vector< double > values, Double_t xmin, Double_t xmax, time_t date, UInt_t opt_value=0)