4 #ifndef Gw_BaseLSPlayer
5 #define Gw_BaseLSPlayer
18 #ifndef Gw_LevelScheme
41 void ExecuteEvent(Int_t eventType, Int_t eventX, Int_t eventY);
47 void SetRange(Int_t ymin, Int_t ymax, Int_t xmin, Int_t xmax);
50 void SetY1(Double_t y1);
53 void SetY2(Double_t y2);
118 static void SetDefaultSize(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax) {
131 TString current =
"./";
152 static Float_t
GetXMin(Float_t xRmin, Float_t xRmax) {
return (xRmin*1.1 + 0.2*xRmax)/1.3; }
153 static Float_t
GetXMax(Float_t xRmin, Float_t xRmax) {
return (xRmin*0.1 + 1.2*xRmax)/1.3; }
155 static Float_t
GetYMin(Float_t yRmin, Float_t yRmax) {
return (yRmin*1.1 + 0.1*yRmax)/1.2; }
156 static Float_t
GetYMax(Float_t yRmin, Float_t yRmax) {
return (yRmin*0.1 + 1.1*yRmax)/1.2; }
159 static Float_t
GetXRmin(Float_t xmin, Float_t xmax) {
return xmin-0.2*(xmax-xmin); }
160 static Float_t
GetXRmax(Float_t xmin, Float_t xmax) {
return xmax+0.1*(xmax-xmin); }
162 static Float_t
GetYRmin(Float_t ymin, Float_t ymax) {
return ymin-0.1*(ymax-ymin); }
163 static Float_t
GetYRmax(Float_t ymin, Float_t ymax) {
return ymax+0.1*(ymax-ymin); }
169 static Float_t
GetXAxis(Float_t xmin, Float_t xmax) {
return xmin-(xmax-xmin)*0.1; }
172 Bool_t
Connect(TCanvas *c = 0x0);
178 void HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject* select);
205 virtual void Delete(Option_t* ) {
return;}
208 virtual void ShowGate(Option_t* =
"gate") {
return; }
229 virtual void Draw(Option_t *opt =
"");
244 virtual Int_t
ReadAGS(
const Char_t *filename, Option_t *opt =
"152Dy");
247 virtual Int_t
ReadENSDF(
const Char_t *, Option_t *);
257 virtual void SetLastXY(Int_t lastX, Int_t lastY) {fLastX = lastX; fLastY = lastY;}
259 virtual void Print(Option_t* )
const {
return;}
virtual Int_t CollectLevels(Option_t *o="")
Collect selected leveks.
TLatex & GetNameLatex()
to get Name latex object
TContextMenu * fContextMenu
ClassDef(BaseLSPlayer, 0)
log message
void SetY2(Double_t y2)
Set Y2.
static Float_t GetYMin(Float_t yRmin, Float_t yRmax)
virtual void PopupAddFirstLevel()
Popup AddFirstLevel menu.
virtual Bool_t IsDrawStyle(EDrawStyle style)
get style
virtual void SetTipText(TObject *select)
set text for tool tip info
A cascade is a list of links.
virtual void Select()
Select all objects.
static Float_t GetYMax(Float_t yRmin, Float_t yRmax)
Int_t GetLastY2Zoom() const
Get last zoom Y2.
virtual void DoStyle(EDrawStyle style)
do style
Cascade * fSelectedLevels
pointer to the selected links
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance to object.
Level * GetCurrentLevel()
Base class for a Log message.
EDrawStyle fDrawStyle
pointer on level scheme
static void SetDefaultWidth(Float_t width)
set default widths
virtual void DeSelect()
Deselect all objects.
virtual Int_t ReadAGS(const Char_t *filename, Option_t *opt="152Dy")
for backward compatibility
Cascade * GetCurrentCascade()
get current cascade
static Float_t GetXMin(Float_t xRmin, Float_t xRmax)
Get size from range.
virtual Int_t ImportLevelScheme(const Char_t *, Option_t *)
to init this level scheme from an existing formatted file (ENSDF, Radware ..)
Color_t fCColorSelectedLink
virtual void PopupWriteLS()
Popup write LS menu.
virtual void PopupDoProject()
Popup DoProject menu.
header file for GwLogMessage.cpp
virtual void ShowGate(Option_t *="gate")
Collect gates.
A link between two levels.
void HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject *select)
Handle Movement.
static Float_t * GetDefaultSize()
Get default size.
TList * fNucleiList
pointer to the selected levels
Cascade * GetCurrentCascade()
static Float_t GetYRmin(Float_t ymin, Float_t ymax)
virtual void PopupAddLevel()
Popup AddLevel menu.
virtual void Delete(Option_t *)
Intercept Delete.
static void SetDefaultSize(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax)
set default size for level scheme
static Int_t GetDefaultToggleColor()
get default color for axis toggle
Level * GetCurrentLevel()
get current level
static Float_t GetYRmax(Float_t ymin, Float_t ymax)
Bool_t Disconnect(TCanvas *c=0x0)
Connect the Canvas to this to collect events.
virtual LevelScheme * GetLevelScheme()
Get current liks.
static Float_t GetXRmax(Float_t xmin, Float_t xmax)
virtual void SetDrawStyle(EDrawStyle style)
set style
virtual Int_t CollectCascades(Option_t *o="")
Collect selected cascades.
static Float_t GetXAxis(Float_t xmin, Float_t xmax)
Get position of axis in X.
Bool_t Connect(TCanvas *c=0x0)
Connect the Canvas to this to collect events.
header file for a LevelScheme
static Float_t GetYLabels(Float_t ymin, Float_t ymax)
Get position of labels in Y.
Int_t GetLastX2Zoom() const
Get last zoom X2.
BaseLSPlayer(LevelScheme *levelScheme)
default constructor
void SetRange(Int_t ymin, Int_t ymax, Int_t xmin, Int_t xmax)
Set range axis.
virtual void SetLastXY(Int_t lastX, Int_t lastY)
void SetY1(Double_t y1)
Set Y1.
Int_t GetLastY1Zoom() const
Get last zoom Y1.
static Float_t GetXRmin(Float_t xmin, Float_t xmax)
Get range from size.
TList & GetLevelList()
to get the list of levels
virtual void PopupAddLink()
Popup AddLink menu.
virtual void DrawProjTot(Option_t *="")
Draw projection total.
Link * GetCurrentLink()
get current link
static void SetDefaultToggleColor(Int_t color)
set default color for axis toggle
virtual void Print(Option_t *) const
Print out.
virtual TString SetPathtoSaveLS(const char *)
change url. It returns the previous one
TList & GetCascadeList()
to get the list of cascades
LevelScheme * fLevelScheme
virtual void PopupAddGroundLevel()
Popup AddGroundLevel.
static Float_t fgDefaultSize[]
size of the level scheme per default
LSaxis extented class of TGaxis, allows zooming.
Int_t GetLastX1Zoom() const
Get last zoom X1.
TList * fSelectedCascades
pointer to the selected levels
void ExecuteEvent(Int_t eventType, Int_t eventX, Int_t eventY)
Handle Movement.
virtual Int_t CollectLinks(Option_t *o="")
Collect selected links.
static Float_t GetXMax(Float_t xRmin, Float_t xRmax)
virtual Int_t ReadENSDF(const Char_t *, Option_t *)
for backward compatibility
virtual const char * GetPathtoSaveLS() const
to get the path where to save the data
static Int_t fgDefaultToggleColor
default color of axis when toggle is on
static Float_t fgDefaultWidth
default width for level, box etc...
virtual void Draw(Option_t *opt="")
to draw this level scheme
BaseLSPlayer to work on level scheme.
static Float_t GetDefaultWidth()
Get default width.
virtual Cascade * GetSelectedLinks()
Get current links.
TList & GetLinkList()
to get the list of links
virtual Int_t GetLastX()
set/get fLastX/fLastY
Base class describing a general level.