本文整理汇总了C++中TNamed::GetUniqueID方法的典型用法代码示例。如果您正苦于以下问题:C++ TNamed::GetUniqueID方法的具体用法?C++ TNamed::GetUniqueID怎么用?C++ TNamed::GetUniqueID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TNamed
的用法示例。
在下文中一共展示了TNamed::GetUniqueID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
const char *Next(int &kind,int &idx,double &exe,double &heap,double &free,double &inc) {
if(!inp) return 0;
kind=0;idx=0;exe=0;heap=0;free=0,inc=0;
TString ts;
char *endMaker,*clear,*ctr,*doPs,*fr,*to,*and;
while(fgets(line,500,inp)) {
doPs = strstr(line,"doPs for");
if (!doPs) continue;
endMaker = strstr(line,"EndMaker");
clear = strstr(line,"Clear");
ctr = strstr(line,"constructor");
kind = 0;
if (ctr ) kind = 1;
if (clear ) kind = 2;
if (endMaker) kind = 3;
if (!kind) continue;
fr = doPs+8 +strspn(doPs+8," \t");
to = strstr(fr,":");
ts = ""; ts.Append(fr,to-fr);
if (!ts.Length()) continue;
fr = strstr(fr,"total"); if (!fr) continue;
fr = strstr(fr,"=" ); if (!fr) continue;
exe = atof(fr+1);
fr = strstr(fr,"heap" ); if (!fr) continue;
fr = strstr(fr,"=" ); if (!fr) continue;
heap = atof(fr+1);
and = strstr(fr,"and");
if (and) free = atof(and+3);
fr = strstr(fr,"(" ); if (!fr) continue;
inc = atof(fr+1);
if (kind==1) continue;
TNamed *tn = (TNamed*)hash.FindObject(ts.Data());
if (!tn) {
tn = new TNamed(ts.Data(),"");
hash.Add(tn);
fNMakers++;
tn->SetUniqueID((UInt_t)fNMakers);
mArray.AddAtAndExpand(tn,fNMakers);
}
idx = tn->GetUniqueID();
return tn->GetName();
}
fclose(inp); inp = 0;
return 0;
}};