AnalysisxTree.h 9.18 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Mon Oct  3 10:53:30 2016 by ROOT version 5.34/30
// from TTree AnalysisxTree/Go4FileStore
// found on file: clb01_0001.root
//////////////////////////////////////////////////////////

#ifndef AnalysisxTree_h
#define AnalysisxTree_h

#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>

// Header file for the classes stored in the TTree if any.

// Fixed size dimensions of array or collections stored in the TTree if any.
   const Int_t kMaxLiEvent = 1;

class AnalysisxTree {
public :
   TTree          *fChain;   //!pointer to the analyzed TTree or TChain
   Int_t           fCurrent; //!current Tree number in a TChain

   // Declaration of leaf types
 //TLiEvent        *LiEvent_;
 //TLiEvent        *LiEvent_TGo4EventElement;
   UShort_t        LiEvent_SQ11[16];
   UShort_t        LiEvent_SQ12[32];
   UShort_t        LiEvent_SQ13[16];
   UShort_t        LiEvent_SQ21[16];
   UShort_t        LiEvent_SQ22[32];
   UShort_t        LiEvent_SQ23[16];
   UShort_t        LiEvent_ANR[16];
   UShort_t        LiEvent_ANS[16];
   UShort_t        LiEvent_ANC[32];
   UShort_t        LiEvent_TSQ11[16];
   UShort_t        LiEvent_TSQ12[32];
   UShort_t        LiEvent_TSQ21[16];
   UShort_t        LiEvent_TSQ22[32];
   UShort_t        LiEvent_TANR[16];
   UShort_t        LiEvent_TANS[16];
   UShort_t        LiEvent_QDC[16];
   UShort_t        LiEvent_TDC[16];
   UShort_t        LiEvent_SCR[16];
   UShort_t        LiEvent_nx1;
   UShort_t        LiEvent_ny1;
   UShort_t        LiEvent_nx2;
   UShort_t        LiEvent_ny2;
   UShort_t        LiEvent_x1[32];
   UShort_t        LiEvent_y1[32];
   UShort_t        LiEvent_x2[32];
   UShort_t        LiEvent_y2[32];
   UShort_t        LiEvent_adc1[16];
   UShort_t        LiEvent_adc2[16];
   UShort_t        LiEvent_adc3[16];
   UShort_t        LiEvent_adc4[16];
   UShort_t        LiEvent_tdc1[32];
   UShort_t        LiEvent_tdc2[32];
   UInt_t          LiEvent_time;
   Int_t           LiEvent_nevent;
   Int_t           LiEvent_trigger;
   Int_t           LiEvent_subevents;
   Int_t           LiEvent_evsize;

   // List of branches
   TBranch        *b_LiEvent_SQ11;   //!
   TBranch        *b_LiEvent_SQ12;   //!
   TBranch        *b_LiEvent_SQ13;   //!
   TBranch        *b_LiEvent_SQ21;   //!
   TBranch        *b_LiEvent_SQ22;   //!
   TBranch        *b_LiEvent_SQ23;   //!
   TBranch        *b_LiEvent_ANR;   //!
   TBranch        *b_LiEvent_ANS;   //!
   TBranch        *b_LiEvent_ANC;   //!
   TBranch        *b_LiEvent_TSQ11;   //!
   TBranch        *b_LiEvent_TSQ12;   //!
   TBranch        *b_LiEvent_TSQ21;   //!
   TBranch        *b_LiEvent_TSQ22;   //!
   TBranch        *b_LiEvent_TANR;   //!
   TBranch        *b_LiEvent_TANS;   //!
   TBranch        *b_LiEvent_QDC;   //!
   TBranch        *b_LiEvent_TDC;   //!
   TBranch        *b_LiEvent_SCR;   //!
   TBranch        *b_LiEvent_nx1;   //!
   TBranch        *b_LiEvent_ny1;   //!
   TBranch        *b_LiEvent_nx2;   //!
   TBranch        *b_LiEvent_ny2;   //!
   TBranch        *b_LiEvent_x1;   //!
   TBranch        *b_LiEvent_y1;   //!
   TBranch        *b_LiEvent_x2;   //!
   TBranch        *b_LiEvent_y2;   //!
   TBranch        *b_LiEvent_adc1;   //!
   TBranch        *b_LiEvent_adc2;   //!
   TBranch        *b_LiEvent_adc3;   //!
   TBranch        *b_LiEvent_adc4;   //!
   TBranch        *b_LiEvent_tdc1;   //!
   TBranch        *b_LiEvent_tdc2;   //!
   TBranch        *b_LiEvent_time;   //!
   TBranch        *b_LiEvent_nevent;   //!
   TBranch        *b_LiEvent_trigger;   //!
   TBranch        *b_LiEvent_subevents;   //!
   TBranch        *b_LiEvent_evsize;   //!

