本文整理汇总了C++中DataTree::inputTreeIsGood方法的典型用法代码示例。如果您正苦于以下问题:C++ DataTree::inputTreeIsGood方法的具体用法?C++ DataTree::inputTreeIsGood怎么用?C++ DataTree::inputTreeIsGood使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataTree
的用法示例。
在下文中一共展示了DataTree::inputTreeIsGood方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
for (int j=0; j<posmap.getNbinsXY(); j++) {
if (p == 0)
sprintf(hisxyName, "e0_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
if (p == 1)
sprintf(hisxyName, "e1_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
if (p == 2)
sprintf(hisxyName, "e2_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
if (p == 3)
sprintf(hisxyName, "e3_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
if (p == 4)
sprintf(hisxyName, "w0_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
if (p == 5)
sprintf(hisxyName, "w1_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
if (p == 6)
sprintf(hisxyName, "w2_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
if (p == 7)
sprintf(hisxyName, "w3_%0.0f_%0.0f", posmap.getBinCenter(i), posmap.getBinCenter(j));
hisxy[p][i][j] = new TH1D(hisxyName, "", nBinHist,-100.,4000.0);
}
}
}
// Loop through input ntuples
char tempIn[500];
for (int i=0; i<nRuns; i++) {
// Open input ntuple
sprintf(tempIn, "%s/replay_pass2_%i.root",getenv("REPLAY_PASS2"), runList[i]);
DataTree *t = new DataTree();
t->setupInputTree(std::string(tempIn),"pass2");
if ( !t->inputTreeIsGood() ) {
std::cout << "Skipping " << tempIn << "... Doesn't exist or couldn't be opened.\n";
continue;
}
int nEvents = t->getEntries();
cout << "Processing " << runList[i] << " ... " << endl;
cout << "... nEvents = " << nEvents << endl;
// Loop over events
for (int i=0; i<nEvents; i++) {
t->getEvent(i);
// Select Type 0 events
if (t->PID != 1) continue;
if (t->Type != 0) continue;
//Cut out clipped events
if ( t->Side==0 && ( t->xE.nClipped>0 || t->yE.nClipped>0 || t->xeRC<1 || t->xeRC>4 || t->yeRC<1 || t->yeRC>4 ) ) continue;
else if ( t->Side==1 && ( t->xW.nClipped>0 || t->yW.nClipped>0 || t->xwRC<1 || t->xwRC>4 || t->ywRC<1 || t->ywRC>4) ) continue;
/*bool moveOnX = true, moveOnY=true; // Determining if the event is of the correct response class in x and y
//Swank addition: Wire Chamber Response class.
for (int j=0; j<numResponseClasses; j++) {
if (t->xeRC == responseClasses[j]) {moveOnX=false;}
if (t->yeRC == responseClasses[j]) {moveOnY=false;}
}
if (moveOnX || moveOnY) continue;*/