Line | |
---|
1 | /** |
---|
2 | * Author: John Idarraga <idarraga@cern.ch> , 2009 |
---|
3 | * |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef AllPix_Frames_WriteToEntuple_h |
---|
7 | #define AllPix_Frames_WriteToEntuple_h 1 |
---|
8 | |
---|
9 | |
---|
10 | #include <TROOT.h> |
---|
11 | #include <TChain.h> |
---|
12 | #include <TString.h> |
---|
13 | #include <TFile.h> |
---|
14 | #include <TH2.h> |
---|
15 | #include <TStyle.h> |
---|
16 | #include <TCanvas.h> |
---|
17 | #include <TTree.h> |
---|
18 | #include <TBranch.h> |
---|
19 | #include <TObjArray.h> |
---|
20 | #include <TMath.h> |
---|
21 | |
---|
22 | #include "allpix_dm_consts.h" |
---|
23 | |
---|
24 | /** Implements what is needed to write the |
---|
25 | * frames info and the MetaData |
---|
26 | * to an Ntuple ROOT file. |
---|
27 | */ |
---|
28 | |
---|
29 | class FramesHandler; |
---|
30 | class FrameStruct; |
---|
31 | |
---|
32 | class WriteToNtuple { |
---|
33 | |
---|
34 | public: |
---|
35 | |
---|
36 | WriteToNtuple(TString, TString, Int_t, TString om="RECREATE"); |
---|
37 | virtual ~WriteToNtuple(); |
---|
38 | void fillVars(FramesHandler *); |
---|
39 | void closeNtuple(); |
---|
40 | TString GetNtupleFileName(){return m_ntupleFileName;}; |
---|
41 | static WriteToNtuple * GetInstance(TString, TString, Int_t, Int_t, int *, TString openmode = "RECREATE"); |
---|
42 | TTree * GetTree(){return t2;}; |
---|
43 | //void SetBranchAddress(FrameStruct * fs){b2->SetAddress(fs);}; |
---|
44 | Int_t GetDetectorId(){return m_detID;}; |
---|
45 | |
---|
46 | private: |
---|
47 | |
---|
48 | FrameStruct * m_frame; |
---|
49 | |
---|
50 | TH2 * h1; |
---|
51 | TFile * nt; |
---|
52 | TTree * t2; |
---|
53 | TBranch * b2; |
---|
54 | TString m_MPXDataSetNumber; |
---|
55 | TString m_ntupleFileName; |
---|
56 | Int_t m_detID; |
---|
57 | |
---|
58 | |
---|
59 | ClassDef(WriteToNtuple,1) |
---|
60 | }; |
---|
61 | |
---|
62 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.