htree.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. //////////////////////////////////////////////////////////
  2. // This class has been automatically generated on
  3. // Fri Mar 27 23:50:31 2015 by ROOT version 5.34/28
  4. // from TTree htree/Hadron EMC + TOF tree
  5. // found on file: 312471_0.root
  6. //////////////////////////////////////////////////////////
  7. #ifndef htree_h
  8. #define htree_h
  9. #include <TROOT.h>
  10. #include <TTree.h>
  11. #include <TFile.h>
  12. #include <TString.h>
  13. #include "error.h"
  14. #include "errno.h"
  15. // Header file for the classes stored in the TTree if any.
  16. // Fixed size dimensions of array or collections stored in the TTree if any.
  17. class htree {
  18. public :
  19. TTree *fChain; //!pointer to the analyzed TTree or TChain
  20. Int_t fCurrent; //!current Tree number in a TChain
  21. TFile *output;
  22. // Declaration of leaf types
  23. Int_t run;
  24. Float_t bbcz;
  25. Float_t cent;
  26. Float_t BbcT;
  27. Float_t QX10;
  28. Float_t QX11;
  29. Float_t QX12;
  30. Float_t QX13;
  31. Float_t QX14;
  32. Float_t QX15;
  33. Float_t QX16;
  34. Float_t QX17;
  35. Float_t QX18;
  36. Float_t QY10;
  37. Float_t QY11;
  38. Float_t QY12;
  39. Float_t QY13;
  40. Float_t QY14;
  41. Float_t QY15;
  42. Float_t QY16;
  43. Float_t QY17;
  44. Float_t QY18;
  45. Float_t bbcQY10;
  46. Float_t bbcQY11;
  47. Float_t bbcQY12;
  48. Float_t bbcQX10;
  49. Float_t bbcQX11;
  50. Float_t bbcQX12;
  51. Float_t mpcQY10;
  52. Float_t mpcQY11;
  53. Float_t mpcQY12;
  54. Float_t mpcQX10;
  55. Float_t mpcQX11;
  56. Float_t mpcQX12;
  57. Int_t nh;
  58. Float_t p[42]; //[nh]
  59. Short_t charge[42]; //[nh]
  60. Float_t phi0[42]; //[nh]
  61. Float_t the0[42]; //[nh]
  62. Short_t dcarm[42]; //[nh]
  63. Float_t pc3dz[42]; //[nh]
  64. Float_t pc3dphi[42]; //[nh]
  65. Float_t alpha[42]; //[nh]
  66. Float_t phi[42]; //[nh]
  67. Float_t zed[42]; //[nh]
  68. Short_t n0[42]; //[nh]
  69. Float_t tofdz[42]; //[nh]
  70. Float_t tofdphi[42]; //[nh]
  71. Float_t pc2dz[42]; //[nh]
  72. Float_t pc2dphi[42]; //[nh]
  73. Float_t emcdz[42]; //[nh]
  74. Float_t emcdphi[42]; //[nh]
  75. Short_t sect[42]; //[nh]
  76. Short_t ysect[42]; //[nh]
  77. Short_t zsect[42]; //[nh]
  78. Float_t plemc[42]; //[nh]
  79. Float_t ecent[42]; //[nh]
  80. Float_t emcrawtdc[42]; //[nh]
  81. Float_t emcrawadc[42]; //[nh]
  82. Float_t ecore[42]; //[nh]
  83. Float_t ttof[42]; //[nh]
  84. Float_t pltof[42]; //[nh]
  85. Float_t etof[42]; //[nh]
  86. Int_t slat[42]; //[nh]
  87. Int_t rh;
  88. Float_t phir[47]; //[rh]
  89. Float_t time[47]; //[rh]
  90. Float_t qr0[47]; //[rh]
  91. Float_t etar[47]; //[rh]
  92. Short_t armr[47]; //[rh]
  93. Short_t ring[47]; //[rh]
  94. Int_t chid[47]; //[rh]
  95. // List of branches
  96. TBranch *b_run; //!
  97. TBranch *b_bbcz; //!
  98. TBranch *b_cent; //!
  99. TBranch *b_BbcT; //!
  100. TBranch *b_QX10; //!
  101. TBranch *b_QX11; //!
  102. TBranch *b_QX12; //!
  103. TBranch *b_QX13; //!
  104. TBranch *b_QX14; //!
  105. TBranch *b_QX15; //!
  106. TBranch *b_QX16; //!
  107. TBranch *b_QX17; //!
  108. TBranch *b_QX18; //!
  109. TBranch *b_QY10; //!
  110. TBranch *b_QY11; //!
  111. TBranch *b_QY12; //!
  112. TBranch *b_QY13; //!
  113. TBranch *b_QY14; //!
  114. TBranch *b_QY15; //!
  115. TBranch *b_QY16; //!
  116. TBranch *b_QY17; //!
  117. TBranch *b_QY18; //!
  118. TBranch *b_bbcQY10; //!
  119. TBranch *b_bbcQY11; //!
  120. TBranch *b_bbcQY12; //!
  121. TBranch *b_bbcQX10; //!
  122. TBranch *b_bbcQX11; //!
  123. TBranch *b_bbcQX12; //!
  124. TBranch *b_mpcQY10; //!
  125. TBranch *b_mpcQY11; //!
  126. TBranch *b_mpcQY12; //!
  127. TBranch *b_mpcQX10; //!
  128. TBranch *b_mpcQX11; //!
  129. TBranch *b_mpcQX12; //!
  130. TBranch *b_nh; //!
  131. TBranch *b_p; //!
  132. TBranch *b_charge; //!
  133. TBranch *b_phi0; //!
  134. TBranch *b_the0; //!
  135. TBranch *b_dcarm; //!
  136. TBranch *b_pc3dz; //!
  137. TBranch *b_pc3dphi; //!
  138. TBranch *b_alpha; //!
  139. TBranch *b_phi; //!
  140. TBranch *b_zed; //!
  141. TBranch *b_n0; //!
  142. TBranch *b_tofdz; //!
  143. TBranch *b_tofdphi; //!
  144. TBranch *b_pc2dz; //!
  145. TBranch *b_pc2dphi; //!
  146. TBranch *b_emcdz; //!
  147. TBranch *b_emcdphi; //!
  148. TBranch *b_sect; //!
  149. TBranch *b_ysect; //!
  150. TBranch *b_zsect; //!
  151. TBranch *b_plemc; //!
  152. TBranch *b_ecent; //!
  153. TBranch *b_emcrawtdc; //!
  154. TBranch *b_emcrawadc; //!
  155. TBranch *b_ecore; //!
  156. TBranch *b_ttof; //!
  157. TBranch *b_pltof; //!
  158. TBranch *b_etof; //!
  159. TBranch *b_slat; //!
  160. TBranch *b_rh; //!
  161. TBranch *b_phir; //!
  162. TBranch *b_time; //!
  163. TBranch *b_qr0; //!
  164. TBranch *b_etar; //!
  165. TBranch *b_armr; //!
  166. TBranch *b_ring; //!
  167. TBranch *b_chid; //!
  168. htree(TTree *tree=0);
  169. htree(const char *name, TTree *tree=0);
  170. virtual ~htree();
  171. virtual Int_t Cut(Long64_t entry);
  172. virtual Int_t GetEntry(Long64_t entry);
  173. virtual Long64_t LoadTree(Long64_t entry);
  174. virtual void Init(TTree *tree);
  175. virtual void Loop();
  176. virtual Bool_t Notify();
  177. virtual void Show(Long64_t entry = -1);
  178. };
  179. #endif
  180. #ifdef htree_cxx
  181. htree::htree(TTree *tree) : fChain(0)
  182. {
  183. // if parameter tree is not specified (or zero), connect the file
  184. // used to generate this class and read the Tree.
  185. if (tree == 0) {
  186. TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("312471_0.root");
  187. if (!f || !f->IsOpen()) {
  188. f = new TFile("312471_0.root");
  189. }
  190. f->GetObject("htree",tree);
  191. }
  192. Init(tree);
  193. }
  194. htree::htree(const char *name, TTree *tree) : fChain(0)
  195. {
  196. // if parameter tree is not specified (or zero), connect the file
  197. // used to generate this class and read the Tree.
  198. if (tree == 0) {
  199. TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject(name);
  200. if (!f || !f->IsOpen()) {
  201. f = new TFile(name);
  202. if (f->IsZombie())
  203. error(EIO, errno, "failed to open input file %s for writing", name);
  204. }
  205. f->GetObject("htree",tree);
  206. }
  207. Init(tree);
  208. // prepare output
  209. TString str = "res-";
  210. str += name;
  211. output = new TFile(str.Data(),"recreate");
  212. if (output->IsZombie())
  213. error(EIO, errno, "failed to open output file %s for writing", str.Data());
  214. }
  215. htree::~htree()
  216. {
  217. if (!fChain) return;
  218. delete fChain->GetCurrentFile();
  219. output->Close();
  220. }
  221. Int_t htree::GetEntry(Long64_t entry)
  222. {
  223. // Read contents of entry.
  224. if (!fChain) return 0;
  225. return fChain->GetEntry(entry);
  226. }
  227. Long64_t htree::LoadTree(Long64_t entry)
  228. {
  229. // Set the environment to read one entry
  230. if (!fChain) return -5;
  231. Long64_t centry = fChain->LoadTree(entry);
  232. if (centry < 0) return centry;
  233. if (fChain->GetTreeNumber() != fCurrent) {
  234. fCurrent = fChain->GetTreeNumber();
  235. Notify();
  236. }
  237. return centry;
  238. }
  239. void htree::Init(TTree *tree)
  240. {
  241. // The Init() function is called when the selector needs to initialize
  242. // a new tree or chain. Typically here the branch addresses and branch
  243. // pointers of the tree will be set.
  244. // It is normally not necessary to make changes to the generated
  245. // code, but the routine can be extended by the user if needed.
  246. // Init() will be called many times when running on PROOF
  247. // (once per file to be processed).
  248. // Set branch addresses and branch pointers
  249. if (!tree) return;
  250. fChain = tree;
  251. fCurrent = -1;
  252. fChain->SetMakeClass(1);
  253. fChain->SetBranchAddress("run", &run, &b_run);
  254. fChain->SetBranchAddress("bbcz", &bbcz, &b_bbcz);
  255. fChain->SetBranchAddress("cent", &cent, &b_cent);
  256. fChain->SetBranchAddress("BbcT", &BbcT, &b_BbcT);
  257. fChain->SetBranchAddress("QX10", &QX10, &b_QX10);
  258. fChain->SetBranchAddress("QX11", &QX11, &b_QX11);
  259. fChain->SetBranchAddress("QX12", &QX12, &b_QX12);
  260. fChain->SetBranchAddress("QX13", &QX13, &b_QX13);
  261. fChain->SetBranchAddress("QX14", &QX14, &b_QX14);
  262. fChain->SetBranchAddress("QX15", &QX15, &b_QX15);
  263. fChain->SetBranchAddress("QX16", &QX16, &b_QX16);
  264. fChain->SetBranchAddress("QX17", &QX17, &b_QX17);
  265. fChain->SetBranchAddress("QX18", &QX18, &b_QX18);
  266. fChain->SetBranchAddress("QY10", &QY10, &b_QY10);
  267. fChain->SetBranchAddress("QY11", &QY11, &b_QY11);
  268. fChain->SetBranchAddress("QY12", &QY12, &b_QY12);
  269. fChain->SetBranchAddress("QY13", &QY13, &b_QY13);
  270. fChain->SetBranchAddress("QY14", &QY14, &b_QY14);
  271. fChain->SetBranchAddress("QY15", &QY15, &b_QY15);
  272. fChain->SetBranchAddress("QY16", &QY16, &b_QY16);
  273. fChain->SetBranchAddress("QY17", &QY17, &b_QY17);
  274. fChain->SetBranchAddress("QY18", &QY18, &b_QY18);
  275. fChain->SetBranchAddress("bbcQY10", &bbcQY10, &b_bbcQY10);
  276. fChain->SetBranchAddress("bbcQY11", &bbcQY11, &b_bbcQY11);
  277. fChain->SetBranchAddress("bbcQY12", &bbcQY12, &b_bbcQY12);
  278. fChain->SetBranchAddress("bbcQX10", &bbcQX10, &b_bbcQX10);
  279. fChain->SetBranchAddress("bbcQX11", &bbcQX11, &b_bbcQX11);
  280. fChain->SetBranchAddress("bbcQX12", &bbcQX12, &b_bbcQX12);
  281. fChain->SetBranchAddress("mpcQY10", &mpcQY10, &b_mpcQY10);
  282. fChain->SetBranchAddress("mpcQY11", &mpcQY11, &b_mpcQY11);
  283. fChain->SetBranchAddress("mpcQY12", &mpcQY12, &b_mpcQY12);
  284. fChain->SetBranchAddress("mpcQX10", &mpcQX10, &b_mpcQX10);
  285. fChain->SetBranchAddress("mpcQX11", &mpcQX11, &b_mpcQX11);
  286. fChain->SetBranchAddress("mpcQX12", &mpcQX12, &b_mpcQX12);
  287. fChain->SetBranchAddress("nh", &nh, &b_nh);
  288. fChain->SetBranchAddress("p", p, &b_p);
  289. fChain->SetBranchAddress("charge", charge, &b_charge);
  290. fChain->SetBranchAddress("phi0", phi0, &b_phi0);
  291. fChain->SetBranchAddress("the0", the0, &b_the0);
  292. fChain->SetBranchAddress("dcarm", dcarm, &b_dcarm);
  293. fChain->SetBranchAddress("pc3dz", pc3dz, &b_pc3dz);
  294. fChain->SetBranchAddress("pc3dphi", pc3dphi, &b_pc3dphi);
  295. fChain->SetBranchAddress("alpha", alpha, &b_alpha);
  296. fChain->SetBranchAddress("phi", phi, &b_phi);
  297. fChain->SetBranchAddress("zed", zed, &b_zed);
  298. fChain->SetBranchAddress("n0", n0, &b_n0);
  299. fChain->SetBranchAddress("tofdz", tofdz, &b_tofdz);
  300. fChain->SetBranchAddress("tofdphi", tofdphi, &b_tofdphi);
  301. fChain->SetBranchAddress("pc2dz", pc2dz, &b_pc2dz);
  302. fChain->SetBranchAddress("pc2dphi", pc2dphi, &b_pc2dphi);
  303. fChain->SetBranchAddress("emcdz", emcdz, &b_emcdz);
  304. fChain->SetBranchAddress("emcdphi", emcdphi, &b_emcdphi);
  305. fChain->SetBranchAddress("sect", sect, &b_sect);
  306. fChain->SetBranchAddress("ysect", ysect, &b_ysect);
  307. fChain->SetBranchAddress("zsect", zsect, &b_zsect);
  308. fChain->SetBranchAddress("plemc", plemc, &b_plemc);
  309. fChain->SetBranchAddress("ecent", ecent, &b_ecent);
  310. fChain->SetBranchAddress("emcrawtdc", emcrawtdc, &b_emcrawtdc);
  311. fChain->SetBranchAddress("emcrawadc", emcrawadc, &b_emcrawadc);
  312. fChain->SetBranchAddress("ecore", ecore, &b_ecore);
  313. fChain->SetBranchAddress("ttof", ttof, &b_ttof);
  314. fChain->SetBranchAddress("pltof", pltof, &b_pltof);
  315. fChain->SetBranchAddress("etof", etof, &b_etof);
  316. fChain->SetBranchAddress("slat", slat, &b_slat);
  317. fChain->SetBranchAddress("rh", &rh, &b_rh);
  318. fChain->SetBranchAddress("phir", phir, &b_phir);
  319. fChain->SetBranchAddress("time", time, &b_time);
  320. fChain->SetBranchAddress("qr0", qr0, &b_qr0);
  321. fChain->SetBranchAddress("etar", etar, &b_etar);
  322. fChain->SetBranchAddress("armr", armr, &b_armr);
  323. fChain->SetBranchAddress("ring", ring, &b_ring);
  324. fChain->SetBranchAddress("chid", chid, &b_chid);
  325. Notify();
  326. }
  327. Bool_t htree::Notify()
  328. {
  329. // The Notify() function is called when a new file is opened. This
  330. // can be either for a new TTree in a TChain or when when a new TTree
  331. // is started when using PROOF. It is normally not necessary to make changes
  332. // to the generated code, but the routine can be extended by the
  333. // user if needed. The return value is currently not used.
  334. return kTRUE;
  335. }
  336. void htree::Show(Long64_t entry)
  337. {
  338. // Print contents of entry.
  339. // If entry is not specified, print current entry
  340. if (!fChain) return;
  341. fChain->Show(entry);
  342. }
  343. Int_t htree::Cut(Long64_t entry)
  344. {
  345. // This function may be called from Loop.
  346. // returns 1 if entry is accepted.
  347. // returns -1 otherwise.
  348. return 1;
  349. }
  350. #endif // #ifdef htree_cxx