7 cout <<
"TestFastRead()"<<endl;
8 string infile =
"Dummy.txt_has_10_events";
9 cout <<
"infile:\t"<<infile<<endl;
10 string begin =
"_has_";
11 string end =
"_events";
12 int where1 = infile.find(begin);
13 int where2 = infile.find(end);
15 int npos = infile.npos;
17 cout <<
"npos:\t"<<npos<<
"\twhere1:\t"<<where1<<
"\twhere2:\t"<<where2<<endl;
19 int start=where1+begin.size();
21 cout <<
"numbers of events is between indices: ["<<start<<
","<<stop<<
")"<<endl;
23 cout <<
"Get number of events"<<endl;
25 for (
int i=start; i<stop; ++i) {
29 int nevents = atoi(number.c_str());
30 cout <<
"Number of events as string:\t"<<number<<endl;
31 cout <<
"Number of events as int: \t"<<nevents<<endl;