Logo ROOT  
Reference Guide
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
16ROOT::Experimental::RFrame::RFrame(std::vector<std::unique_ptr<RPadUserAxisBase>> &&coords) : RFrame()
17{
18 fUserCoord= std::move(coords);
19 fPalette = RPalette::GetPalette("default");
20}
21
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}
Holds a user coordinate system with a palette.
Definition: RFrame.hxx:31
void GrowToDimensions(size_t nDimensions)
Create nDimensions default axes for the user coordinate system.
Definition: RFrame.cxx:22
RPalette fPalette
Palette used to visualize user coordinates.
Definition: RFrame.hxx:39
std::vector< std::unique_ptr< RPadUserAxisBase > > fUserCoord
Mapping of user coordinates to normal coordinates, one entry per dimension.
Definition: RFrame.hxx:36
static const RPalette & GetPalette(std::string_view name)
Get a global palette by name.
Definition: RPalette.cxx:93