![]() |
|
|||
File indexing completed on 2025-08-05 08:14:38
0001 0002 // ============================================================================================= 0003 0004 0005 hcalTree::hcalTree(){ 0006 hLabHelper * hlHelper = hLabHelper::getInstance(); 0007 hcalHelper * hHelper = hcalHelper::getInstance(); 0008 0009 // hlHelper->fhcl = new TFile(hlHelper->rootfName,"recreate"); 0010 hlHelper->thcl = new TTree("thcl","HCal Data Tree"); 0011 cout<<"hcalTree::hcalTree> HCal Data Tree is created in the directory of "<<hlHelper->rootTempFileName<<endl; 0012 0013 hlHelper->thcl ->SetMaxTreeSize(1000000000); 0014 0015 hlHelper->thcl->Branch("runnumber" ,&hHelper->runnumber, "runnumber/I"); 0016 hlHelper->thcl->Branch("eventseq", &hHelper->eventseq, "eventseq/I"); 0017 hlHelper->thcl->Branch("reject", &hHelper->eventReject, "reject/I"); 0018 hlHelper->thcl->Branch("trigger", &hHelper->eventTrigger,"trigger/I"); 0019 TString rawbranch = "adc["; rawbranch += ACTIVECHANNELS; rawbranch += "]["; rawbranch += NSAMPLES; rawbranch += "]/F"; 0020 hlHelper->thcl->Branch("adc", hHelper->adc, rawbranch); 0021 // from hcal object 0022 hlHelper->thcl->Branch("amplTotal", &hHelper->t1044->amplTotal, "amplTotal/D"); 0023 hlHelper->thcl->Branch("eTotal", &hHelper->t1044->eTotal, "eTotal/D"); 0024 hlHelper->thcl->Branch("calLCG", &hHelper->t1044->calLCG, "calLCG/D"); 0025 hlHelper->thcl->Branch("scintLCG", &hHelper->t1044->scintLCG, "scintLCG/D"); 0026 0027 // TString adcbranch = "adc["; 0028 // adcbranch += CHTOTAL; 0029 // adcbranch += "]["; 0030 // adcbranch += NSAMPLES; 0031 // adcbranch += "]/I"; 0032 // thcl->Branch("adc",hHelper->adc,adcbranch); 0033 0034 // TString pedestalbranch = "pedestal["; 0035 // pedestalbranch += CHTOTAL; 0036 // pedestalbranch += "]/F"; 0037 // thcl->Branch("pedestal",hHelper->pedestal,pedestalbranch); 0038 0039 // TString rawpeakbranch = "rpeak["; 0040 // rawpeakbranch += CHTOTAL; 0041 // rpeakbranch += "]/F"; 0042 // thcl->Branch("rpeak",hHelper->rpeak,rawpeakbranch); 0043 0044 // TString rawtimebranch ="rtime["; 0045 // rawtimebranch += CHTOTAL; 0046 // rawtimebranch += "]/F"; 0047 // thcl->Branch("rtime",hHelper->rawTime, rawtimebranch); 0048 0049 // TString fitpeakbranch = "fpeak["; 0050 // calpeakbranch += CHTOTAL; 0051 // calpeakbranch += "]/F"; 0052 // thcl->Branch("fpeak",hHelper->fpeak,fitpeakbranch); 0053 0054 // TString fittimebranch ="ftime["; 0055 // fittimebranch += CHTOTAL; 0056 // fittimebranch += "]/F"; 0057 // thcl->Branch("ftime",hHelper->fitTime, fittimebranch); 0058 0059 // TString fittimermsbranch ="ftrms["; 0060 // fittimermsbranch += CHTOTAL; 0061 // fittimermsbranch += "]/F"; 0062 // thcl->Branch("ftime",hHelper->fitTime, fittimermsbranch); 0063 0064 // Pressing time histograms 0065 0066 0067 // TString triggerbranch = "tag["; 0068 // triggerbranch += TAGS; 0069 // triggerbranch +="]/F"; 0070 // W->Branch("tags", wd->tags,triggerbranch); 0071 // W->Branch("hits", wd->hits,"hit[4]/F"); 0072 // // clusters found in inner and outer sections 0073 // TString ihcclbranch = "ihccl[6]/F"; 0074 // W->Branch("ihccl",wd->ihccl,ihcclbranch); 0075 // TString ohcclbranch = "ohccl[6]/F"; 0076 // W->Branch("ohccl",wd->ohccl,ohcclbranch); 0077 // // tracks found in inner and outer sections 0078 // TString itrackbranch = "itrack["; 0079 // itrackbranch += TRLENGTH; 0080 // itrackbranch +="]/F"; 0081 // W->Branch("itrack",wd->itrack,itrackbranch); 0082 // TString otrackbranch = "otrack["; 0083 // otrackbranch += TRLENGTH; 0084 // otrackbranch +="]/F"; 0085 // W->Branch("otrack",wd->otrack,otrackbranch); 0086 0087 0088 0089 // TString ecsumbranch = "ecsum["; 0090 // ecsumbranch += ECSUMS; 0091 // ecsumbranch +="]/F"; 0092 // W->Branch("ec_sum",wd->ecadcsum,ecsumbranch); 0093 0094 // TString hcsumbranch = "hcsum["; 0095 // hcsumbranch += HCSUMS; 0096 // hcsumbranch +="]/F"; 0097 // W->Branch("hcsum",wd->hcadcsum,hcsumbranch); 0098 0099 // HODOSCOPE branch 0100 // if(psON) { 0101 // initPreshowerTree(); 0102 // initPreshowerUnpacker(); 0103 // cout<<"PRESHOWER branch initialized for Run "<<rn<<endl; 0104 // } 0105 0106 } 0107 0108 // ----------------------------------------------------------------------------------------------- 0109 0110 void hcalTree::updateRootFile(){ 0111 // whatever summary histograms what not 0112 // hLabHelper * hlHelper = hLabHelper::getInstance(); 0113 // hlHelper->thcl->AutoSave("Overwrite"); 0114 // fhcl -> Close(); 0115 // thcl -> Write(); 0116 // fhcl -> Write(); 0117 ; 0118 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |