Logo ROOT   6.14/05
Reference Guide
TFrame.cxx
Go to the documentation of this file.
1 /// \file TFrame.cxx
2 /// \ingroup Gpad ROOT7
3 /// \author Axel Naumann <axel@cern.ch>
4 /// \date 2017-09-26
5 /// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6 /// is welcome!
7 
8 /*************************************************************************
9  * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
10  * All rights reserved. *
11  * *
12  * For the licensing terms see $ROOTSYS/LICENSE. *
13  * For the list of contributors see $ROOTSYS/README/CREDITS. *
14  *************************************************************************/
15 
16 #include "ROOT/TFrame.hxx"
17 
18 #include "ROOT/TLogger.hxx"
19 #include "ROOT/TPadUserAxis.hxx"
20 
21 #include <cassert>
22 
23 ROOT::Experimental::TFrame::TFrame(std::vector<std::unique_ptr<TPadUserAxisBase>> &&coords, const DrawingOpts &opts)
24  : fUserCoord(std::move(coords)), fPalette(TPalette::GetPalette("default")), fPos(opts.fPos.Get()), fSize(opts.fSize.Get())
25 {}
26 
28 {
29  std::size_t oldSize = fUserCoord.size();
30  if (oldSize >= nDimensions)
31  return;
32  fUserCoord.resize(nDimensions);
33  for (std::size_t idx = oldSize; idx < nDimensions; ++idx)
34  if (!fUserCoord[idx])
35  fUserCoord[idx].reset(new TPadCartesianUserAxis);
36 }
STL namespace.
void GrowToDimensions(size_t nDimensions)
Create nDimensions default axes for the user coordinate system.
Definition: TFrame.cxx:27
std::vector< std::unique_ptr< TPadUserAxisBase > > fUserCoord
Mapping of user coordinates to normal coordinates, one entry per dimension.
Definition: TFrame.hxx:47