Logo coherent WaveBurst  
Library Reference Guide
Logo
TestReadWriteDetectorObject.C
Go to the documentation of this file.
1 {
2  //
3  // Write & Read config object to/from root file
4  // Author : Gabriele Vedovato
5 
6  detector D(const_cast<char*>("H1"));
7  D.setPolarization(SCALAR);
8 
10 
11  TFile *froot = new TFile("test.root", "RECREATE");
12  D1.Write(const_cast<char*>("D"));
13  froot->Close();
14 
15  TFile *f = new TFile("test.root");
16 
17  f->ls();
18 
19  detector *iD = (detector*)f->Get(const_cast<char*>("D"));
20  iD->print();
21 
22  f->Close();
23 
24  exit(0);
25 }
exit(0)
detector D1
double D[50000]
TFile * froot
detector * iD
void print()
Definition: detector.cc:1797