source: SuperB-LAL/trunk/slacExperiment_USBWC-CRT/mergeCRTandUSB/src/usbwcFileStr.hh

Last change on this file was 14, checked in by narnaud, 14 years ago

Initial commit

File size: 2.2 KB
Line 
1#ifndef usbwcFileStr_h
2#define usbwcFileStr_h
3
4//my
5#include "usbConst.hh"
6
7//root
8#include <TROOT.h>
9#include <TChain.h>
10#include <TFile.h>
11#include <TH1D.h>
12#include <TString.h>
13
14using namespace std;
15
16class TH2D;
17
18class usbwcFileStr {
19public :
20
21  usbwcFileStr();
22  ~usbwcFileStr();
23  void addFilesToChain(string name);
24  Int_t    GetEntry(Long64_t entry);
25  Long64_t LoadTree(Long64_t entry);
26  void     Init(TTree *tree);
27  void     Loop(TString histFName);
28  void     LaserAna(TString histFName); 
29  void     Show(Long64_t entry = -1);
30
31  // fill unix time into unixTimeUSB array
32  void GetUnixTime(Double_t *unixTimeUSB, Int_t Nmax, Int_t &nEv);
33  //fill _Rate, _unixTimeBegin, _unixTimeEnd variables of the class
34  void GetDataRate();
35  Double_t _Rate;
36  Double_t _unixTimeBegin;
37  Double_t _unixTimeEnd;
38 
39  Bool_t CheckDistInTime();
40  void saveUnixTime2File(TString fileN);
41  void initH1_F(TH1D *h[usbConst::usbwcNchannels],
42                TString hName , TString hTitle,
43                Int_t nBin, Double_t binMin, 
44                Double_t binMax);   
45  void initH2_F(TH2D *h[usbConst::usbwcNchannels],
46                TString hName , TString hTitle,
47                Int_t nBin1, Double_t binMin1, 
48                Double_t binMax1, 
49                Int_t nBin2, Double_t binMin2, 
50                Double_t binMax2);   
51
52  Double_t  idealCosmicWF_t[100][usbConst::usbwcNchannels];
53  Double_t  idealCosmicWF_A[100][usbConst::usbwcNchannels];
54
55  void SetIdealCosmicWF(TString nam, Int_t chID);
56
57  TTree          *fChain;   //!pointer to the analyzed TTree or TChain
58  Int_t           fCurrent; //!current Tree number in a TChain
59 
60  // Declaration of leaf types
61  Int_t          eventID;
62  Float_t        SamplingPeriod;
63  Int_t          INLCorrection;
64  Int_t          FCR;
65  Double_t       UnixTime;
66  Float_t        ch[usbConst::usbwcNchannels][usbConst::usbwcNsamplingPoint];
67  Float_t        Charge[usbConst::usbwcNchannels];
68  Float_t        Time[usbConst::usbwcNchannels];
69  Float_t        Amplitude[usbConst::usbwcNchannels];
70 
71  // List of branches
72  TBranch        *b_eventID;   //!
73  TBranch        *b_SamplingPeriod;   //!
74  TBranch        *b_INLCorrection;   //!
75  TBranch        *b_FCR;   //!
76  TBranch        *b_UnixTime;   //!
77  TBranch        *b_ch;   //!
78  TBranch        *b_Charge;   //!
79  TBranch        *b_Time;   //!
80  TBranch        *b_Amplitude;   //!
81 
82};
83
84#endif
Note: See TracBrowser for help on using the repository browser.