本文整理汇总了C++中TTree::GetEntryNumberWithIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ TTree::GetEntryNumberWithIndex方法的具体用法?C++ TTree::GetEntryNumberWithIndex怎么用?C++ TTree::GetEntryNumberWithIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTree
的用法示例。
在下文中一共展示了TTree::GetEntryNumberWithIndex方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: correlationTreeLoop
//.........这里部分代码省略.........
deltaTTree->Branch("firstAnt",&firstAnt,"firstAnt/I");
deltaTTree->Branch("secondAnt",&secondAnt,"secondAnt/I");
deltaTTree->Branch("maxAnt",&maxAnt,"maxAnt/I");
deltaTTree->Branch("labChip",&labChip,"labChip/I");
deltaTTree->Branch("deltaT",&deltaT,"deltaT/D");
deltaTTree->Branch("deltaTExpected",&deltaTExpected,"deltaTExpected/D");
deltaTTree->Branch("corPeak",&corPeak,"corPeak/D");
deltaTTree->Branch("corRMS",&corRMS,"corRMS/D");
deltaTTree->Branch("phiMaxAnt",&phiMaxAnt,"phiMaxAnt/D");
deltaTTree->Branch("phiWave",&phiWave,"phiWave/D");
deltaTTree->Branch("thetaWave",&thetaWave,"thetaWave/D");
deltaTTree->Branch("eventNumber",&eventNumber,"eventNumber/i");
deltaTTree->Branch("triggerTime",&triggerTime,"triggerTime/i");
deltaTTree->Branch("triggerTimeNs",&triggerTimeNs,"triggerTimeNs/i");
deltaTTree->Branch("corInd",&corInd,"corInd/I");
deltaTTree->Branch("balloonLat",&balloonLat,"balloonLat/D");
deltaTTree->Branch("balloonLon",&balloonLon,"balloonLon/D");
deltaTTree->Branch("balloonAlt",&balloonAlt,"balloonAlt/D");
deltaTTree->Branch("heading",&heading,"heading/D");
deltaTTree->Branch("pitch",&pitch,"pitch/D");
deltaTTree->Branch("roll",&roll,"roll/D");
// deltaTTree->Branch("deltaZ",&deltaZ,"deltaZ/D");
// deltaTTree->Branch("deltaR",&deltaR,"deltaR/D");
deltaTTree->Branch("meanPhiAntPair",&meanPhiAntPair,"meanPhiAntPair/D");
deltaTTree->Branch("deltaPhiAntPair",&deltaPhiAntPair,"deltaPhiAntPair/D");
deltaTTree->Branch("expTaylorTime",&expTaylorTime,"expTaylorTime/i");
// Double_t thetaWave;
for(entry=0;entry<numEntries;entry++) {
corTree->GetEntry(entry);
Long64_t headEntry=headTree->GetEntryNumberWithIndex(corSum->eventNumber);
if(headEntry<0)
continue;
headTree->GetEntry(headEntry);
// if(header->triggerTimeNs*1e-9< 0.097 || header->triggerTimeNs*1e-9>0.1)
triggerTimeNs=header->triggerTimeNs;
triggerTime=header->triggerTime;
eventNumber=header->eventNumber;
adu5PatTree->GetEntry(headEntry);
// PrettyAnitaEvent realEvent(event,WaveCalType::kVTFullAGCrossCorClock,header);
balloonLat=pat->latitude;
balloonLon=pat->longitude;
balloonAlt=pat->altitude;
heading=pat->heading;
pitch=pat->pitch;
roll=pat->roll;
//Simon 30/04/09 numbers
// pat->pitch=0.64;
// pat->roll=0.14;
//Simon 02/05/09 numbers
// pat->pitch=0.76;
// pat->roll=0.13;
//Test heading offset
// pat->heading+=0.19;
示例2: thetaOpt2
//.........这里部分代码省略.........
TTree *headTree = (TTree*) fpHead->Get("headTree");
headTree->SetBranchAddress("header",&header);
headTree->BuildIndex("eventNumber");
TFile *fpGps = TFile::Open(gpsName);
TTree *adu5PatTree = (TTree*) fpGps->Get("adu5PatTree");
adu5PatTree->BuildIndex("realTime");
adu5PatTree->SetBranchAddress("pat",&pat);
Int_t labChip;
TFile *fpCor = new TFile(corrName);
TTree *corTree = (TTree*) fpCor->Get("corTree");
corTree->SetBranchAddress("cor",&corSum);
corTree->SetBranchAddress("labChip",&labChip);
Long64_t numEntries=corTree->GetEntries();
int counter=0;
Long64_t entry=0;
UInt_t eventNumber, triggerTime, triggerTimeNs;
Int_t firstAnt,secondAnt,maxAnt,corInd;
Double_t deltaT,deltaTExpected;
Double_t phiWave, phiMaxAnt;
Double_t corPeak, corRMS;
Double_t balloonLat, balloonLon, balloonAlt;
Double_t heading,pitch,roll;
Double_t thetaWave;
for(entry=0;entry<numEntries;entry++) {
corTree->GetEntry(entry);
Long64_t headEntry=headTree->GetEntryNumberWithIndex(corSum->eventNumber);
if(headEntry<0)
continue;
headTree->GetEntry(headEntry);
if( (header->triggerTimeNs>0.5e6) || (header->triggerTimeNs<0.2e6) )
continue;
triggerTimeNs=header->triggerTimeNs;
triggerTime=header->triggerTime;
eventNumber=header->eventNumber;
Long64_t bestEntry = adu5PatTree->GetEntryNumberWithBestIndex(header->triggerTime);
if(bestEntry>-1)
adu5PatTree->GetEntry(bestEntry);
else
continue;
balloonLat=pat->latitude;
balloonLon=pat->longitude;
balloonAlt=pat->altitude;
heading=pat->heading;
pat->pitch=0.64;
pat->roll=0.14;
pitch=pat->pitch;
roll=pat->roll;
UsefulAdu5Pat usefulPat(pat);
for(corInd=0;corInd<19;corInd++) {