All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRTPreProcessTree.cc
Go to the documentation of this file.
1 #ifndef CRT_PREPROCESS_TREE_CC
2 #define CRT_PREPROCESS_TREE_CC
3 
4 //#include "./CRTPreProcessTree.h"
6 
7 using namespace icarus::crt;
8 
10  fTree = tr;
11  //fTree->SetMaxVirtualSize(16e9);
12  fTree->LoadBaskets(16e9);
13  Init();
14 }
15 
17 
18  fTree->SetBranchAddress("mac5", &fMac5, &b_Mac5);
19  fTree->SetBranchAddress("pe", fPE, &b_PE);
20  fTree->SetBranchAddress("active", fActive, &b_Active);
21  fTree->SetBranchAddress("maxChan", &fMaxChan, &b_MaxChan);
22  fTree->SetBranchAddress("maxPE", &fMaxPE, &b_MaxPE);
23  fTree->SetBranchAddress("totPE", &fTotPE, &b_TotPE);
24  fTree->SetBranchAddress("nAbove", &fNChanAbove, &b_NChanAbove);
25  fTree->SetBranchAddress("above", fAbove, &b_Above);
26  fTree->SetBranchAddress("isNoise", &fIsNoise, &b_IsNoise);
27  fTree->SetBranchAddress("region", &fRegion, &b_Region);
28  fTree->SetBranchAddress("layer", &fLayer, &b_Layer);
29  fTree->SetBranchAddress("t0", &fT0, &b_T0);
30  fTree->SetBranchAddress("pollRate", &fPollRate, &b_PollRate);
31  fTree->SetBranchAddress("instRate", &fInstRate, &b_InstRate);
32 
33 
34 }
35 
37  return (size_t)fTree->GetEntriesFast();
38 }
39 
40 uint64_t CRTPreProcessTree::GetAbsTime(size_t ientry) const {
41  if(ientry >= GetNEntries()) {
42  std::cout << "ERROR in CRTRawTree::GetAbsTime: entry out of range" << std::endl;
43  return UINT64_MAX;
44  }
45 
46  fTree->GetEntry(ientry);
47  return (uint64_t)fT0;
48 }
49 
51  return (uint64_t)fT0;
52 }
53 
54 void CRTPreProcessTree::Load(size_t ientry) const {
55  fTree->GetEntry(ientry);
56 }
57 uint8_t CRTPreProcessTree::Mac5() const {
58  return fMac5;
59 }
61  return fIsNoise;
62 }
63 uint8_t CRTPreProcessTree::MaxChan() const {
64  return fMaxChan;
65 }
66 float CRTPreProcessTree::MaxPE() const {
67  return fMaxPE;
68 }
69 float CRTPreProcessTree::TotPE() const {
70  return fTotPE;
71 }
72 float CRTPreProcessTree::PE(uint8_t chan) const {
73  return fPE[chan];
74 }
76  return fNChanAbove;
77 }
78 bool CRTPreProcessTree::Above(uint8_t chan) const {
79  return fAbove[chan];
80 }
81 bool CRTPreProcessTree::Active(uint8_t chan) const {
82  return fActive[chan];
83 }
85  return fRegion;
86 }
88  return fLayer;
89 }
91  return fPollRate;
92 }
94  return fInstRate;
95 }
96 uint64_t CRTPreProcessTree::T0() const {
97  return (uint64_t)fT0;
98 }
99 
100 #endif
void Load(size_t ientry) const
bool Above(uint8_t chan) const
bool Active(uint8_t chan) const
float PE(uint8_t chan) const
process_name crt
BEGIN_PROLOG could also be cout