   AnalysisxTree(TTree *tree=0);
   virtual ~AnalysisxTree();
   virtual Int_t    Cut(Long64_t entry);
   virtual Int_t    GetEntry(Long64_t entry);
   virtual Long64_t LoadTree(Long64_t entry);
   virtual void     Init(TTree *tree);
   virtual void     Loop();
   virtual Bool_t   Notify();
   virtual void     Show(Long64_t entry = -1);
};

#endif

#ifdef AnalysisxTree_cxx
AnalysisxTree::AnalysisxTree(TTree *tree) : fChain(0) 
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
   if (tree == 0) {
      TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("clb01_0001.root");
      if (!f || !f->IsOpen()) {
         f = new TFile("clb01_0001.root");
      }
      f->GetObject("AnalysisxTree",tree);

   }
   Init(tree);
}

AnalysisxTree::~AnalysisxTree()
{
   if (!fChain) return;
   delete fChain->GetCurrentFile();
}

Int_t AnalysisxTree::GetEntry(Long64_t entry)
{
// Read contents of entry.
   if (!fChain) return 0;
   return fChain->GetEntry(entry);
}
Long64_t AnalysisxTree::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
   if (!fChain) return -5;
   Long64_t centry = fChain->LoadTree(entry);
   if (centry < 0) return centry;
   if (fChain->GetTreeNumber() != fCurrent) {
      fCurrent = fChain->GetTreeNumber();
      Notify();
   }
   return centry;
}

