This program creates :
- a one dimensional histogram
- a two dimensional histogram
- a profile histogram
- a memory-resident ntuple
These objects are filled with some random numbers and saved on a file. If get=1 the macro returns a pointer to the TFile of "hsimple.root" if this file exists, otherwise it is created. The file "hsimple.root" is created in $ROOTSYS/tutorials if the caller has write access to this directory, otherwise the file is created in $PWD
hsimple : Real Time = 0.07 seconds Cpu Time = 0.08 seconds
(TFile *) 0x292c290
{
}
}
}
printf(
"you must run the script in a directory with write access\n");
return nullptr;
}
TH1F *
hpx =
new TH1F(
"hpx",
"This is the px distribution",100,-4,4);
c1->GetFrame()->SetFillColor(21);
c1->GetFrame()->SetBorderSize(6);
c1->GetFrame()->SetBorderMode(-1);
for (
Int_t i = 0; i < 25000; i++) {
pz = px*px + py*py;
break;
}
}
}
R__EXTERN TBenchmark * gBenchmark
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
R__EXTERN TSystem * gSystem
virtual void Start(const char *name)
Starts Benchmark with the specified name.
virtual void Show(const char *name)
Stops Benchmark name and Prints results.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
1-D histogram with a float per channel (see TH1 documentation)
2-D histogram with a float per channel (see TH1 documentation)
A simple TTree restricted to a list of float variables only.
Random number generator class based on M.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
- Author
- Rene Brun
Definition in file hsimple.C.