Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
TPadManipulator Class Reference

#include <TPadManipulator.h>

Classes

struct  Bounds
 
struct  Bounds3
 

Public Types

using Index = unsigned int
 
using LineVector = std::vector< TLine * >
 
using TObjVector = std::vector< TObject * >
 
using BoundsVector = std::vector< Bounds >
 
using Name = std::string
 
using NameVector = std::vector< Name >
 
using HistPtr = std::shared_ptr< TH1 >
 

Public Member Functions

 TPadManipulator ()
 
 TPadManipulator (TVirtualPad *ppad)
 
 TPadManipulator (Index wx, Index wy, Index nPadX=0, Index nPadY=0)
 
 TPadManipulator (const TPadManipulator &rhs)
 
TPadManipulatoroperator= (const TPadManipulator &rhs)
 
 ~TPadManipulator ()
 
double xmin () const
 
double xmax () const
 
double ymin () const
 
double ymax () const
 
double zmin () const
 
double zmax () const
 
TVirtualPad * pad () const
 
bool havePad () const
 
TCanvas * canvas () const
 
TCanvas * canvas (bool doDraw=false)
 
bool haveCanvas () const
 
int put (Name onam="tpad", TDirectory *tdir=nullptr) const
 
int write (Name fnam, Name onam="tpad") const
 
int printOnce (std::string fname)
 
int print (std::string fname, std::string spat="{,}")
 
TPadManipulatorprogenitor ()
 
unsigned int npad () const
 
TPadManipulatorman (unsigned int ipad=0)
 
TPadManipulatorparent ()
 
const TPadManipulatorparent () const
 
bool haveParent () const
 
TH1 * hist () const
 
bool haveHist () const
 
TGraph * graph () const
 
bool haveGraph () const
 
TObject * object () const
 
bool haveHistOrGraph () const
 
std::string drawOpt () const
 
const TObjVectorobjects () const
 
TObject * object (Index iobj) const
 
TH1 * getHist (unsigned int iobj)
 
const std::vector< std::string > & objOpts () const
 
TH1 * getHist (std::string hnam)
 
TObject * lastObject () const
 
int canvasPixelsX () const
 
int canvasPixelsY () const
 
double padPixelsX () const
 
double padPixelsY () const
 
TFrame * frame () const
 
bool haveFrame () const
 
int framePixelsX () const
 
int framePixelsY () const
 
TH1 * frameHist () const
 
bool haveFrameHist () const
 
void clearLineObjects ()
 
const LineVectorverticalModLines () const
 
int addPad (double x1, double y1, double x2, double y2, int icol=-1)
 
int split (Index nx, Index ny)
 
int split (Index nx)
 
int add (unsigned int ipad, TObject *pobj, std::string sopt="", bool replace=false)
 
int add (TObject *pobj, std::string sopt="", bool replace=false)
 
void setTExec (Name com)
 
const TExec & getTExec () const
 
void setPalette (int ipal)
 
void setMarginLeft (double xmar)
 
void setMarginRight (double xmar)
 
void setMarginBottom (double xmar)
 
void setMarginTop (double xmar)
 
void centerAxisTitles (bool center=true)
 
TLegend * addLegend (double x1, double y1, double x2, double y2)
 
TLegend * getLegend () const
 
int setTitle (std::string sttl, float height=-1.0)
 
std::string getTitle () const
 
int setLabel (std::string slab)
 
std::string getLabel () const
 
TLatex & getLabelObject ()
 
int clear ()
 
int update ()
 
TAxis * getXaxis () const
 
TAxis * getYaxis () const
 
TAxis * getZaxis () const
 
int setCanvasSize (int wx, int wy)
 
int setFillColor (int col)
 
int setFrameFillColor (int col)
 
int setGridX (bool flag=true)
 
int setGridY (bool flag=true)
 
int setGrid (bool flag=true)
 
int setLogX (bool flag=true)
 
int setLogY (bool flag=true)
 
int setLogZ (bool flag=true)
 
int setTickLength (double len)
 
int setTickLengthX (double len)
 
int setTickLengthY (double len)
 
int setNdivisionsX (int ndiv)
 
int setNdivisionsY (int ndiv)
 
int setLabelSizeX (double siz)
 
int setLabelSizeY (double siz)
 
int setTitleSize (double siz)
 
double getLabelSizeX () const
 
double getLabelSizeY () const
 
double getTitleSize () const
 
int setRangeX (double x1, double x2)
 
int setRangeY (double y1, double y2)
 
int setRangeZ (double y1, double y2)
 
int setRangeXY (double x1, double x2, double y1, double y2)
 
int setLogRangeX (double x1, double x2)
 
int setLogRangeY (double y1, double y2)
 
int setLogRangeZ (double y1, double y2)
 
int setTimeOffset (double toff)
 
int setTimeFormatX (std::string sfmt)
 
int setTimeFormatY (std::string sfmt)
 
int addAxis (bool flag=true)
 
int addAxisTop (bool flag=true)
 
int addAxisRight (bool flag=true)
 
int showUnderflow (bool show=true)
 
int showOverflow (bool show=true)
 
TH1 * flowHistogram ()
 
int showGraphOverflow (std::string sopt="BTLR", int imrk=38, int icol=1)
 
TGraph * flowGraph ()
 
int clearLines ()
 
int addVerticalLine (double xoff=0.0, double lenfrac=1.0, int isty=1)
 
int addHorizontalLine (double yoff=0.0, double lenfrac=1.0, int isty=1)
 
int addSlopedLine (double slop, double yoff=0.0, int isty=1)
 
int addVerticalModLines (double xmod, double xoff=0.0, double lenfrac=1.0, int isty=3)
 
int addHorizontalModLines (double ymod, double yoff=0.0, double lenfrac=1.0, int isty=3)
 
int setBinLabelsX (const NameVector &labs)
 
int setBinLabelsY (const NameVector &labs)
 
int addHistFun (unsigned int ifun=0)
 
int fixFrameFillColor ()
 
int draw ()
 
int erase ()
 
int redraw ()
 
int drawAxisTop ()
 
int drawAxisRight ()
 
int drawHistFuns ()
 
int drawLines ()
 
void Streamer (TBuffer &buf)
 

Static Public Member Functions

static TPadManipulatorget (Name onam="tpad", TDirectory *tdir=nullptr)
 
static TPadManipulatorread (Name fnam, Name onam="tpad")
 

Private Member Functions

void setParents (bool recurse)
 

Private Attributes

TPadManipulatorm_parent
 
TVirtualPad * m_ppad
 ==> Do not stream More...
 
int m_canvasWidth
 ==> Do not stream. More...
 
int m_canvasHeight
 
TExec m_exec
 
double m_marginLeft
 
double m_marginRight
 
double m_marginBottom
 
double m_marginTop
 
TH1 * m_ph
 
TGraph * m_pg
 
std::string m_dopt
 
TObjVector m_objs
 
std::vector< std::stringm_opts
 
Bounds3 m_setBounds
 
Bounds3 m_setBoundsLog
 
int m_fillColor
 
int m_frameFillColor
 
bool m_gridX
 
bool m_gridY
 
bool m_logX
 
bool m_logY
 
bool m_logZ
 
double m_tickLengthX
 
double m_tickLengthY
 
int m_ndivX
 
int m_ndivY
 
double m_labSizeX
 
double m_labSizeY
 
double m_ttlSize
 
TH1 * m_flowHist
 
bool m_showUnderflow
 ==> Do not stream. More...
 
bool m_showOverflow
 
TGraph * m_flowGraph
 
std::string m_gflowOpt
 ==> Do not stream. More...
 
int m_gflowMrk
 
int m_gflowCol
 
bool m_top
 
bool m_right
 
TLatex m_title
 
TLatex m_label
 
std::vector< unsigned int > m_histFuns
 
std::vector< double > m_hmlXmod
 
std::vector< double > m_hmlXoff
 
std::vector< int > m_hmlXStyle
 
std::vector< double > m_hmlXLength
 
std::vector< double > m_vmlXmod
 
std::vector< double > m_vmlXoff
 
std::vector< int > m_vmlXStyle
 
std::vector< double > m_vmlXLength
 
std::vector< double > m_slSlop
 
std::vector< double > m_slYoff
 
std::vector< int > m_slStyl
 
LineVector m_lines
 
NameVector m_binLabelsX
 ==> Do not stream. More...
 
NameVector m_binLabelsY
 
double m_timeOffset =0.0
 
std::string m_timeFormatX
 
std::string m_timeFormatY
 
BoundsVector m_subBounds
 
std::vector< TPadManipulatorm_subMans
 
Index m_iobjLegend
 
int m_axisTitleOpt
 

Detailed Description

Definition at line 39 of file TPadManipulator.h.

Member Typedef Documentation

Definition at line 64 of file TPadManipulator.h.

using TPadManipulator::HistPtr = std::shared_ptr<TH1>

Definition at line 67 of file TPadManipulator.h.

using TPadManipulator::Index = unsigned int

Definition at line 61 of file TPadManipulator.h.

Definition at line 62 of file TPadManipulator.h.

Definition at line 65 of file TPadManipulator.h.

Definition at line 66 of file TPadManipulator.h.

Definition at line 63 of file TPadManipulator.h.

Constructor & Destructor Documentation

TPadManipulator::TPadManipulator ( )

Definition at line 80 of file TPadManipulator.cxx.

81 : m_parent(nullptr), m_ppad(nullptr),
83  m_exec("myexec", ""),
84  m_marginLeft(-999), m_marginRight(-999),
85  m_marginBottom(-999), m_marginTop(-999),
86  m_ph(nullptr),
87  m_pg(nullptr),
89  m_gridX(false), m_gridY(false),
90  m_logX(false), m_logY(false), m_logZ(false),
91  m_tickLengthX(0.03), m_tickLengthY(0.0),
92  m_ndivX(0), m_ndivY(0),
93  m_labSizeX(0.0), m_labSizeY(0.0), m_ttlSize(0.0),
94  m_flowHist(nullptr),
95  m_showUnderflow(false), m_showOverflow(false),
96  m_flowGraph(nullptr),
97  m_gflowMrk(0), m_gflowCol(0),
98  m_top(false), m_right(false), m_iobjLegend(0),
99  m_axisTitleOpt(0) {
100  const string myname = "TPadManipulator::ctor: ";
101  if ( dbg ) cout << myname << this << endl;
102  m_label.SetNDC();
103  m_label.SetX(0.01);
104  m_label.SetY(0.02);
105  m_label.SetTextFont(42);
106  m_label.SetTextSize(0.035);
107 }
TPadManipulator * m_parent
bool dbg
int m_canvasWidth
==> Do not stream.
TVirtualPad * m_ppad
==> Do not stream
bool m_showUnderflow
==> Do not stream.
QTextStream & endl(QTextStream &s)
TPadManipulator::TPadManipulator ( TVirtualPad *  ppad)

Definition at line 111 of file TPadManipulator.cxx.

112 : TPadManipulator() {
113  const string myname = "TPadManipulator::ctor(pad): ";
114  cout << myname << "Not implemented--will copy objects from pad." << endl;
115  if ( dbg ) cout << myname << this << endl;
116 }
bool dbg
QTextStream & endl(QTextStream &s)
TPadManipulator::TPadManipulator ( Index  wx,
Index  wy,
Index  nPadX = 0,
Index  nPadY = 0 
)

Definition at line 120 of file TPadManipulator.cxx.

121 : TPadManipulator() {
122  m_canvasWidth = wx;
123  m_canvasHeight = wy;
124  Index nx = nPadX;
125  Index ny = nPadY > 0 ? nPadY : nx;
126  if ( nx ) split(nx, ny);
127 }
int m_canvasWidth
==> Do not stream.
int split(Index nx, Index ny)
unsigned int Index
TPadManipulator::TPadManipulator ( const TPadManipulator rhs)

Definition at line 131 of file TPadManipulator.cxx.

132 : TPadManipulator() {
133  *this = rhs;
134 }
TPadManipulator::~TPadManipulator ( )

Definition at line 228 of file TPadManipulator.cxx.

228  {
229  //cout << "Destroying manipulator " << this << " with pad " << m_ppad
230  // << " and parent " << m_parent << endl;
231  if ( m_ppad != nullptr && m_parent == nullptr ) {
232  // May 2020: If the pad is not in the Root list of canvases, then it may
233  // be that Root has already deleted it.
234  if ( gROOT->GetListOfCanvases()->IndexOf(m_ppad) >= 0 ) {
235  m_ppad->Close();
236  gSystem->ProcessEvents();
237  delete m_ppad;
238  m_ppad = nullptr;
239  }
240  }
241  for ( TObject* pobj : m_objs ) delete pobj;
242  m_objs.clear();
244 }
TPadManipulator * m_parent
TVirtualPad * m_ppad
==> Do not stream

