GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CorrSpaceWriteFromH2.C
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998, Agata Experiment, All rights reserved. *
3  * *
4  * Author: The Agata Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 
17 //
18 //
19 #if !defined(__CINT__) || defined(__MAKECINT__)
20 
21 #include <Riostream.h>
22 #include "TFile.h"
23 #include "TMath.h"
24 #include "TRandom.h"
25 #include "TTree.h"
26 #include "TH2F.h"
27 #include "CorrelatedSpaceTree2I.h"
28 #include "CorrelatedSpaceTH2.h"
29 
30 #endif
31 
33 {
34 
35  TFile* fileIn = new TFile("Eu152-gg-mat.root", "READ");
36  TH2F* h2 = (TH2F*)fileIn->Get("HEGamma_EGamma");
37 
38  TFile* fileOut = new TFile("test1.root", "RECREATE");
39  fileOut->cd();
41 
42  coor->FillFromH2(h2);
43 
44  coor->Write();
45  fileOut->Close();
46  fileIn->Close();
47 }
48 
50 {
51 
52  TFile* fileIn = new TFile("Eu152-gg-mat.root", "READ");
53  TH2F* h2 = (TH2F*)fileIn->Get("HEGamma_EGamma");
54 
55  TFile* fileOut = new TFile("test3.root", "RECREATE");
56  fileOut->cd();
58 
59  coor->FillFromH2(h2);
60 
61  coor->Write();
62  fileOut->Close();
63  fileIn->Close();
64 }
65 
void FillFromH2(TH2 *h2)
fill correlated space from H2
CorrelatedSpaceTH2 class that manages a 2D symmetrical correlated space stored in a TH2...
header file for all type of CorrelatedSpaceTree2I
header file for all type of CorrelatedSpaceTH2
void CorrSpaceH2WriteFromH2()
CorrelatedSpaceTree2I class that manages a 2D symmetrical correlated space of integers store in a tre...
void FillFromH2(TH2 *h2)
fill correlated space from H2
void CorrSpaceTreeWriteFromH2()