//*-- Modified : v0.53 23/11/00 by D. Buskulic//*-- Author : Damir Buskulic 04/03/99//////////////////////////////////////////////////////////////////////////// //// VStyle //// //// Style options of a VEGA session, //// - time display options //// - since VStyle derives from TStyle, all TStyle options //// A global gVStyle is present, which replaces the standard ROOT gStyle //// adding the specific VEGA options. It should be used instead //// of gStyle in all VEGA sessions. //// ////////////////////////////////////////////////////////////////////////////
#include "VStyle.h"
VStyle* gVStyle;
Int_t gVEGAWarnings;
ClassImp(VStyle)
//______________________________________________________________________________VStyle::VStyle() : TStyle()
{
// VStyle constructorResetV();
}
//______________________________________________________________________________VStyle::VStyle(Text_t* name, Text_t* title) : TStyle(name, title)
{
// VStyle constructorgVStyle = this;
gStyle = this;
ResetV();
}
//______________________________________________________________________________VStyle::VStyle(const VStyle& vstyle)
{
// VStyle copy constructor
((VStyle&)vstyle).Copy(*this);
}
//______________________________________________________________________________VStyle::~VStyle()
{
// VStyle destructor
}
//______________________________________________________________________________voidVStyle::Copy(VStyle& obj)
{
TStyle::Copy((VStyle&)obj);
((VStyle&)obj).mTimeFormat = mTimeFormat;
((VStyle&)obj).mTimeUnit = mTimeUnit;
((VStyle&)obj).mStartTimeDisplay = mStartTimeDisplay;
((VStyle&)obj).mStartTimeFormat = mStartTimeFormat;
((VStyle&)obj).mStartTimeXOffset = mStartTimeXOffset;
((VStyle&)obj).mStartTimeYOffset = mStartTimeYOffset;
((VStyle&)obj).mAutoLogPlot = mAutoLogPlot;
}
//______________________________________________________________________________voidVStyle::ResetV()
{
// Reset to standard valuesmTimeFormat = "GPS";
mTimeUnit = "S";
mStartTimeDisplay = 1;
mStartTimeFormat = "localeur";
mStartTimeXOffset = 0.02;
mStartTimeYOffset = 0.02;
mAutoLogPlot = 1;
SetPadBottomMargin(0.115); // For VEGA, set bottom margin a little bigger
// for VEGA, set by default a pretty palette. It is the same as the ROOT one// except that "ultraviolet" and "infrared" are addedint ncolors = 100;
const Int_t NRGBs = 8;
Double_t Stops[NRGBs] = { 0.00, 0.07, 0.15, 0.35, 0.50, 0.70, 0.90, 1.00 };
Double_t Red[NRGBs] = { 0.20, 0.30, 0.00, 0.00, 0.00, 0.97, 0.97, 0.40 };
Double_t Green[NRGBs] = { 0.00, 0.04, 0.00, 0.97, 0.97, 0.97, 0.00, 0.00 };
Double_t Blue[NRGBs] = { 0.20, 0.30, 0.50, 0.97, 0.00, 0.00, 0.00, 0.00 };
TStyle::CreateGradientColorTable(NRGBs, Stops, Red, Green, Blue, ncolors);
#if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,2)
SetNumberContours(64);
#endif
}
//______________________________________________________________________________voidVStyle::SetTimeFormat(Text_t* fmt)
{
// Sets time format. Possible values are :// GPS all times will be expressed as GPS values// LOCALEUR all times will be expressed in the european manner DD/MM/YY HH:MM:SS:MilliS// local to the experiments location.// LOCALUS all times will be expressed in the anglosaxxon manner MM/DD/YY HH:MM:SS:MilliS AM (or PM)// local to the experiments location.// UNIEUR all times will be expressed as UTC in the european format// UNIUS all times will be expressed as UTC in the european anglosaxxon format// Any other format will be interpreted as a format string for the// standard C strftime function. See TAxis::SetTimeFormat//mTimeFormat = fmt;
}
//______________________________________________________________________________voidVStyle::SetStartTimeFormat(Text_t* fmt)
{
// Sets time format. Possible values are :// GPS all times will be expressed as GPS values// LOCALEUR all times will be expressed in the european manner DD/MM/YY HH:MM:SS:MilliS// local to the experiments location.// LOCALUS all times will be expressed in the anglosaxxon manner MM/DD/YY HH:MM:SS:MilliS AM (or PM)// local to the experiments location.// UNIEUR all times will be expressed as UTC in the european format// UNIUS all times will be expressed as UTC in the european anglosaxxon format// Any other format will be interpreted as a format string for the// standard C strftime function. See TAxis::SetTimeFormat//mStartTimeFormat = fmt;
}
//______________________________________________________________________________voidVStyle::SetTimeUnit(Text_t* unit)
{
// Sets time units, especially for plots. Allowed values are :// S all times will be expressed in seconds// M all times will be expressed in minutes// D all times will be expressed in daysBool_t fmtok = kFALSE;
if (!strcmp(unit,"S")) fmtok = kTRUE;
if (!strcmp(unit,"M")) fmtok = kTRUE;
if (!strcmp(unit,"D")) fmtok = kTRUE;
if (fmtok) {
mTimeUnit = unit;
} else {
Warning("SetTimeUnit","Not valid time unit (S, M or D), remains unchanged");
}
}
- ROOT page - VEGA page - Class index - Top of the page This page has been automatically generated. If you have any comments or suggestions
about the page layout send a mail to
, or
contact
with any questions or problems regarding ROOT or VEGA.