Member Function Documentation

int TPadManipulator::add ( unsigned int  ipad,
TObject *  pobj,
std::string  sopt = "",
bool  replace = false 
)

Definition at line 590 of file TPadManipulator.cxx.

590  {
591  const string myname = "TPadManipulator::add: ";
592  if ( dbg ) cout << myname << this << endl;
593  if ( pobj == nullptr ) return 101;
594  TPadManipulator* pman = man(ipad);
595  if ( pman == nullptr ) return 102;
596  TH1* ph = dynamic_cast<TH1*>(pobj);
597  TGraph* pg = dynamic_cast<TGraph*>(pobj);
598  bool isNotHistOrGraph = ph==nullptr && pg==nullptr;
599  // If we already have the primary histogram or graph, or this is not one of those,
600  // this is an overlaid object.
601  if ( (!replace && haveHistOrGraph()) || isNotHistOrGraph ) {
602  TObject* pobjc = pobj->Clone();
603  TH1* phc = dynamic_cast<TH1*>(pobjc);
604  if ( phc != nullptr ) phc->SetDirectory(nullptr);
605  m_objs.push_back(pobjc);
606  m_opts.push_back(sopt);
607  // Otherwise, the passed object becomes the primary object and must be
608  // a histogram or graph.
609  } else {
610  if ( ph == nullptr && pg == nullptr ) return 103;
611  if ( pman->hist() != nullptr ) {
612  if ( replace ) delete pman->m_ph;
613  else return 104;
614  }
615  if ( pman->graph() != nullptr ) {
616  if ( replace ) delete pman->m_pg;
617  else return 105;
618  }
619  //if ( m_ppad == nullptr ) return 106;
620  // Transfer the hist/graph title to the pad title.
621  pman->setTitle(pobj->GetTitle());
622  // Clone the primary object.
623  if ( ph != nullptr ) {
624  TH1* phc = (TH1*) ph->Clone();
625  phc->SetDirectory(nullptr);
626  phc->SetTitle("");
627  pman->m_ph = phc;
628  pman->m_dopt = sopt;
629  } else {
630  TGraph* pgc = (TGraph*) pg->Clone();
631  pgc->SetTitle("");
632  pman->m_pg = pgc;
633  string soptOut;
634  for ( Index ipos=0; ipos<sopt.size(); ++ipos ) {
635  char ch = sopt[ipos];
636  if ( ch == 'a' || ch == 'A' ) {
637  cout << myname << "WARNING: Dropping \"" << ch << "\" from drawing option string for graph "
638  << pgc->GetName() << "." << endl;
639  } else {
640  soptOut += ch;
641  }
642  }
643  pman->m_dopt = soptOut;
644  }
645  }
646  return update();
647 }
bool dbg
bool haveHistOrGraph() const
unsigned int Index
TH1 * hist() const
int setTitle(std::string sttl, float height=-1.0)
TPadManipulator * man(unsigned int ipad=0)
TGraph * graph() const
std::vector< std::string > m_opts
std::string m_dopt
QTextStream & endl(QTextStream &s)
int TPadManipulator::add ( TObject *  pobj,
std::string  sopt = "",
bool  replace = false 
)

Definition at line 651 of file TPadManipulator.cxx.

651  {
652  return add(0, pobj, sopt, replace);
653 }
int add(unsigned int ipad, TObject *pobj, std::string sopt="", bool replace=false)
int TPadManipulator::addAxis ( bool  flag = true)

Definition at line 1265 of file TPadManipulator.cxx.

1265  {
1266  return addAxisTop(flag) + addAxisRight(flag);
1267 }
int addAxisRight(bool flag=true)
int addAxisTop(bool flag=true)
int TPadManipulator::addAxisRight ( bool  flag = true)

Definition at line 1278 of file TPadManipulator.cxx.

1278  {
1279  m_right = flag;
1280  return update();
1281 }
int TPadManipulator::addAxisTop ( bool  flag = true)

Definition at line 1271 of file TPadManipulator.cxx.

1271  {
1272  m_top = flag;
1273  return update();
1274 }
int TPadManipulator::addHistFun ( unsigned int  ifun = 0)

Definition at line 1285 of file TPadManipulator.cxx.

1285  {
1286  m_histFuns.push_back(ifun);
1287  return update();
1288 }
std::vector< unsigned int > m_histFuns
int TPadManipulator::addHorizontalLine ( double  yoff = 0.0,
double  lenfrac = 1.0,
int  isty = 1 
)

Definition at line 1342 of file TPadManipulator.cxx.

1342  {
1343  m_hmlXmod.push_back(0.0);
1344  m_hmlXoff.push_back(xoff);
1345  m_hmlXStyle.push_back(isty);
1346  m_hmlXLength.push_back(lenfrac);
1347  drawLines();
1348  return 0;
1349 }
std::vector< double > m_hmlXoff
std::vector< int > m_hmlXStyle
std::vector< double > m_hmlXLength
std::vector< double > m_hmlXmod
int TPadManipulator::addHorizontalModLines ( double  ymod,
double  yoff = 0.0,
double  lenfrac = 1.0,
int  isty = 3 
)

Definition at line 1372 of file TPadManipulator.cxx.

