ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
na49geomfile.C
Go to the documentation of this file.
1 void na49geomfile() {
2 // Before executing this macro, the file makegeometry.C must have been executed
3 //
4  gBenchmark->Start("geometry");
5  TGeometry *n49 =(TGeometry*)gROOT->FindObject("na49");
6  if (n49) {
7  TFile na("na49.root","RECREATE");
8  n49->Write();
9  na.Write();
10  }
11  gBenchmark->Show("geometry");
12 }
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TObject.cxx:823
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:45
#define gROOT
Definition: TROOT.h:344
virtual void Show(const char *name)
Stops Benchmark name and Prints results.
Definition: TBenchmark.cxx:155
void na49geomfile()
Definition: na49geomfile.C:1
virtual void Start(const char *name)
Starts Benchmark with the specified name.
Definition: TBenchmark.cxx:172
TGeometry description.
Definition: TGeometry.h:43
virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsiz=0)
Write memory objects to this file.
Definition: TFile.cxx:2248
R__EXTERN TBenchmark * gBenchmark
Definition: TBenchmark.h:63