Changeset 12306 for fact/tools/rootmacros/zerosearch.C
- Timestamp:
- 10/27/11 22:04:52 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/zerosearch.C
r12258 r12306 281 281 } 282 282 283 size_t removeMaximaAbove( 284 vector<Region> ®ions, 285 float threshold, 286 int VerbosityLevel) 287 { 288 if (threshold < 0){ 289 if (VerbosityLevel > 0) 290 cout << "removeMaximaAbove: threshold < 0" << endl; 291 cout << "threshold=" << threshold << endl; 292 cout << "returning." << endl; 293 return regions.size(); 294 } 295 296 vector<Region>::iterator it = regions.begin(); 297 while( it != regions.end() ) 298 { 299 if (it->maxVal > threshold ) { 300 if (VerbosityLevel > 3){ 301 cout << "removing max " << it->maxVal << "\t"; 302 cout << " @ " << it->maxPos << "\t"; 303 cout << endl; 304 } 305 it = regions.erase( it ) ; 306 }else 307 ++it; 308 } 309 310 return regions.size(); 311 } 283 312 284 313 ////////////////
Note:
See TracChangeset
for help on using the changeset viewer.