1372  {
1373  m_hmlXmod.push_back(xmod);
1374  m_hmlXoff.push_back(xoff);
1375  m_hmlXStyle.push_back(isty);
1376  m_hmlXLength.push_back(lenfrac);
1377  drawLines();
1378  return 0;
1379 }
std::vector< double > m_hmlXoff
std::vector< int > m_hmlXStyle
std::vector< double > m_hmlXLength
std::vector< double > m_hmlXmod
TLegend * TPadManipulator::addLegend ( double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 657 of file TPadManipulator.cxx.

657  {
658  TLegend leg(x1, y1, x2, y2);
659  add(0, &leg, "");
660  TLegend* pleg = dynamic_cast<TLegend*>(objects().back());
661  m_iobjLegend = objects().size() - 1;
662  pleg->SetBorderSize(0);
663  pleg->SetFillStyle(0);
664  return pleg;
665 }
int add(unsigned int ipad, TObject *pobj, std::string sopt="", bool replace=false)
const TObjVector & objects() const
int TPadManipulator::addPad ( double  x1,
double  y1,
double  x2,
double  y2,
int  icol = -1 
)

Definition at line 534 of file TPadManipulator.cxx.

534  {
535  if ( x2 <= x1 ) return 1;
536  if ( y2 <= y1 ) return 2;
537  if ( x1 < 0.0 ) return 3;
538  if ( x2 > 1.0 ) return 4;
539  if ( y1 < 0.0 ) return 5;
540  if ( y2 > 1.0 ) return 6;
541  m_subBounds.emplace_back(x1, y1, x2, y2);
542  m_subMans.emplace_back();
543  m_subMans.back().m_parent = this;
544  return 0;
545 }
BoundsVector m_subBounds
std::vector< TPadManipulator > m_subMans
int TPadManipulator::addSlopedLine ( double  slop,
double  yoff = 0.0,
int  isty = 1 
)

Definition at line 1352 of file TPadManipulator.cxx.

1352  {
1353  m_slSlop.push_back(slop);
1354  m_slYoff.push_back(yoff);
1355  m_slStyl.push_back(isty);
1356  drawLines();
1357  return 0;
1358 }
std::vector< double > m_slYoff
std::vector< double > m_slSlop
std::vector< int > m_slStyl
int TPadManipulator::addVerticalLine ( double  xoff = 0.0,
double  lenfrac = 1.0,
int  isty = 1 
)

Definition at line 1333 of file TPadManipulator.cxx.

1333  {
1334  m_vmlXmod.push_back(0.0);
1335  m_vmlXoff.push_back(xoff);
1336  m_vmlXStyle.push_back(isty);
1337  m_vmlXLength.push_back(lenfrac);
1338  return update();
1339 }
std::vector< double > m_vmlXLength
std::vector< double > m_vmlXmod
std::vector< double > m_vmlXoff
std::vector< int > m_vmlXStyle
int TPadManipulator::addVerticalModLines ( double  xmod,
double  xoff = 0.0,
double  lenfrac = 1.0,
int  isty = 3 
)

Definition at line 1361 of file TPadManipulator.cxx.

1361  {
1362  m_vmlXmod.push_back(xmod);
1363  m_vmlXoff.push_back(xoff);
1364  m_vmlXStyle.push_back(isty);
1365  m_vmlXLength.push_back(lenfrac);
1366  drawLines();
1367  return 0;
1368 }
std::vector< double > m_vmlXLength
std::vector< double > m_vmlXmod
std::vector< double > m_vmlXoff
std::vector< int > m_vmlXStyle
TCanvas * TPadManipulator::canvas ( ) const

Definition at line 316 of file TPadManipulator.cxx.

316  {
317  if ( m_parent ) return m_parent->canvas();
318  return dynamic_cast<TCanvas*>(m_ppad);
319 }
TPadManipulator * m_parent
TCanvas * canvas() const
TVirtualPad * m_ppad
==> Do not stream
TCanvas * TPadManipulator::canvas ( bool  doDraw = false)

Definition at line 323 of file TPadManipulator.cxx.

323  {
324  if ( m_parent ) return m_parent->canvas(doDraw);
325  if ( m_ppad == nullptr && doDraw ) draw();
326  return dynamic_cast<TCanvas*>(m_ppad);
327 }
TPadManipulator * m_parent
TCanvas * canvas() const
TVirtualPad * m_ppad
==> Do not stream
int TPadManipulator::canvasPixelsX ( ) const

Definition at line 472 of file TPadManipulator.cxx.

472  {
473  if ( ! haveCanvas() ) return 0;
474  return canvas()->GetWw();
475 }
bool haveCanvas() const
TCanvas * canvas() const
int TPadManipulator::canvasPixelsY ( ) const

Definition at line 479 of file TPadManipulator.cxx.

479  {
480  if ( ! haveCanvas() ) return 0;
481  return canvas()->GetWh();
482 }
bool haveCanvas() const
TCanvas * canvas() const
void TPadManipulator::centerAxisTitles ( bool  center = true)
inline

Definition at line 241 of file TPadManipulator.h.

241 { m_axisTitleOpt = center; }
def center(depos, point)
Definition: depos.py:117
int TPadManipulator::clear ( )

Definition at line 695 of file TPadManipulator.cxx.

695  {
696  delete m_ph;
697  m_ph = nullptr;
698  delete m_pg;
699  m_pg = nullptr;
700  if ( pad() != nullptr && npad() == 0 ) pad()->Clear();
701  for ( TPadManipulator& man : m_subMans ) man.clear();
702  return 0;
703 }
unsigned int npad() const
TPadManipulator * man(unsigned int ipad=0)
std::vector< TPadManipulator > m_subMans
TVirtualPad * pad() const
void TPadManipulator::clearLineObjects ( )

Definition at line 527 of file TPadManipulator.cxx.

527  {
528  for ( TLine* pline : m_lines ) delete pline;
529  m_lines.clear();
530 }
LineVector m_lines
int TPadManipulator::clearLines ( )

Definition at line 1319 of file TPadManipulator.cxx.

1319  {
1320  m_vmlXmod.clear();
1321  m_vmlXoff.clear();
1322  m_vmlXStyle.clear();
1323  m_vmlXLength.clear();
1324  m_hmlXmod.clear();
1325  m_hmlXoff.clear();
1326  m_hmlXStyle.clear();
1327  m_hmlXLength.clear();
1328  return update();
1329 }
std::vector< double > m_vmlXLength
std::vector< double > m_hmlXoff
std::vector< int > m_hmlXStyle
std::vector< double > m_vmlXmod
std::vector< double > m_vmlXoff
std::vector< int > m_vmlXStyle
std::vector< double > m_hmlXLength
std::vector< double > m_hmlXmod
int TPadManipulator::draw ( )

Definition at line 1405 of file TPadManipulator.cxx.

1405  {
1406  if ( haveParent() ) return parent()->draw();
1407  if ( m_ppad == nullptr ) {
1408  if ( ! haveHistOrGraph() && npad() == 0 ) return 1;
1409  TCanvas* pcan = new TCanvas;
1410  if ( m_canvasWidth > 0 && m_canvasHeight > 0 ) {
1411  string snam = pcan->GetName();
1412  string sttl = pcan->GetTitle();
1413  delete pcan;
1414  pcan = new TCanvas(snam.c_str(), sttl.c_str(), m_canvasWidth, m_canvasHeight);
1415  //pcan->SetCanvasSize(m_canvasWidth, m_canvasHeight);
1416  //pcan->SetWindowSize(m_canvasWidth, m_canvasHeight);
1417  }
1418  m_ppad = pcan;
1419  }
1420  return update();
1421 }
TPadManipulator * parent()
int m_canvasWidth
==> Do not stream.
bool haveHistOrGraph() const
TVirtualPad * m_ppad
==> Do not stream
unsigned int npad() const
bool haveParent() const
int TPadManipulator::drawAxisRight ( )

Definition at line 1496 of file TPadManipulator.cxx.

1496  {
1497  if ( ! m_right ) return 0;
1498  if ( m_ppad == nullptr ) return 1;
1499  TVirtualPad* pPadSave = gPad;
1500  m_ppad->cd();
1501  double xminPad, yminPad, xmaxPad, ymaxPad;
1502  m_ppad->GetRangeAxis(xminPad, yminPad, xmaxPad, ymaxPad);
1503  double y1 = ymin();
1504  double y2 = ymax();
1505  string sopt = "+US";
1506  if ( m_ppad->GetLogx() ) {
1507  xminPad = pow(10.0, xminPad);
1508  xmaxPad = pow(10.0, xmaxPad);
1509  }
1510  if ( m_ppad->GetLogy() ) {
1511  yminPad = pow(10.0, yminPad);
1512  ymaxPad = pow(10.0, ymaxPad);
1513  sopt += "G";
1514  }
1515  TAxis* paxold = getYaxis();
1516  if ( paxold == 0 ) return 2;
1517  double ticksize = paxold->GetTickLength();
1518  int ndiv = paxold->GetNdivisions();
1519  TGaxis* paxnew = new TGaxis(xmaxPad, yminPad, xmaxPad, ymaxPad,
1520  y1, y2, ndiv, sopt.c_str());
1521  if ( ticksize > 0 ) paxnew->SetTickLength(ticksize);
1522  string name = "RightAxis";
1523  paxnew->SetName(name.c_str());
1524  TList* pobjs = m_ppad->GetListOfPrimitives();
1525  for ( int iobj=pobjs->GetEntries()-1; iobj>=0; --iobj ) {
1526  TGaxis* paxold = dynamic_cast<TGaxis*>(pobjs->At(iobj));
1527  if ( paxold == nullptr ) continue;
1528  if ( paxold->GetName() == name ) {
1529  pobjs->RemoveAt(iobj);
1530  break;
1531  }
1532  }
1533  paxnew->Draw("");
1534  gPad = pPadSave;
1535  return 0;
1536 }
static QCString name
Definition: declinfo.cpp:673
TAxis * getYaxis() const
double ymin() const
constexpr T pow(T x)
Definition: pow.h:72
TVirtualPad * m_ppad
==> Do not stream
double ymax() const
int TPadManipulator::drawAxisTop ( )

Definition at line 1443 of file TPadManipulator.cxx.

1443  {
1444  if ( ! m_top ) return 0;
1445  if ( m_ppad == nullptr ) return 1;
1446  TVirtualPad* pPadSave = gPad;
1447  m_ppad->cd();
1448  double xminPad, yminPad, xmaxPad, ymaxPad;
1449  m_ppad->GetRangeAxis(xminPad, yminPad, xmaxPad, ymaxPad);
1450  string sopt = "-US";
1451  double x1 = xmin();
1452  double x2 = xmax();
1453  if ( m_ppad->GetLogx() ) {
1454  xminPad = pow(10.0, xminPad);
1455  xmaxPad = pow(10.0, xmaxPad);
1456  x1 = pow(10.0, x1);
1457  x2 = pow(10.0, x2);
1458  sopt += "G";
1459  }
1460  if ( m_ppad->GetLogy() ) {
1461  yminPad = pow(10.0, yminPad);
1462  ymaxPad = pow(10.0, ymaxPad);
1463  }
1464  TAxis* paxold = getXaxis();
1465  if ( paxold == 0 ) return 2;
1466  double ticksize = paxold->GetTickLength();
1467  int ndiv = paxold->GetNdivisions();
1468  TGaxis* paxnew = new TGaxis(xminPad, ymaxPad, xmaxPad, ymaxPad,
1469  x1, x2, ndiv, sopt.c_str());
1470  if ( ticksize > 0 ) paxnew->SetTickLength(ticksize);
1471  string name = "TopAxis";
1472  paxnew->SetName(name.c_str());
1473  TList* pobjs = m_ppad->GetListOfPrimitives();
1474  for ( int iobj=pobjs->GetEntries()-1; iobj>=0; --iobj ) {
1475  TGaxis* paxold = dynamic_cast<TGaxis*>(pobjs->At(iobj));
1476  if ( paxold == nullptr ) continue;
1477  if ( paxold->GetName() == name ) {
1478  pobjs->RemoveAt(iobj);
1479  break;
1480  }
1481  }
1482  if ( m_timeFormatX.size() ) {
1483  //paxnew->SetTimeDisplay(1);
1484  paxnew->SetTimeFormat(m_timeFormatX.c_str());
1485  paxnew->SetTimeOffset(m_timeOffset, "gmt");
1486  } else {
1487  //paxnew->SetTimeDisplay(0);
1488  }
1489  paxnew->Draw();
1490  gPad = pPadSave;
1491  return 0;
1492 }
static QCString name
Definition: declinfo.cpp:673
double xmax() const
constexpr T pow(T x)
Definition: pow.h:72
TVirtualPad * m_ppad
==> Do not stream
TAxis * getXaxis() const
double xmin() const
std::string m_timeFormatX
int TPadManipulator::drawHistFuns ( )

Definition at line 1540 of file TPadManipulator.cxx.

1540  {
1541  if ( m_ppad == nullptr ) return 1;
1542  const TList* pfuns = nullptr;
1543  if ( haveHist() ) pfuns = hist()->GetListOfFunctions();
1544  else if ( m_pg != nullptr ) pfuns = m_pg->GetListOfFunctions();
1545  else return 1;
1546  const TList& funs = *pfuns;
1547  unsigned int nfun = funs.GetEntries();
1548  TVirtualPad* pPadSave = gPad;
1549  m_ppad->cd();
1550  for ( unsigned int ifun : m_histFuns ) {
1551  if ( ifun >= nfun ) continue;
1552  TF1* pfun = dynamic_cast<TF1*>(funs.At(ifun));
1553  if ( pfun != nullptr ) pfun->Draw("same");
1554  }
1555  gPad = pPadSave;
1556  return 0;
1557 }
std::vector< unsigned int > m_histFuns
bool haveHist() const
TVirtualPad * m_ppad
==> Do not stream
TH1 * hist() const
int TPadManipulator::drawLines ( )

Definition at line 1561 of file TPadManipulator.cxx.

1561  {
1562  if ( m_ppad == nullptr ) return 1;
1563  TVirtualPad* pPadSave = gPad;
1564  m_ppad->cd();
1565  clearLineObjects();
1566  for ( Index iset=0; iset<m_vmlXmod.size(); ++iset ) {
1567  double xmod = m_vmlXmod[iset];
1568  double xoff = m_vmlXoff[iset];
1569  double xlen = m_vmlXLength[iset];
1570  int isty = m_vmlXStyle[iset];
1571  if ( xmod < 0.0 ) continue;
1572  double x = xoff;
1573  if ( xmod > 0.0 ) {
1574  while ( x >= xmin() ) x -= xmod;
1575  while ( x < xmin() ) x += xmod;
1576  }
1577  double ytop = ymax() + (xlen - 1.0)*(ymax() - ymin());
1578  while ( x <= xmax() ) {
1579  TLine* pline = new TLine(x, ymin(), x, ytop);
1580  pline->SetLineStyle(isty);
1581  m_lines.push_back(pline);
1582  pline->Draw();
1583  if ( xmod == 0.0 ) break;
1584  x += xmod;
1585  }
1586  }
1587  for ( Index iset=0; iset<m_hmlXmod.size(); ++iset ) {
1588  double ymod = m_hmlXmod[iset];
1589  double yoff = m_hmlXoff[iset];
1590  double ylen = m_hmlXLength[iset];
1591  int isty = m_hmlXStyle[iset];
1592  if ( ymod < 0.0 ) continue;
1593  double y = yoff;
1594  if ( ymod > 0.0 ) {
1595  while ( y >= ymin() ) y -= ymod;
1596  while ( y < ymin() ) y += ymod;
1597  }
1598  double xtop = xmax() + (ylen - 1.0)*(xmax() - xmin());
1599  while ( y <= ymax() ) {
1600  TLine* pline = new TLine(xmin(), y, xtop, y);
1601  pline->SetLineStyle(isty);
1602  m_lines.push_back(pline);
1603  pline->Draw();
1604  if ( ymod == 0.0 ) break;
1605  y += ymod;
1606  }
1607  }
1608  for ( Index iset=0; iset<m_slSlop.size(); ++iset ) {
1609  double slop = m_slSlop[iset];
1610  double yoff = m_slYoff[iset];
1611  double isty = m_slStyl[iset];
1612  double wx = xmax() - xmin();
1613  double wy = ymax() - ymin();
1614  if ( wx < 0.0 || wy < 0.0 ) continue;
1615  double xlef = xmin();
1616  double xrig = xmax();
1617  double ybot = ymin();
1618  double ytop = ymax();
1619  double ylef = slop*xlef + yoff;
1620  double yrig = slop*xrig + yoff;
1621  double xbot = slop == 0.0 ? xmin() - wx : (ybot - yoff)/slop;
1622  double xtop = slop == 0.0 ? xmax() + wx : (ytop - yoff)/slop;
1623  double x1 = 0.0;
1624  double y1 = 0.0;
1625  if ( ylef > ybot && ylef < ytop ) {
1626  x1 = xlef;
1627  y1 = ylef;
1628  } else if ( ylef <= ybot && slop > 0.0 && xbot < xrig ) {
1629  x1 = xbot;
1630  y1 = ybot;
1631  } else if ( ylef >= ytop && slop < 0.0 && xtop < xrig ) {
1632  x1 = xtop;
1633  y1 = ytop;
1634  } else {
1635  continue;
1636  }
1637  double x2 = 0.0;
1638  double y2 = 0.0;
1639  if ( slop > 0.0 && xtop < xrig ) {
1640  x2 = xtop;
1641  y2 = ytop;
1642  } else if ( slop < 0.0 && xbot < xrig ) {
1643  x2 = xbot;
1644  y2 = ybot;
1645  } else {
1646  x2 = xrig;
1647  y2 = yrig;
1648  }
1649  TLine* pline = new TLine(x1, y1, x2, y2);
1650  pline->SetLineStyle(isty);
1651  m_lines.push_back(pline);
1652  pline->Draw();
1653  }
1654  gPad = pPadSave;
1655  return 0;
1656 }
std::vector< double > m_vmlXLength
std::vector< double > m_hmlXoff
double xmax() const
double ymin() const
LineVector m_lines
std::vector< int > m_hmlXStyle
std::vector< double > m_vmlXmod
unsigned int Index
TVirtualPad * m_ppad
==> Do not stream
std::vector< double > m_slYoff
std::vector< double > m_vmlXoff
double xmin() const
std::vector< int > m_vmlXStyle
std::vector< double > m_hmlXLength
std::vector< double > m_slSlop
double ymax() const
std::vector< int > m_slStyl
list x
Definition: train.py:276
std::vector< double > m_hmlXmod
std::string TPadManipulator::drawOpt ( ) const
inline

Definition at line 167 of file TPadManipulator.h.

167 { return m_dopt; }
std::string m_dopt
int TPadManipulator::erase ( )

Definition at line 1425 of file TPadManipulator.cxx.

1425  {
1426  if ( haveParent() ) return parent()->erase();
1427  if ( m_ppad == nullptr ) return 0;
1428  delete m_ppad;
1429  m_ppad = nullptr;
1430  return 0;
1431 }
TPadManipulator * parent()
TVirtualPad * m_ppad
==> Do not stream
bool haveParent() const
int TPadManipulator::fixFrameFillColor ( )

Definition at line 1397 of file TPadManipulator.cxx.

1397  {
1398  if ( gStyle == nullptr ) return 2;
1399  m_ppad->SetFrameFillColor(gStyle->GetColorPalette(0));
1400  return 0;
1401 }
TVirtualPad * m_ppad
==> Do not stream
TGraph* TPadManipulator::flowGraph ( )
inline

Definition at line 362 of file TPadManipulator.h.

362 { return m_flowGraph; }
TH1* TPadManipulator::flowHistogram ( )
inline

Definition at line 353 of file TPadManipulator.h.

353 { return m_flowHist; }
TFrame * TPadManipulator::frame ( ) const

Definition at line 502 of file TPadManipulator.cxx.

502  {
503  return havePad() ? pad()->GetFrame() : nullptr;
504 }
bool havePad() const
TVirtualPad * pad() const
TH1 * TPadManipulator::frameHist ( ) const

Definition at line 520 of file TPadManipulator.cxx.

520  {
521  if ( ! havePad() ) return nullptr;
522  return dynamic_cast<TH1*>(pad()->FindObject("hframe"));
523 }
bool havePad() const
TVirtualPad * pad() const
int TPadManipulator::framePixelsX ( ) const

Definition at line 508 of file TPadManipulator.cxx.

508  {
509  return haveFrame() ? frame()->GetBBox().fWidth : 0;
510 }
TFrame * frame() const
bool haveFrame() const
int TPadManipulator::framePixelsY ( ) const

Definition at line 514 of file TPadManipulator.cxx.

514  {
515  return haveFrame() ? frame()->GetBBox().fHeight : 0;
516 }
TFrame * frame() const
bool haveFrame() const
TPadManipulator * TPadManipulator::get ( Name  onam = "tpad",
TDirectory *  tdir = nullptr 
)
static

Definition at line 49 of file TPadManipulator.cxx.

49  {
50  Name myname = "TPadManipulator::get: ";
51  TPadManipulator* ppad = nullptr;
52  TDirectory* pdir = tdir == nullptr ? gDirectory : tdir;
53  if ( pdir == nullptr ) {
54  cout << myname << "ERROR: Root directory not found." << endl;
55  return ppad;
56  }
57  pdir->GetObject(onam.c_str(), ppad);
58  return ppad;
59 }
ChannelGroupService::Name Name
QTextStream & endl(QTextStream &s)
TH1 * TPadManipulator::getHist ( unsigned int  iobj)

Definition at line 445 of file TPadManipulator.cxx.

445  {
446  if ( iobj >= objects().size() ) return nullptr;
447  return dynamic_cast<TH1*>(objects()[iobj]);
448 }
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
const TObjVector & objects() const
TH1 * TPadManipulator::getHist ( std::string  hnam)

Definition at line 460 of file TPadManipulator.cxx.

460  {
461  if ( hist() != nullptr && hist()->GetName() == hnam ) return hist();
462  for ( TObject* pobj : objects() ) {
463  TH1* ph = dynamic_cast<TH1*>(pobj);
464  if ( ph == nullptr ) continue;
465  if ( ph->GetName() == hnam ) return ph;
466  }
467  return nullptr;
468 }
TH1 * hist() const
const TObjVector & objects() const
std::string TPadManipulator::getLabel ( ) const
inline

Definition at line 261 of file TPadManipulator.h.

261 { return m_label.GetTitle(); }
TLatex& TPadManipulator::getLabelObject ( )
inline

Definition at line 262 of file TPadManipulator.h.

262 { return m_label; }
double TPadManipulator::getLabelSizeX ( ) const

Definition at line 1144 of file TPadManipulator.cxx.

1144  {
1145  if ( m_labSizeX ) return m_labSizeX;
1146  if ( haveParent() ) {
1147  const TPadManipulator* pman = parent();
1148  double h1 = padPixelsY();
1149  double h2 = pman->padPixelsY();
1150  double h = h1 ? h2/h1*pman->getLabelSizeX() : 0.0;
1151  return h;
1152  }
1153  return 0.0;
1154 }
TPadManipulator * parent()
double getLabelSizeX() const
double padPixelsY() const
bool haveParent() const
double TPadManipulator::getLabelSizeY ( ) const

Definition at line 1158 of file TPadManipulator.cxx.

1158  {
1159  if ( m_labSizeY ) return m_labSizeY;
1160  if ( haveParent() ) {
1161  const TPadManipulator* pman = parent();
1162  double h1 = padPixelsY();
1163  double h2 = pman->padPixelsY();
1164  double h = h1 ? h2/h1*pman->getLabelSizeY() : 0.0;
1165  return h;
1166  }
1167  return 0.0;
1168 }
TPadManipulator * parent()
double padPixelsY() const
bool haveParent() const
double getLabelSizeY() const
TLegend* TPadManipulator::getLegend ( ) const
inline

Definition at line 248 of file TPadManipulator.h.

248 { return dynamic_cast<TLegend*>(object(m_iobjLegend)); }
TObject * object() const
const TExec& TPadManipulator::getTExec ( ) const
inline

Definition at line 222 of file TPadManipulator.h.

222 { return m_exec; }
std::string TPadManipulator::getTitle ( ) const
inline

Definition at line 255 of file TPadManipulator.h.

255 { return m_title.GetTitle(); }
double TPadManipulator::getTitleSize ( ) const

Definition at line 1172 of file TPadManipulator.cxx.

1172  {
1173  if ( m_ttlSize ) return m_ttlSize;
1174  if ( haveParent() ) {
1175  const TPadManipulator* pman = parent();
1176  double h1 = padPixelsY();
1177  double h2 = pman->padPixelsY();
1178  double h = h1 ? h2/h1*pman->getTitleSize() : 0.0;
1179  return h;
1180  }
1181  return 0.0;
1182 }
TPadManipulator * parent()
double getTitleSize() const
double padPixelsY() const
bool haveParent() const
TAxis * TPadManipulator::getXaxis ( ) const

Definition at line 1105 of file TPadManipulator.cxx.

1105  {
1106  if ( haveFrameHist() ) return frameHist()->GetXaxis();
1107  if ( hist() != nullptr ) return hist()->GetXaxis();
1108  if ( m_pg != nullptr ) return m_pg->GetXaxis();
1109  return nullptr;
1110 }
TH1 * frameHist() const
TH1 * hist() const
bool haveFrameHist() const
TAxis * TPadManipulator::getYaxis ( ) const

Definition at line 1114 of file TPadManipulator.cxx.

1114  {
1115  if ( haveFrameHist() ) return frameHist()->GetYaxis();
1116  if ( hist() != nullptr ) return hist()->GetYaxis();
1117  if ( m_pg != nullptr ) return m_pg->GetYaxis();
1118  return nullptr;
1119 }
TH1 * frameHist() const
TH1 * hist() const
bool haveFrameHist() const
TAxis * TPadManipulator::getZaxis ( ) const

Definition at line 1123 of file TPadManipulator.cxx.

1123  {
1124  //if ( haveFrameHist() ) return frameHist()->GetZaxis();
1125  if ( hist() != nullptr ) return hist()->GetZaxis();
1126  return nullptr;
1127 }
TH1 * hist() const
TGraph* TPadManipulator::graph ( ) const
inline

Definition at line 163 of file TPadManipulator.h.

163 { return m_pg; }
bool TPadManipulator::haveCanvas ( ) const
inline

Definition at line 125 of file TPadManipulator.h.

125 { return canvas() != nullptr; }
TCanvas * canvas() const
bool TPadManipulator::haveFrame ( ) const
inline

Definition at line 196 of file TPadManipulator.h.

196 { return frame() != nullptr; }
TFrame * frame() const
bool TPadManipulator::haveFrameHist ( ) const
inline

Definition at line 200 of file TPadManipulator.h.

200 { return frameHist() != nullptr; }
TH1 * frameHist() const
bool TPadManipulator::haveGraph ( ) const
inline

Definition at line 164 of file TPadManipulator.h.

164 { return graph() != nullptr; }
TGraph * graph() const
bool TPadManipulator::haveHist ( ) const
inline

Definition at line 162 of file TPadManipulator.h.

162 { return hist() != nullptr; }
TH1 * hist() const
bool TPadManipulator::haveHistOrGraph ( ) const
inline

Definition at line 166 of file TPadManipulator.h.

166 { return object() != nullptr; }
TObject * object() const
bool TPadManipulator::havePad ( ) const
inline

Definition at line 119 of file TPadManipulator.h.

119 { return pad() != nullptr; }
TVirtualPad * pad() const
bool TPadManipulator::haveParent ( ) const
inline

Definition at line 158 of file TPadManipulator.h.

158 { return m_parent != nullptr; }
TPadManipulator * m_parent
TH1* TPadManipulator::hist ( ) const
inline

Definition at line 161 of file TPadManipulator.h.

161 { return m_ph; }
TObject * TPadManipulator::lastObject ( ) const

Definition at line 452 of file TPadManipulator.cxx.

452  {
453  Index nobj = objects().size();
454  if ( nobj ) return objects().back();
455  return object();
456 }
TObject * object() const
unsigned int Index
const TObjVector & objects() const
TPadManipulator * TPadManipulator::man ( unsigned int  ipad = 0)

Definition at line 431 of file TPadManipulator.cxx.

431  {
432  if ( npad() == 0 && ipad == 0 ) return this;
433  return ipad<npad() ? &m_subMans[ipad] : nullptr;
434 }
unsigned int npad() const
std::vector< TPadManipulator > m_subMans
unsigned int TPadManipulator::npad ( ) const

Definition at line 425 of file TPadManipulator.cxx.

425  {
426  return m_subMans.size();
427 }
std::vector< TPadManipulator > m_subMans
TObject * TPadManipulator::object ( ) const

Definition at line 438 of file TPadManipulator.cxx.

438  {
439  if ( haveHist() ) return hist();
440  return graph();
441 }
bool haveHist() const
TH1 * hist() const
TGraph * graph() const
TObject* TPadManipulator::object ( Index  iobj) const
inline

Definition at line 171 of file TPadManipulator.h.

171 { return iobj<objects().size() ? objects()[iobj] : nullptr; }
const TObjVector & objects() const
const TObjVector& TPadManipulator::objects ( ) const
inline

Definition at line 170 of file TPadManipulator.h.

170 { return m_objs; }
const std::vector<std::string>& TPadManipulator::objOpts ( ) const
inline

Definition at line 173 of file TPadManipulator.h.

173 { return m_opts; }
std::vector< std::string > m_opts
TPadManipulator & TPadManipulator::operator= ( const TPadManipulator rhs)

Definition at line 138 of file TPadManipulator.cxx.

138  {
139  if ( this == &rhs ) return *this;
140  bool saveAddDirectory = TH1::AddDirectoryStatus();
141  TH1::AddDirectory(false);
142  if ( m_ppad != nullptr ) {
143  m_ppad->Clear();
144  }
147  m_exec = rhs.m_exec,
151  m_marginTop = rhs.m_marginTop;
152  // Clone drawn objects.
153  delete m_ph;
154  m_ph = nullptr;
155  delete m_pg;
156  m_pg = nullptr;
157  if ( rhs.haveHist() ) {
158  m_ph = dynamic_cast<TH1*>(rhs.hist()->Clone());
159  } else if ( rhs.m_pg ) {
160  m_pg = dynamic_cast<TGraph*>(rhs.m_pg->Clone());
161  }
162  m_dopt = rhs.m_dopt;
163  m_objs.clear();
164  for ( TObject* pobj : rhs.m_objs ) {
165  m_objs.push_back(pobj != nullptr ? pobj->Clone() : nullptr);
166  }
167  m_opts = rhs.m_opts;
168  TH1::AddDirectory(saveAddDirectory);
169  m_setBounds = rhs.m_setBounds;
171  // Copy decoration instructions.
172  m_fillColor = rhs.m_fillColor;
174  m_gridX = rhs.m_gridX;
175  m_gridY = rhs.m_gridY;
176  m_logX = rhs.m_logX;
177  m_logY = rhs.m_logY;
178  m_logZ = rhs.m_logZ;
181  m_ndivX = rhs.m_ndivX;
182  m_ndivY = rhs.m_ndivY;
183  m_labSizeX = rhs.m_labSizeX;
184  m_labSizeY = rhs.m_labSizeY;
185  m_ttlSize = rhs.m_ttlSize;
188  m_gflowOpt = rhs.m_gflowOpt;
189  m_gflowMrk = rhs.m_gflowMrk;
190  m_gflowCol = rhs.m_gflowCol;
191  m_top = rhs.m_top;
192  m_right = rhs.m_right;
194  rhs.m_title.Copy(m_title); m_title.SetNDC();
195  rhs.m_label.Copy(m_label); m_label.SetNDC();
196  m_histFuns = rhs.m_histFuns;
197  m_hmlXmod = rhs.m_hmlXmod;
198  m_hmlXoff = rhs.m_hmlXoff;
199  m_hmlXStyle = rhs.m_hmlXStyle;
201  m_vmlXmod = rhs.m_vmlXmod;
202  m_vmlXoff = rhs.m_vmlXoff;
203  m_vmlXStyle = rhs.m_vmlXStyle;
205  m_slSlop = rhs.m_slSlop;
206  m_slYoff = rhs.m_slYoff;
207  m_slStyl = rhs.m_slStyl;
214  m_subBounds = rhs.m_subBounds;
215  m_subMans.clear();
216  for ( const TPadManipulator& man : rhs.m_subMans ) {
217  m_subMans.emplace_back(man);
218  }
221  setParents(true);
222  update();
223  return *this;
224 }
std::vector< unsigned int > m_histFuns
std::vector< double > m_vmlXLength
std::vector< double > m_hmlXoff
bool haveHist() const
std::string m_timeFormatY
BoundsVector m_subBounds
int m_canvasWidth
==> Do not stream.
std::vector< int > m_hmlXStyle
std::vector< double > m_vmlXmod
TVirtualPad * m_ppad
==> Do not stream
TH1 * hist() const
std::string m_gflowOpt
==> Do not stream.
std::vector< double > m_slYoff
NameVector m_binLabelsX
==> Do not stream.
std::vector< double > m_vmlXoff
bool m_showUnderflow
==> Do not stream.
TPadManipulator * man(unsigned int ipad=0)
std::vector< int > m_vmlXStyle
std::vector< double > m_hmlXLength
std::vector< double > m_slSlop
std::vector< int > m_slStyl
std::vector< TPadManipulator > m_subMans
std::vector< std::string > m_opts
std::string m_dopt
void setParents(bool recurse)
NameVector m_binLabelsY
std::vector< double > m_hmlXmod
std::string m_timeFormatX
TVirtualPad* TPadManipulator::pad ( ) const
inline

Definition at line 118 of file TPadManipulator.h.

118 { return m_ppad; }
TVirtualPad * m_ppad
==> Do not stream
double TPadManipulator::padPixelsX ( ) const

Definition at line 486 of file TPadManipulator.cxx.

486  {
487  if ( ! havePad() ) return 0.0;
488  double frac = pad()->GetAbsWNDC();
489  return frac*canvasPixelsX();
490 }
bool havePad() const
int canvasPixelsX() const
TVirtualPad * pad() const
double TPadManipulator::padPixelsY ( ) const

Definition at line 494 of file TPadManipulator.cxx.

494  {
495  if ( ! havePad() ) return 0.0;
496  double frac = pad()->GetAbsHNDC();
497  return frac*canvasPixelsY();
498 }
int canvasPixelsY() const
bool havePad() const
TVirtualPad * pad() const
TPadManipulator* TPadManipulator::parent ( )
inline

Definition at line 156 of file TPadManipulator.h.

156 { return m_parent; }
TPadManipulator * m_parent
const TPadManipulator* TPadManipulator::parent ( ) const
inline

Definition at line 157 of file TPadManipulator.h.

157 { return m_parent; }
TPadManipulator * m_parent
int TPadManipulator::print ( std::string  fname,
std::string  spat = "{,}" 
)

Definition at line 409 of file TPadManipulator.cxx.

409  {
410  StringManipulator sman(fnamepat, true);
411  int stats = 0;
412  for ( string fnam : sman.patternSplit(spat) ) stats += printOnce(fnam);
413  return stats;
414 }
int printOnce(std::string fname)
int TPadManipulator::printOnce ( std::string  fname)

Definition at line 362 of file TPadManipulator.cxx.

362  {
363  // If fname has suffix .root or .tpad, we save this object.
364  Name::size_type idot = fname.rfind(".");
365  if ( idot != Name::npos ) {
366  Name suf = fname.substr(idot + 1);
367  if ( suf == "root" || suf == "tpad" ) {
368  write(fname);
369  return 0;
370  }
371  }
372  TCanvas* pcan = canvas(false);
373  // If canvas does not yet exist, draw in batch mode to avoid
374  // display on screen.
375  // We should (but don't yet) also remove the canvas after draw so
376  // there are no problems if a draw to screen is attempted later.
377  bool setBackToNonBatch = false;
378  if ( pcan == nullptr ) {
379  bool isBatch = gROOT->IsBatch();
380  if ( ! isBatch ) {
381  gROOT->SetBatch(true);
382  setBackToNonBatch = true;
383  }
384  pcan = canvas(true);
385  }
386  if ( pcan == nullptr ) {
387  if ( setBackToNonBatch ) gROOT->SetBatch(false);
388  return 1;
389  }
390  // Suppress printing message from Root.
391  int levelSave = gErrorIgnoreLevel;
392  gErrorIgnoreLevel = 1001;
393  // Block non-default (e.g. art) from handling the Root "error".
394  // We switch to the Root default handler while making the call to Print.
395  ErrorHandlerFunc_t pehSave = nullptr;
396  ErrorHandlerFunc_t pehDefault = DefaultErrorHandler;
397  if ( GetErrorHandler() != pehDefault ) {
398  pehSave = SetErrorHandler(pehDefault);
399  }
400  pcan->Print(fname.c_str());
401  if ( pehSave != nullptr ) SetErrorHandler(pehSave);
402  gErrorIgnoreLevel = levelSave;
403  if ( setBackToNonBatch ) gROOT->SetBatch(false);
404  return 0;
405 }
TCanvas * canvas() const
ChannelGroupService::Name Name
int write(Name fnam, Name onam="tpad") const
TPadManipulator * TPadManipulator::progenitor ( )

Definition at line 418 of file TPadManipulator.cxx.

418  {
419  if ( haveParent() ) return parent()->progenitor();
420  return this;
421 }
TPadManipulator * progenitor()
TPadManipulator * parent()
bool haveParent() const
int TPadManipulator::put ( Name  onam = "tpad",
TDirectory *  tdir = nullptr 
) const

Definition at line 331 of file TPadManipulator.cxx.

331  {
332  Name myname = "TPadManipulator::put: ";
333  TDirectory* pdir = tdir == nullptr ? gDirectory : tdir;
334  if ( pdir == nullptr ) {
335  cout << myname << "ERROR: Root directory not found." << endl;
336  return 2;
337  }
338  if ( ! pdir->IsWritable() ) {
339  cout << myname << "Root directory " << pdir->GetName() << " is not writable." << endl;
340  return 3;
341  }
342  pdir->WriteObject(this, onam.c_str());
343  return 0;
344 }
ChannelGroupService::Name Name
QTextStream & endl(QTextStream &s)
TPadManipulator * TPadManipulator::read ( Name  fnam,
Name  onam = "tpad" 
)
static

Definition at line 63 of file TPadManipulator.cxx.

63  {
64  Name myname = "TPadManipulator::read: ";
65  TPadManipulator* ppad = nullptr;
66  TFile* pfil = TFile::Open(fnam.c_str(), "READ");
67  if ( pfil == nullptr || ! pfil->IsOpen() ) {
68  cout << myname << "Unable to open file " << fnam << endl;
69  } else {
70  ppad = get(onam, pfil);
71  }
72  delete pfil;
73  return ppad;
74 }
ChannelGroupService::Name Name
QTextStream & endl(QTextStream &s)
int TPadManipulator::redraw ( )

Definition at line 1435 of file TPadManipulator.cxx.

1435  {
1436  if ( haveParent() ) return parent()->redraw();
1437  erase();
1438  return draw();
1439 }
TPadManipulator * parent()
bool haveParent() const
int TPadManipulator::setBinLabelsX ( const NameVector labs)

Definition at line 1383 of file TPadManipulator.cxx.

1383  {
1384  m_binLabelsX = labs;
1385  return 0;
1386 }
NameVector m_binLabelsX
==> Do not stream.
int TPadManipulator::setBinLabelsY ( const NameVector labs)

Definition at line 1390 of file TPadManipulator.cxx.

1390  {
1391  m_binLabelsY = labs;
1392  return 0;
1393 }
NameVector m_binLabelsY
int TPadManipulator::setCanvasSize ( int  wx,
int  wy 
)

Definition at line 1131 of file TPadManipulator.cxx.

1131  {
1132  if ( haveParent() ) return parent()->setCanvasSize(wx, wy);
1133  m_canvasWidth = wx;
1134  m_canvasHeight = wy;
1135  if ( haveCanvas() ) {
1136  canvas()->SetWindowSize(wx, wy);
1137  return update();
1138  }
1139  return 0;
1140 }
TPadManipulator * parent()
bool haveCanvas() const
int m_canvasWidth
==> Do not stream.
TCanvas * canvas() const
int setCanvasSize(int wx, int wy)
bool haveParent() const
int TPadManipulator::setFillColor ( int  col)
inline

Definition at line 277 of file TPadManipulator.h.

277 { m_fillColor = col; return update(); }
int TPadManipulator::setFrameFillColor ( int  col)
inline

Definition at line 278 of file TPadManipulator.h.

278 { m_frameFillColor = col; return update(); }
int TPadManipulator::setGrid ( bool  flag = true)
inline

Definition at line 281 of file TPadManipulator.h.

281 { m_gridX = flag; m_gridY=flag; return update(); }
int TPadManipulator::setGridX ( bool  flag = true)
inline

Definition at line 279 of file TPadManipulator.h.

279 { m_gridX = flag; return update(); }
int TPadManipulator::setGridY ( bool  flag = true)
inline

Definition at line 280 of file TPadManipulator.h.

280 { m_gridY = flag; return update(); }
int TPadManipulator::setLabel ( std::string  slab)

Definition at line 688 of file TPadManipulator.cxx.

688  {
689  m_label.SetTitle(slab.c_str());
690  return 0;
691 }
int TPadManipulator::setLabelSizeX ( double  siz)
inline

Definition at line 302 of file TPadManipulator.h.

302 { m_labSizeX = siz; return 0; }
int TPadManipulator::setLabelSizeY ( double  siz)
inline

Definition at line 303 of file TPadManipulator.h.

303 { m_labSizeY = siz; return 0; }
int TPadManipulator::setLogRangeX ( double  x1,
double  x2 
)
int TPadManipulator::setLogRangeY ( double  y1,
double  y2 
)

Definition at line 1228 of file TPadManipulator.cxx.

1228  {
1229  m_setBoundsLog.y1 = y1;
1230  m_setBoundsLog.y2 = y2;
1231  return update();
1232 }
int TPadManipulator::setLogRangeZ ( double  y1,
double  y2 
)

Definition at line 1236 of file TPadManipulator.cxx.

1236  {
1237  m_setBoundsLog.z1 = z1;
1238  m_setBoundsLog.z2 = z2;
1239  return update();
1240 }
int TPadManipulator::setLogX ( bool  flag = true)
inline

Definition at line 282 of file TPadManipulator.h.

282 { m_logX = flag; return update(); }
int TPadManipulator::setLogY ( bool  flag = true)
inline

Definition at line 283 of file TPadManipulator.h.

283 { m_logY = flag; return update(); }
int TPadManipulator::setLogZ ( bool  flag = true)
inline

Definition at line 284 of file TPadManipulator.h.

284 { m_logZ = flag; return update(); }
void TPadManipulator::setMarginBottom ( double  xmar)
inline

Definition at line 237 of file TPadManipulator.h.

237 { m_marginBottom = xmar; }
void TPadManipulator::setMarginLeft ( double  xmar)
inline

Definition at line 235 of file TPadManipulator.h.

235 { m_marginLeft = xmar; }
void TPadManipulator::setMarginRight ( double  xmar)
inline

Definition at line 236 of file TPadManipulator.h.

236 { m_marginRight = xmar; }
void TPadManipulator::setMarginTop ( double  xmar)
inline

Definition at line 238 of file TPadManipulator.h.

238 { m_marginTop = xmar; }
int TPadManipulator::setNdivisionsX ( int  ndiv)
inline

Definition at line 295 of file TPadManipulator.h.

295 { m_ndivX = ndiv; return 0; };
int TPadManipulator::setNdivisionsY ( int  ndiv)
inline

Definition at line 296 of file TPadManipulator.h.

296 { m_ndivY = ndiv; return 0; };
void TPadManipulator::setPalette ( int  ipal)

Definition at line 578 of file TPadManipulator.cxx.

578  {
579  string scom;
580  if ( pal >= 0 ) {
581  ostringstream sscom;
582  sscom << "RootPalette::set(" << pal << ")";
583  scom = sscom.str();
584  }
585  setTExec(scom);
586 }
void setTExec(Name com)
void TPadManipulator::setParents ( bool  recurse)
private

Definition at line 1699 of file TPadManipulator.cxx.

1699  {
1700  for ( TPadManipulator& man : m_subMans ) {
1701  man.m_parent = this;
1702  if ( recurse ) man.setParents(true);
1703  }
1704  }
TPadManipulator * m_parent
TPadManipulator * man(unsigned int ipad=0)
std::vector< TPadManipulator > m_subMans
void setParents(bool recurse)
int TPadManipulator::setRangeX ( double  x1,
double  x2 
)
int TPadManipulator::setRangeXY ( double  x1,
double  x2,
double  y1,
double  y2 
)
int TPadManipulator::setRangeY ( double  y1,
double  y2 
)

Definition at line 1194 of file TPadManipulator.cxx.

1194  {
1195  m_setBounds.y1 = y1;
1196  m_setBounds.y2 = y2;
1197  return update();
1198 }
int TPadManipulator::setRangeZ ( double  y1,
double  y2 
)

Definition at line 1202 of file TPadManipulator.cxx.

1202  {
1203  m_setBounds.z1 = z1;
1204  m_setBounds.z2 = z2;
1205  return update();
1206 }
void TPadManipulator::setTExec ( Name  com)
inline

Definition at line 221 of file TPadManipulator.h.

221 { m_exec.SetTitle(com.c_str()); }
int TPadManipulator::setTickLength ( double  len)
inline

Definition at line 290 of file TPadManipulator.h.

290 { m_tickLengthX = len; m_tickLengthY = 0.0; return update(); }
int TPadManipulator::setTickLengthX ( double  len)
inline

Definition at line 291 of file TPadManipulator.h.

291 { m_tickLengthX = len; return update(); }
int TPadManipulator::setTickLengthY ( double  len)
inline

Definition at line 292 of file TPadManipulator.h.

292 { m_tickLengthY = len; return update(); }
int TPadManipulator::setTimeFormatX ( std::string  sfmt)

Definition at line 1251 of file TPadManipulator.cxx.

1251  {
1252  m_timeFormatX = sfmt;
1253  return 0;
1254 }
std::string m_timeFormatX
int TPadManipulator::setTimeFormatY ( std::string  sfmt)

Definition at line 1258 of file TPadManipulator.cxx.

1258  {
1259  m_timeFormatY = sfmt;
1260  return 0;
1261 }
std::string m_timeFormatY
int TPadManipulator::setTimeOffset ( double  toff)

Definition at line 1244 of file TPadManipulator.cxx.

1244  {
1245  m_timeOffset = toff;
1246  return 0;
1247 }
int TPadManipulator::setTitle ( std::string  sttl,
float  height = -1.0 
)

Definition at line 669 of file TPadManipulator.cxx.

669  {
670  m_title.SetTitle(sttl.c_str());
671  m_title.SetNDC();
672  m_title.SetTextAlign(22);
673  m_title.SetTextFont(42);
674  float tsiz = height;
675  if ( tsiz <= 0.0 ) {
676  tsiz = getTitleSize();
677  if ( tsiz <= 0.0 ) tsiz = 0.035;
678  }
679  m_title.SetTextSize(tsiz);
680  double xttl = 0.5;
681  double yttl = 1.0 - 0.70*tsiz;
682  m_title.SetText(xttl, yttl, sttl.c_str());
683  return 0;
684 }
double getTitleSize() const
int TPadManipulator::setTitleSize ( double  siz)
inline

Definition at line 304 of file TPadManipulator.h.

304 { m_ttlSize = siz; return 0; }
int TPadManipulator::showGraphOverflow ( std::string  sopt = "BTLR",
int  imrk = 38,
int  icol = 1 
)

Definition at line 1308 of file TPadManipulator.cxx.

1308  {
1309  delete m_flowGraph;
1310  m_flowGraph = nullptr;
1311  m_gflowOpt = sopt;
1312  m_gflowMrk = imrk;
1313  m_gflowCol = icol;
1314  return 0;
1315 }
std::string m_gflowOpt
==> Do not stream.
int TPadManipulator::showOverflow ( bool  show = true)

Definition at line 1300 of file TPadManipulator.cxx.

1300  {
1301  if ( show == m_showOverflow ) return 0;
1302  m_showOverflow = show;
1303  return update();
1304 }
int TPadManipulator::showUnderflow ( bool  show = true)

Definition at line 1292 of file TPadManipulator.cxx.

1292  {
1293  if ( show == m_showUnderflow ) return 0;
1294  m_showUnderflow = show;
1295  return update();
1296 }
bool m_showUnderflow
==> Do not stream.
int TPadManipulator::split ( Index  nx,
Index  ny 
)

Definition at line 549 of file TPadManipulator.cxx.

549  {
550  Index ny = nyin;
551  if ( nx < 1 ) return 1;
552  if ( ny < 1 ) ny = nx;
553  double dx = 1.0/nx;
554  double dy = 1.0/ny;
555  double y2 = 1.0;
556  for ( Index iy=0; iy<ny; ++iy ) {
557  double y1 = y2 - dy;
558  double x1 = 0.0;
559  for ( Index ix=0; ix<nx; ++ix ) {
560  double x2 = x1 + dx;
561  int rstat = addPad(x1, y1, x2, y2);
562  if ( rstat ) return 100 + rstat;
563  x1 = x2;
564  }
565  y2 = y1;
566  }
567  return 0;
568 }
int addPad(double x1, double y1, double x2, double y2, int icol=-1)
unsigned int Index
int TPadManipulator::split ( Index  nx)

Definition at line 572 of file TPadManipulator.cxx.

572  {
573  return split(nx, nx);
574 }
int split(Index nx, Index ny)
void TPadManipulator::Streamer ( TBuffer &  buf)

Definition at line 1660 of file TPadManipulator.cxx.

1660  {
1661  const string myname = "TPadManipulator::Streamer: ";
1662  int dbg = 0;
1663  TClass* pclass = TClass::GetClass("TPadManipulator");
1664  if ( buf.IsReading() ) {
1665  if ( pclass == nullptr ) {
1666  cout << myname << "Dictionary not found for read." << endl;
1667  return;
1668  }
1669  // Stream in.
1670  pclass->ReadBuffer(buf, this);
1671  // Set the parents. This only needs to be done for the top level object
1672  // but I don't know how to tell if this is the case.
1673  setParents(true);
1674  // Log message.
1675  string msg = haveHist() ? "histogram" : haveGraph() ? "graph" : "no primary";
1676  cout << myname << "Read pad with " << msg << " and "
1677  << objects().size() << " extra objects and "
1678  << m_subMans.size() << " subpads." << endl;
1679  } else {
1680  if ( pclass == nullptr ) {
1681  cout << myname << "Dictionary not found for write." << endl;
1682  return;
1683  }
1684  // Log message.
1685  if ( dbg ) {
1686  string msg = haveHist() ? "histogram" : haveGraph() ? "graph" : "no primary";
1687  cout << myname << "Writing pad with " << msg << " and "
1688  << objects().size() << " extra objects and "
1689  << m_subMans.size() << " subpads." << endl;
1690  if ( haveHistOrGraph() ) object()->Print();
1691  }
1692  // Stream out.
1693  pclass->WriteBuffer(buf, this);
1694  }
1695 }
TObject * object() const
bool haveHist() const
void msg(const char *fmt,...)
Definition: message.cpp:107
bool dbg
bool haveHistOrGraph() const
std::vector< TPadManipulator > m_subMans
void setParents(bool recurse)
const TObjVector & objects() const
bool haveGraph() const
QTextStream & endl(QTextStream &s)
int TPadManipulator::update ( )

Definition at line 707 of file TPadManipulator.cxx.

707  {
708  const string myname = "TPadManipulator::update: ";
709  if ( dbg ) cout << myname << this << endl;
710  int rstat = 0;
711  // No action if canvas/pad is not yet created.
712  // Call draw() to create the pad.
713  if ( ! havePad() ) return 0;
714  // Update the subpads.
715  // If needed, create the TPad for each subpad.
716  TVirtualPad* pPadSave = gPad;
717  m_ppad->cd();
718  if ( m_subMans.size() ) {
719  for ( Index isub=0; isub<m_subMans.size(); ++isub ) {
720  TPadManipulator& man = m_subMans[isub];
721  if ( man.m_ppad == nullptr ) {
722  if ( m_subBounds.size() <= isub ) {
723  cout << myname << "ERROR: Too few bounds." << endl;
724  break;
725  }
726  const Bounds& bnd = m_subBounds[isub];
727  ostringstream ssnam;
728  ssnam << m_ppad->GetName() << "_sub" << isub;
729  string spnam = ssnam.str();
730  string spttl = spnam;
731  TPad* ppad = new TPad(spnam.c_str(), spttl.c_str(), bnd.x1, bnd.y1, bnd.x2, bnd.y2);
732  ppad->Draw();
733  man.m_ppad = ppad;
734  man.m_parent = this;
735  }
736  int srstat = man.update();
737  if ( srstat ) {
738  cout << myname << "WARNING: Error " << srstat << " updating pad " << isub << endl;
739  rstat += srstat;
740  }
741  }
742  }
743  // If frame is not yet drawn, use the primary object to draw it.
744  // Note that we will later redraw the frame.
745  if ( ! haveFrameHist() ) {
746  // Fetch the set bounds.
747  if ( haveHist() ) {
748  hist()->Draw(m_dopt.c_str());
749  } else if ( m_pg ) {
750  // If the graph has no points, we add one because root (6.12/06) raises an
751  // exception if we draw an empty graph.
752  if ( m_pg->GetN() == 0 ) {
753  double xmin = m_pg->GetXaxis()->GetXmin();
754  double ymin = m_pg->GetYaxis()->GetXmin();
755  m_pg->SetPoint(0, xmin, ymin);
756  }
757  m_pg->Draw("AP");
758  }
759  }
760 /*
761  if ( ! haveHistOrGraph() ) {
762  const TList* prims = m_ppad->GetListOfPrimitives();
763  for ( TObjLink* plnk=prims->FirstLink(); plnk; plnk=plnk->Next() ) {
764  TObject* pobj = plnk->GetObject();
765  string sopt = plnk->GetOption();
766  TH1* ph = dynamic_cast<TH1*>(pobj);
767  if ( ph != nullptr ) {
768  m_ph.reset(dynamic_cast<TH1*>(ph->Clone("hmanip0")));
769  m_ph->SetDirectory(nullptr);
770  m_dopt = sopt;
771  break;
772  }
773  TGraph* pg = dynamic_cast<TGraph*>(pobj);
774  if ( pg != nullptr ) {
775  m_pg.reset(dynamic_cast<TGraph*>(pg->Clone("gmanip0")));
776  m_dopt = sopt;
777  break;
778  }
779  }
780  }
781 */
782  if ( ! haveHistOrGraph() ) {
783  if ( npad() == 0 && !haveParent() ) {
784  cout << myname << "Top-level pad does not have a histogram or graph or subpads!" << endl;
785  }
786  // Add the title and labels.
787  m_title.Draw();
788  if ( getLabel().size() ) m_label.Draw();
789  gPad = pPadSave;
790  return 0;
791  }
792  // Run TExec.
793  if ( string(m_exec.GetTitle()).size() ) {
794  m_exec.Draw();
795  }
796  // Set margins the first time the histogram is found.
797  // After this, user can override with pad()->SetRightMargin(...), ...
798  m_ppad->Update(); // This is needed to get color palette for 2D hists.
799  bool isTH = haveHist();
800  bool isTH2 = dynamic_cast<TH2*>(hist()) != nullptr;
801  bool isTH1 = isTH && !isTH2;
802  double xm0 = 0.015;
803  double wx = padPixelsX();
804  double wy = padPixelsY();
805  double asp = wx > 0 ? wy/wx : 1.0;
806  double aspx = asp < 1.0 ? asp : 1.0; // Font is proportional to this for asp < 1.0
807  double aspy = asp > 1.0 ? 1.0/asp : 1.0; // Font is proportional to this for asp > 1.0
808  if ( false ) {
809  aspx = 1.0;
810  aspy = 1.0/asp;
811  }
812  double xml = xm0 + 0.120*aspx;
813  double xmr = 0.05*aspx;
814  double xmb = 0.100*aspy;
815  double xmt = 0.070*aspy;
816  double xlb = -0.028 + 0.038*aspy;
817  double xlz = 0.005*aspx;
818  double xttl = 1.2*aspy;
819  double zttl = 1.5*aspx;
820  double yttl = 0.17 + 1.8*aspx;
821  //double httl = 1.0 - 0.5*xmt;
822  if ( m_marginLeft >= 0.0 ) {
823  // When left margin is changed, we leave the y-axis title at the edge of the pad.
824  xml = m_marginLeft;
825  //double scalefac = m_marginLeft/xml;
826  //yttl *= scalefac;
827  }
828  if ( m_marginRight >= 0.0 ) xmr = m_marginRight;
829  if ( m_marginBottom >= 0.0 ) {
830  xmb = m_marginBottom;
831  //double scalefac = m_marginBottom/xmb;
832  //xttl *= scalefac;
833  }
834  if ( m_marginTop >= 0.0 ) xmt = m_marginTop;
835  if ( isTH2 ) {
836  TPaletteAxis* pax = dynamic_cast<TPaletteAxis*>(hist()->GetListOfFunctions()->FindObject("palette"));
837  if ( pax != nullptr ) {
838  if ( m_marginRight < 0 ) xmr = xm0 + 0.150*aspx;
839  double xp1 = 1.0 - 1.00*xmr;
840  double xp2 = 1.0 - 0.65*xmr;
841  double yp1 = xmb;
842  double yp2 = 1.0 - xmt;
843  double tlen = 0.25*(xp2 - xp1);
844  //cout << myname << "Palette axis found." << endl;
845  pax->SetX1NDC(xp1);
846  pax->SetX2NDC(xp2);
847  pax->SetY1NDC(yp1);
848  pax->SetY2NDC(yp2);
849  hist()->GetZaxis()->SetTickLength(tlen);
850  //} else {
851  // cout << myname << "Palette axis not found." << endl;
852  // hist()->GetListOfFunctions()->Print();
853  }
854  }
855  m_ppad->SetRightMargin(xmr);
856  m_ppad->SetLeftMargin(xml);
857  m_ppad->SetTopMargin(xmt);
858  m_ppad->SetBottomMargin(xmb);
859  // Set the axis tick lengths.
860  // If the Y-size is zero, then they are drawn to have the same pixel length as the X-axis.
861  double ticklenx = m_tickLengthX;
862  double tickleny = m_tickLengthY;
863  if ( ticklenx < 0.0 ) ticklenx = 0.0;
864  if ( tickleny <= 0.0 ) {
865  if ( framePixelsY() ) {
866  double wx = framePixelsX();
867  double wy = framePixelsY();
868  if ( wy > wx ) {
869  tickleny = ticklenx;
870  ticklenx = (wx/wy)*tickleny;
871  } else {
872  tickleny = (wy/wx)*ticklenx;
873  }
874  }
875  }
876  int nbin = isTH1 ? hist()->GetNbinsX() : 0;
877  int flowcol = kAzure - 9;
878  // Build over/underflow histogram.
879  delete m_flowHist;
880  m_flowHist = nullptr;
881  if ( (m_showUnderflow || m_showOverflow) && nbin > 0 ) {
882  if ( m_flowHist == nullptr ) {
883  m_flowHist = dynamic_cast<TH1*>(hist()->Clone("hmaniptmp"));
884  m_flowHist->SetDirectory(nullptr);
885  m_flowHist->SetStats(0);
886  m_flowHist->SetLineColor(flowcol);
887  m_flowHist->SetFillColor(flowcol);
888  m_flowHist->SetLineWidth(1);
889  }
890  m_flowHist->Reset();
891  if ( m_showUnderflow ) {
892  if ( haveHist() ) {
893  double binWidth = hist()->GetBinWidth(1);
894  int binDisp1 = hist()->FindBin(xmin()+0.499*binWidth); // First displayed bin.
895  int binUnder2 = binDisp1 ? binDisp1 - 1 : 0; // Last bin below display.
896  double yunder = hist()->Integral(0, binUnder2);
897  m_flowHist->SetBinContent(binDisp1, yunder);
898  }
899  }
900  if ( m_showOverflow ) {
901  if ( haveHist() ) {
902  int binOver2 = hist()->GetNbinsX() + 1; // Last bin above display
903  double binWidth = hist()->GetBinWidth(1);
904  int binOver1 = hist()->FindBin(xmax()+0.501*binWidth); // First bin above display.
905  int binDisp2 = binOver1 - 1; // Last displayed bin.
906  double yover = hist()->Integral(binOver1, binOver2);
907  m_flowHist->SetBinContent(binDisp2, yover);
908  }
909  }
910  }
911  // Make frame so we have clean axis to overlay.
912  double xa1 = xmin();
913  double xa2 = xmax();
914  bool doLogx = m_logX;
915  if ( doLogx && xa1 <= 0.0 ) {
916  cout << myname << "WARNING: Must have range above 0.0 for logarithmic x-axis." << endl;
917  cout << myname << "WARNING: Use setLogRangeX(x1, x2) to set range." << endl;
918  cout << myname << "WARNING: Plot is displayed with linear axis." << endl;
919  doLogx = false;
920  }
921  double ya1 = ymin();
922  double ya2 = ymax();
923  bool doLogy = m_logY;
924  if ( doLogy && ya1 <= 0.0 ) {
925  cout << myname << "WARNING: Must have range above 0.0 for logarithmic y-axis." << endl;
926  cout << myname << "WARNING: Use setLogRangeY(y1, y2) to set range." << endl;
927  cout << myname << "WARNING: Plot is displayed with linear axis." << endl;
928  doLogy = false;
929  }
930  double za1 = zmin();
931  double za2 = zmax();
932  bool doLogz = m_logZ;
933  if ( doLogz && za1 <= 0.0 ) {
934  cout << myname << "WARNING: Must have range above 0.0 for logarithmic z-axis." << endl;
935  cout << myname << "WARNING: Use setLogRangeY(z1, z2) to set range." << endl;
936  cout << myname << "WARNING: Plot is displayed with linear axis." << endl;
937  doLogy = false;
938  }
939  string sattl = ";";
940  sattl += getXaxis()->GetTitle();
941  sattl += ";";
942  sattl += getYaxis()->GetTitle();
943  sattl += ";";
944  // Redraw everything.
945  m_ppad->Clear();
946  // Set the TPad attributes.
947  m_ppad->SetFillColor(m_fillColor);
948  m_ppad->SetFrameFillColor(m_frameFillColor);
949  m_ppad->SetGridx(m_gridX);
950  m_ppad->SetGridy(m_gridY);
951  m_ppad->SetLogx(doLogx);
952  m_ppad->SetLogy(doLogy);
953  m_ppad->SetLogz(doLogz);
954  // Draw frame and set axis parameters.
955  m_ppad->DrawFrame(xa1, ya1, xa2, ya2, sattl.c_str());
956  double labSizeX = getLabelSizeX();
957  if ( labSizeX > 0.0 ) {
958  getXaxis()->SetLabelSize(labSizeX);
959  getXaxis()->SetTitleSize(labSizeX);
960  //xttl *= labSizeX/0.035;
961  }
962  double labSizeY = getLabelSizeY();
963  if ( labSizeY > 0.0 ) {
964  getYaxis()->SetLabelSize(labSizeY);
965  getYaxis()->SetTitleSize(labSizeY);
966  //yttl *= labSizeY/0.035;
967  if ( getZaxis() != nullptr ) {
968  getZaxis()->SetLabelSize(labSizeY);
969  getZaxis()->SetTitleSize(labSizeY);
970  }
971  }
972  getXaxis()->SetLabelOffset(xlb);
973  getXaxis()->SetTitleOffset(xttl);
974  if ( getZaxis() != nullptr ) getZaxis()->SetTitleOffset(zttl);
975  getYaxis()->SetTitleOffset(yttl);
976  getXaxis()->SetTickLength(ticklenx);
977  getYaxis()->SetTickLength(tickleny);
978  if ( m_axisTitleOpt ) {
979  for ( TAxis* pax : { getXaxis(), getYaxis(), getZaxis() } ) {
980  if ( pax == nullptr ) continue;
981  pax->CenterTitle();
982  }
983  }
984  if ( m_ndivX ) getXaxis()->SetNdivisions(m_ndivX);
985  if ( m_ndivY ) getYaxis()->SetNdivisions(m_ndivY);
986  if ( m_timeFormatX.size() ) {
987  getXaxis()->SetTimeDisplay(1);
988  getXaxis()->SetTimeFormat(m_timeFormatX.c_str());
989  getXaxis()->SetTimeOffset(m_timeOffset, "gmt");
990  } else {
991  getXaxis()->SetTimeDisplay(0);
992  }
993  if ( m_timeFormatY.size() ) {
994  getYaxis()->SetTimeDisplay(1);
995  getYaxis()->SetTimeFormat(m_timeFormatY.c_str());
996  getYaxis()->SetTimeOffset(m_timeOffset, "gmt");
997  } else {
998  getYaxis()->SetTimeDisplay(0);
999  }
1000  // May 2019. Ensure frame axis has same binning as histogram.
1001  // And set bin labels.
1002  // July 2019: The calls to TAxis::Set cause problems if the drawing bounds are
1003  // set here. Make those calls iff bin labels are set.
1004  if ( haveHist() ) {
1005  if ( m_binLabelsX.size() ) {
1006  TAxis* pah = hist()->GetXaxis();
1007  getXaxis()->Set(pah->GetNbins(), pah->GetXmin(), pah->GetXmax());
1008  for ( Index ilab=0; ilab<m_binLabelsX.size(); ++ilab ) {
1009  getXaxis()->SetBinLabel(ilab+1, m_binLabelsX[ilab].c_str());
1010  }
1011  }
1012  if ( dynamic_cast<TH2*>(hist()) != nullptr && m_binLabelsY.size() ) {
1013  TAxis* pah = hist()->GetYaxis();
1014  getYaxis()->Set(pah->GetNbins(), pah->GetXmin(), pah->GetXmax());
1015  for ( Index ilab=0; ilab<m_binLabelsY.size(); ++ilab ) {
1016  getYaxis()->SetBinLabel(ilab+1, m_binLabelsY[ilab].c_str());
1017  }
1018  }
1019  }
1020  // Primary object.
1021  if ( haveHist() ) {
1022  if ( m_flowHist != nullptr ) {
1023  m_flowHist->Draw("same");
1024  }
1025  TAxis* paz = hist()->GetZaxis();
1026  if ( paz != nullptr && za2 > za1 ) {
1027  paz->SetRangeUser(za1, za2);
1028  paz->SetLabelOffset(xlz);
1029  }
1030  string dopt = m_dopt.size() ? m_dopt + " same" : "same";
1031  hist()->Draw(dopt.c_str());
1032  drawHistFuns();
1033  } else {
1034  m_pg->Draw(m_dopt.c_str());
1035  }
1036  // Secondary objects.
1037  for ( Index iobj=0; iobj<m_objs.size(); ++iobj ) {
1038  TObject* pobj = m_objs[iobj];
1039  string sopt = m_opts[iobj];
1040  if ( pobj != nullptr ) pobj->Draw(sopt.c_str());
1041  }
1042  // no longer needed? m_ppad->Update(); // Need an update here to get correct results for xmin, ymin, xmax, ymax
1043  // Make overflow graph.
1044  if ( m_gflowOpt.size() ) {
1045  bool doBot = m_gflowOpt.find("B") != string::npos;
1046  bool doTop = m_gflowOpt.find("T") != string::npos;
1047  bool doLef = m_gflowOpt.find("L") != string::npos;
1048  bool doRig = m_gflowOpt.find("R") != string::npos;
1049  TGraph* pgout = new TGraph();
1050  pgout->SetMarkerStyle(m_gflowMrk);
1051  pgout->SetMarkerColor(m_gflowCol);
1052  std::vector<TGraph*> gras;
1053  if ( haveGraph() ) gras.push_back(graph());
1054  for ( TObject* pobj : m_objs ) {
1055  TGraph* pgra = dynamic_cast<TGraph*>(pobj);
1056  if ( pgra != nullptr ) gras.push_back(pgra);
1057  }
1058  for ( TGraph* pgin : gras ) {
1059  for ( int ipt=0; ipt<pgin->GetN(); ++ipt ) {
1060  double x, y;
1061  pgin->GetPoint(ipt, x, y);
1062  double xout = x;
1063  double yout = y;
1064  bool doAdd = false;
1065  if ( doRig && x > xmax() ) { doAdd = true; xout = xmax(); }
1066  if ( doLef && x < xmin() ) { doAdd = true; xout = xmin(); }
1067  if ( doBot && y < ymin() ) { doAdd = true; yout = ymin(); }
1068  if ( doTop && y > ymax() ) { doAdd = true; yout = ymax(); }
1069  if ( doAdd ) pgout->SetPoint(pgout->GetN(), xout, yout);
1070  }
1071  }
1072  if ( pgout->GetN() == 0 ) {
1073  delete pgout;
1074  pgout = nullptr;
1075  } else {
1076  delete m_flowGraph;
1077  m_flowGraph = pgout;
1078  m_flowGraph->Draw("P");
1079  }
1080  }
1081  drawLines();
1082  if ( m_top ) drawAxisTop();
1083  if ( m_right ) drawAxisRight();
1084  pad()->RedrawAxis(); // In case they are covered
1085  pad()->RedrawAxis("G"); // In case they are covered
1086  // Add the title and labels.
1087  // First fix the title position and size (April 2020).
1088  // Title is positioned halfway up the top margin with text height no more
1089  // than 90% of the margin.
1090  float marg = m_ppad->GetTopMargin();
1091  float ttlY = 1.0 - 0.5*marg;
1092  m_title.SetY(ttlY);
1093  float ttlSizeMax = 0.90*marg;
1094  float ttlSize = m_ttlSize > 0 ? m_ttlSize : 0.035;
1095  if ( ttlSize > ttlSizeMax ) ttlSize = ttlSizeMax;
1096  m_title.SetTextSize(ttlSize);
1097  m_title.Draw();
1098  if ( getLabel().size() ) m_label.Draw();
1099  gPad = pPadSave;
1100  return rstat;
1101 }
TAxis * getYaxis() const
double xmax() const
double zmax() const
bool haveHist() const
std::string m_timeFormatY
BoundsVector m_subBounds
TPadManipulator * m_parent
double getLabelSizeX() const
bool dbg
double ymin() const
std::string getLabel() const
int framePixelsY() const
bool haveHistOrGraph() const
unsigned int Index
bool havePad() const
TVirtualPad * m_ppad
==> Do not stream
TH1 * hist() const
bool haveFrameHist() const
std::string m_gflowOpt
==> Do not stream.
int framePixelsX() const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
NameVector m_binLabelsX
==> Do not stream.
double zmin() const
TAxis * getXaxis() const
double padPixelsX() const
bool m_showUnderflow
==> Do not stream.
TAxis * getZaxis() const
unsigned int npad() const
double xmin() const
TPadManipulator * man(unsigned int ipad=0)
double padPixelsY() const
TGraph * graph() const
bool haveParent() const
double ymax() const
std::vector< TPadManipulator > m_subMans
std::vector< std::string > m_opts
list x
Definition: train.py:276
std::string m_dopt
TVirtualPad * pad() const
NameVector m_binLabelsY
bool haveGraph() const
double getLabelSizeY() const
QTextStream & endl(QTextStream &s)
std::string m_timeFormatX
const LineVector& TPadManipulator::verticalModLines ( ) const
inline

Definition at line 206 of file TPadManipulator.h.

206 { return m_lines; }
LineVector m_lines
int TPadManipulator::write ( Name  fnam,
Name  onam = "tpad" 
) const

Definition at line 348 of file TPadManipulator.cxx.

348  {
349  Name myname = "TPadManipulator::write: ";
350  TFile* pfil = TFile::Open(fnam.c_str(), "UPDATE");
351  if ( pfil == nullptr || ! pfil->IsOpen() ) {
352  cout << myname << "Unable to open file " << fnam << endl;
353  return 1;
354  }
355  int wstat = put(onam, pfil);
356  delete pfil;
357  return wstat;
358 }
ChannelGroupService::Name Name
int put(Name onam="tpad", TDirectory *tdir=nullptr) const
QTextStream & endl(QTextStream &s)
double TPadManipulator::xmax ( ) const

Definition at line 260 of file TPadManipulator.cxx.

260  {
261  if ( m_logX &&
262  m_setBoundsLog.x1 > 0.0 && m_setBoundsLog.x2 > 0.0 &&
264  if ( m_setBounds.x2 > m_setBounds.x1 ) return m_setBounds.x2;
265  if ( ! havePad() ) return 0.0;
266  double val = pad()->GetUxmax();
267  return pad()->GetLogx() ? pow(10,val) : val;
268 }
constexpr T pow(T x)
Definition: pow.h:72
bool havePad() const
TVirtualPad * pad() const
double TPadManipulator::xmin ( ) const

Definition at line 248 of file TPadManipulator.cxx.

248  {
249  if ( m_logX &&
250  m_setBoundsLog.x1 > 0.0 && m_setBoundsLog.x2 > 0.0 &&
252  if ( m_setBounds.x2 > m_setBounds.x1 ) return m_setBounds.x1;
253  if ( ! havePad() ) return 0.0;
254  double val = pad()->GetUxmin();
255  return pad()->GetLogx() ? pow(10,val) : val;
256 }
constexpr T pow(T x)
Definition: pow.h:72
bool havePad() const
TVirtualPad * pad() const
double TPadManipulator::ymax ( ) const

Definition at line 284 of file TPadManipulator.cxx.

284  {
285  if ( m_logY &&
286  m_setBoundsLog.y1 > 0.0 && m_setBoundsLog.y2 > 0.0 &&
288  if ( m_setBounds.y2 > m_setBounds.y1 ) return m_setBounds.y2;
289  if ( ! havePad() ) return 0.0;
290  double val = pad()->GetUymax();
291  return pad()->GetLogy() ? pow(10,val) : val;
292 }
constexpr T pow(T x)
Definition: pow.h:72
bool havePad() const
TVirtualPad * pad() const
double TPadManipulator::ymin ( ) const

Definition at line 272 of file TPadManipulator.cxx.

272  {
273  if ( m_logY &&
274  m_setBoundsLog.y1 > 0.0 && m_setBoundsLog.y2 > 0.0 &&
276  if ( m_setBounds.y2 > m_setBounds.y1 ) return m_setBounds.y1;
277  if ( ! havePad() ) return 0.0;
278  double val = pad()->GetUymin();
279  return pad()->GetLogy() ? pow(10,val) : val;
280 }
constexpr T pow(T x)
Definition: pow.h:72
bool havePad() const
TVirtualPad * pad() const
double TPadManipulator::zmax ( ) const

Definition at line 306 of file TPadManipulator.cxx.

306  {
307  if ( m_logZ &&
308  m_setBoundsLog.z1 > 0.0 && m_setBoundsLog.z2 > 0.0 &&
310  if ( m_setBounds.z2 > m_setBounds.z1 ) return m_setBounds.z2;
311  return 0.0;
312 }
double TPadManipulator::zmin ( ) const

Definition at line 296 of file TPadManipulator.cxx.

296  {
297  if ( m_logZ &&
298  m_setBoundsLog.z1 > 0.0 && m_setBoundsLog.z2 > 0.0 &&
300  if ( m_setBounds.z2 > m_setBounds.z1 ) return m_setBounds.z1;
301  return 0.0;
302 }

Member Data Documentation

int TPadManipulator::m_axisTitleOpt
private

Definition at line 492 of file TPadManipulator.h.

NameVector TPadManipulator::m_binLabelsX
private

==> Do not stream.

Definition at line 484 of file TPadManipulator.h.

NameVector TPadManipulator::m_binLabelsY
private

Definition at line 485 of file TPadManipulator.h.

int TPadManipulator::m_canvasHeight
private

Definition at line 433 of file TPadManipulator.h.

int TPadManipulator::m_canvasWidth
private

==> Do not stream.

Definition at line 432 of file TPadManipulator.h.

std::string TPadManipulator::m_dopt
private

Definition at line 441 of file TPadManipulator.h.

TExec TPadManipulator::m_exec
private

Definition at line 434 of file TPadManipulator.h.

int TPadManipulator::m_fillColor
private

Definition at line 446 of file TPadManipulator.h.

TGraph* TPadManipulator::m_flowGraph
private

Definition at line 463 of file TPadManipulator.h.

TH1* TPadManipulator::m_flowHist
private

Definition at line 460 of file TPadManipulator.h.

int TPadManipulator::m_frameFillColor
private

Definition at line 447 of file TPadManipulator.h.

int TPadManipulator::m_gflowCol
private

Definition at line 466 of file TPadManipulator.h.

int TPadManipulator::m_gflowMrk
private

Definition at line 465 of file TPadManipulator.h.

std::string TPadManipulator::m_gflowOpt
private

==> Do not stream.

Definition at line 464 of file TPadManipulator.h.

bool TPadManipulator::m_gridX
private

Definition at line 448 of file TPadManipulator.h.

bool TPadManipulator::m_gridY
private

Definition at line 449 of file TPadManipulator.h.

std::vector<unsigned int> TPadManipulator::m_histFuns
private

Definition at line 471 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_hmlXLength
private

Definition at line 475 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_hmlXmod
private

Definition at line 472 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_hmlXoff
private

Definition at line 473 of file TPadManipulator.h.

std::vector<int> TPadManipulator::m_hmlXStyle
private

Definition at line 474 of file TPadManipulator.h.

Index TPadManipulator::m_iobjLegend
private

Definition at line 491 of file TPadManipulator.h.

TLatex TPadManipulator::m_label
private

Definition at line 470 of file TPadManipulator.h.

double TPadManipulator::m_labSizeX
private

Definition at line 457 of file TPadManipulator.h.

double TPadManipulator::m_labSizeY
private

Definition at line 458 of file TPadManipulator.h.

LineVector TPadManipulator::m_lines
private

Definition at line 483 of file TPadManipulator.h.

bool TPadManipulator::m_logX
private

Definition at line 450 of file TPadManipulator.h.

bool TPadManipulator::m_logY
private

Definition at line 451 of file TPadManipulator.h.

bool TPadManipulator::m_logZ
private

Definition at line 452 of file TPadManipulator.h.

double TPadManipulator::m_marginBottom
private

Definition at line 437 of file TPadManipulator.h.

double TPadManipulator::m_marginLeft
private

Definition at line 435 of file TPadManipulator.h.

double TPadManipulator::m_marginRight
private

Definition at line 436 of file TPadManipulator.h.

double TPadManipulator::m_marginTop
private

Definition at line 438 of file TPadManipulator.h.

int TPadManipulator::m_ndivX
private

Definition at line 455 of file TPadManipulator.h.

int TPadManipulator::m_ndivY
private

Definition at line 456 of file TPadManipulator.h.

TObjVector TPadManipulator::m_objs
private

Definition at line 442 of file TPadManipulator.h.

std::vector<std::string> TPadManipulator::m_opts
private

Definition at line 443 of file TPadManipulator.h.

TPadManipulator* TPadManipulator::m_parent
private

Definition at line 430 of file TPadManipulator.h.

TGraph* TPadManipulator::m_pg
private

Definition at line 440 of file TPadManipulator.h.

TH1* TPadManipulator::m_ph
private

Definition at line 439 of file TPadManipulator.h.

TVirtualPad* TPadManipulator::m_ppad
private

==> Do not stream

Definition at line 431 of file TPadManipulator.h.

bool TPadManipulator::m_right
private

Definition at line 468 of file TPadManipulator.h.

Bounds3 TPadManipulator::m_setBounds
private

Definition at line 444 of file TPadManipulator.h.

Bounds3 TPadManipulator::m_setBoundsLog
private

Definition at line 445 of file TPadManipulator.h.

bool TPadManipulator::m_showOverflow
private

Definition at line 462 of file TPadManipulator.h.

bool TPadManipulator::m_showUnderflow
private

==> Do not stream.

Definition at line 461 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_slSlop
private

Definition at line 480 of file TPadManipulator.h.

std::vector<int> TPadManipulator::m_slStyl
private

Definition at line 482 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_slYoff
private

Definition at line 481 of file TPadManipulator.h.

BoundsVector TPadManipulator::m_subBounds
private

Definition at line 489 of file TPadManipulator.h.

std::vector<TPadManipulator> TPadManipulator::m_subMans
private

Definition at line 490 of file TPadManipulator.h.

double TPadManipulator::m_tickLengthX
private

Definition at line 453 of file TPadManipulator.h.

double TPadManipulator::m_tickLengthY
private

Definition at line 454 of file TPadManipulator.h.

std::string TPadManipulator::m_timeFormatX
private

Definition at line 487 of file TPadManipulator.h.

std::string TPadManipulator::m_timeFormatY
private

Definition at line 488 of file TPadManipulator.h.

double TPadManipulator::m_timeOffset =0.0
private

Definition at line 486 of file TPadManipulator.h.

TLatex TPadManipulator::m_title
private

Definition at line 469 of file TPadManipulator.h.

bool TPadManipulator::m_top
private

Definition at line 467 of file TPadManipulator.h.

double TPadManipulator::m_ttlSize
private

Definition at line 459 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_vmlXLength
private

Definition at line 479 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_vmlXmod
private

Definition at line 476 of file TPadManipulator.h.

std::vector<double> TPadManipulator::m_vmlXoff
private

Definition at line 477 of file TPadManipulator.h.

std::vector<int> TPadManipulator::m_vmlXStyle
private

Definition at line 478 of file TPadManipulator.h.


The documentation for this class was generated from the following files: