coherent WaveBurst
Library Reference Guide
home
cWB_docker
git
cWB
library
tools
cwb
tutorials
TestTObjectMeyer.C
Go to the documentation of this file.
1
{
2
//
3
// Write & Read Meyer object to/from root file
4
// Author : Gabriele Vedovato
5
6
7
Meyer<double>
S
(512,2);
8
cout <<
"S level "
<<
S
.getLevel() << endl;
9
10
TFile *
froot
=
new
TFile(
"test.root"
,
"RECREATE"
);
11
if
(froot==NULL) {
12
cout <<
"Failed to create file !!! "
<< endl;
13
gSystem->Exit(1);
14
}
15
S
.Write(
"S"
);
16
froot->Close();
17
18
TFile *
f
=
new
TFile(
"test.root"
);
19
if
(f==NULL) {
20
cout <<
"Failed to open file test.root !!! "
<< endl;
21
gSystem->Exit(1);
22
}
23
24
f->ls();
25
26
Meyer<double>
*
S2
= (
Meyer<double>
*)f->Get(
"S"
);
27
if
(S2==NULL) {
28
cout <<
"Object S not exist !!! "
<< endl;
29
gSystem->Exit(1);
30
}
31
cout <<
"S2 level "
<< S2->
getLevel
() << endl;
32
f->Close();
33
34
exit
(0);
35
}
Wavelet::getLevel
virtual int getLevel()
Definition:
Wavelet.hh:88
f
TFile * f
Definition:
TestTObjectMeyer.C:18
S2
Meyer< double > * S2
Definition:
TestTObjectMeyer.C:26
froot
TFile * froot
Definition:
TestReadWriteDetectorObject.C:11
Meyer
Definition:
Meyer.hh:36
S
Meyer< double > S(1024, 2)
exit
exit(0)