void AnalysisxTree::Init(TTree *tree)
{
   // The Init() function is called when the selector needs to initialize
   // a new tree or chain. Typically here the branch addresses and branch
   // pointers of the tree will be set.
   // It is normally not necessary to make changes to the generated
   // code, but the routine can be extended by the user if needed.
   // Init() will be called many times when running on PROOF
   // (once per file to be processed).

   // Set branch addresses and branch pointers
   if (!tree) return;
   fChain = tree;
   fCurrent = -1;
   fChain->SetMakeClass(1);

   fChain->SetBranchAddress("LiEvent.SQ11[16]", LiEvent_SQ11, &b_LiEvent_SQ11);
   fChain->SetBranchAddress("LiEvent.SQ12[32]", LiEvent_SQ12, &b_LiEvent_SQ12);
   fChain->SetBranchAddress("LiEvent.SQ13[16]", LiEvent_SQ13, &b_LiEvent_SQ13);
   fChain->SetBranchAddress("LiEvent.SQ21[16]", LiEvent_SQ21, &b_LiEvent_SQ21);
   fChain->SetBranchAddress("LiEvent.SQ22[32]", LiEvent_SQ22, &b_LiEvent_SQ22);
   fChain->SetBranchAddress("LiEvent.SQ23[16]", LiEvent_SQ23, &b_LiEvent_SQ23);
   fChain->SetBranchAddress("LiEvent.ANR[16]", LiEvent_ANR, &b_LiEvent_ANR);
   fChain->SetBranchAddress("LiEvent.ANS[16]", LiEvent_ANS, &b_LiEvent_ANS);
   fChain->SetBranchAddress("LiEvent.ANC[32]", LiEvent_ANC, &b_LiEvent_ANC);
   fChain->SetBranchAddress("LiEvent.TSQ11[16]", LiEvent_TSQ11, &b_LiEvent_TSQ11);
   fChain->SetBranchAddress("LiEvent.TSQ12[32]", LiEvent_TSQ12, &b_LiEvent_TSQ12);
   fChain->SetBranchAddress("LiEvent.TSQ21[16]", LiEvent_TSQ21, &b_LiEvent_TSQ21);
   fChain->SetBranchAddress("LiEvent.TSQ22[32]", LiEvent_TSQ22, &b_LiEvent_TSQ22);
   fChain->SetBranchAddress("LiEvent.TANR[16]", LiEvent_TANR, &b_LiEvent_TANR);
   fChain->SetBranchAddress("LiEvent.TANS[16]", LiEvent_TANS, &b_LiEvent_TANS);
   fChain->SetBranchAddress("LiEvent.QDC[16]", LiEvent_QDC, &b_LiEvent_QDC);
   fChain->SetBranchAddress("LiEvent.TDC[16]", LiEvent_TDC, &b_LiEvent_TDC);
   fChain->SetBranchAddress("LiEvent.SCR[16]", LiEvent_SCR, &b_LiEvent_SCR);
   fChain->SetBranchAddress("LiEvent.nx1", &LiEvent_nx1, &b_LiEvent_nx1);
   fChain->SetBranchAddress("LiEvent.ny1", &LiEvent_ny1, &b_LiEvent_ny1);
   fChain->SetBranchAddress("LiEvent.nx2", &LiEvent_nx2, &b_LiEvent_nx2);
   fChain->SetBranchAddress("LiEvent.ny2", &LiEvent_ny2, &b_LiEvent_ny2);
   fChain->SetBranchAddress("LiEvent.x1[32]", LiEvent_x1, &b_LiEvent_x1);
   fChain->SetBranchAddress("LiEvent.y1[32]", LiEvent_y1, &b_LiEvent_y1);
   fChain->SetBranchAddress("LiEvent.x2[32]", LiEvent_x2, &b_LiEvent_x2);
   fChain->SetBranchAddress("LiEvent.y2[32]", LiEvent_y2, &b_LiEvent_y2);
   fChain->SetBranchAddress("LiEvent.adc1[16]", LiEvent_adc1, &b_LiEvent_adc1);
   fChain->SetBranchAddress("LiEvent.adc2[16]", LiEvent_adc2, &b_LiEvent_adc2);
   fChain->SetBranchAddress("LiEvent.adc3[16]", LiEvent_adc3, &b_LiEvent_adc3);
   fChain->SetBranchAddress("LiEvent.adc4[16]", LiEvent_adc4, &b_LiEvent_adc4);
   fChain->SetBranchAddress("LiEvent.tdc1[32]", LiEvent_tdc1, &b_LiEvent_tdc1);
   fChain->SetBranchAddress("LiEvent.tdc2[32]", LiEvent_tdc2, &b_LiEvent_tdc2);
   fChain->SetBranchAddress("LiEvent.time", &LiEvent_time, &b_LiEvent_time);
   fChain->SetBranchAddress("LiEvent.nevent", &LiEvent_nevent, &b_LiEvent_nevent);
   fChain->SetBranchAddress("LiEvent.trigger", &LiEvent_trigger, &b_LiEvent_trigger);
   fChain->SetBranchAddress("LiEvent.subevents", &LiEvent_subevents, &b_LiEvent_subevents);
   fChain->SetBranchAddress("LiEvent.evsize", &LiEvent_evsize, &b_LiEvent_evsize);
   Notify();
}

Bool_t AnalysisxTree::Notify()
{
   // The Notify() function is called when a new file is opened. This
   // can be either for a new TTree in a TChain or when when a new TTree
   // is started when using PROOF. It is normally not necessary to make changes
   // to the generated code, but the routine can be extended by the
   // user if needed. The return value is currently not used.

   return kTRUE;
}

void AnalysisxTree::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
   if (!fChain) return;
   fChain->Show(entry);
}
Int_t AnalysisxTree::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns  1 if entry is accepted.
// returns -1 otherwise.
   return 1;
}
#endif // #ifdef AnalysisxTree_cxx