Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 8c86774a3e53d77cc119f53a2b94a57a > files > 346

root-tutorial-5.34.14-2.fc18.noarch.rpm

#include "TRandom.h"
#include "TH2Poly.h"
#include "TFile.h"
#include "TMath.h"
#include "TKey.h"

#include "H2PolyDemo.h"

namespace ROOT {
namespace iOS {
namespace Demos {

//______________________________________________________________________________
H2PolyDemo::H2PolyDemo(const char *fileName)
{
   std::unique_ptr<TFile> inputFile(TFile::Open(fileName, "read"));
   if (!inputFile.get())
      return;
      
   fPoly.reset(dynamic_cast<TH2Poly *>(inputFile->Get("h2poly")));
   if (fPoly.get())
      fPoly->SetDirectory(0);
}

//______________________________________________________________________________
H2PolyDemo::~H2PolyDemo()
{
   //For unique_ptr's dtor only.
}

//______________________________________________________________________________
void H2PolyDemo::PresentDemo()
{
   if (fPoly.get())
      fPoly->Draw("COLZ");
}


}
}
}