Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RFrame.cxx
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
3  * All rights reserved. *
4  * *
5  * For the licensing terms see $ROOTSYS/LICENSE. *
6  * For the list of contributors see $ROOTSYS/README/CREDITS. *
7  *************************************************************************/
8 
9 #include "ROOT/RFrame.hxx"
10 
11 #include "ROOT/RLogger.hxx"
12 #include "ROOT/RPadUserAxis.hxx"
13 
14 #include <cassert>
15 
16 ROOT::Experimental::RFrame::RFrame(std::vector<std::unique_ptr<RPadUserAxisBase>> &&coords) : RFrame()
17 {
18  fUserCoord= std::move(coords);
19  fPalette = RPalette::GetPalette("default");
20 }
21 
22 void ROOT::Experimental::RFrame::GrowToDimensions(size_t nDimensions)
23 {
24  std::size_t oldSize = fUserCoord.size();
25  if (oldSize >= nDimensions)
26  return;
27  fUserCoord.resize(nDimensions);
28  for (std::size_t idx = oldSize; idx < nDimensions; ++idx)
29  if (!fUserCoord[idx])
30  fUserCoord[idx].reset(new RPadCartesianUserAxis);
31 }