31 std::cout <<
"\n\nconstructing ..." << std::endl;
33 TFile
f(
"tree.root",
"recreate");
34 TTree *
tree =
new TTree(
"tree",
"tree");
37 tree->Branch(
"TIDA::Event",
"TIDA::Event",&
h,6400, 1);
39 std::string
ars[3] = {
"ars0",
"ars1",
"ars2" };
41 std::cout <<
"\n\nfilling ..." << std::endl;
43 for (
int i=0;
i<3 ;
i++ ) {
50 std::cout <<
"\n\nEvent " <<
i << std::endl;
52 for (
int j=0 ; j<2 ; j++ ) {
54 std::cout <<
"\n\tRoi " << j << std::endl;
56 h->addChain(
ars[j] );
64 j+3., j+3-1.1, j+3+1.1,
65 j+2.1, j+2.1-100, j+2.1+100 );
69 ij, ij-0.2, ij+0.2 ) );
71 std::cout <<
"Roi " << roi1 << std::endl;
74 j+3., j+3-1.1, j+3+1.1,
75 j+2.1, j+2.1-100, j+2.1+100 );
83 cout <<
"TIDA::Event " << *
h << endl;
89 std::cout <<
"\n\nwriting ..." << std::endl;
99 std::cout <<
"\n\nreading ..." << std::endl;
103 TFile
f(
"tree.root");
104 TTree *
tree = (TTree*)
f.Get(
"tree");
107 tree->SetBranchAddress(
"TIDA::Event", &
hh );
109 for (
int i=0;
i<
tree->GetEntries() ;
i++ ) {
113 cout <<
"TIDA::Event " <<
i <<
" " << *
hh << endl;