#include "TObject.h" class ABC : public TObject { public: void PlotSomething(); /* double calcHisto(TH1D *h); void singlehisto(); double ABC::calcHisto(TH1D *h) { return h->GetBinContent(2); } void ABC::singlehisto() { TH1D *his; histo = new TH1D("histo","result",10,-4.5,4.5); histo->SetBinContent(2,3); double result=calcHisto(histo); printf("result is %f\n",result); delete histo; } */ void ABC::PlotSomething(){ double MemDepth=10000.; TCanvas *c = (TCanvas*)gROOT->GetListOfCanvases()->FindObject("something else"); if (c) delete c; c = new TCanvas("something else","Not Scope Data",1000,400); TH1F *hscopetrace = new TH1F("hscopetrace", "Scope Trace; channels;Volts", (int)MemDepth, 0., MemDepth); for (Int_t j=0;j<(int)MemDepth; j++) hscopetrace->SetBinContent(j, (double)j); hscopetrace->DrawCopy(); c->Update(); delete hscopetrace; //delete c; printf("made it\n"); } // Define the class for the cint dictionary ClassDef (ABC,1) }; // Call the ClassImp macro to give the ABC class RTTI and full I/O capabilities. #if !defined(__CINT__) ClassImp(ABC); #endif