Changeset 12306
- Timestamp:
- 10/27/11 22:04:52 (13 years ago)
- Location:
- fact/tools/rootmacros
- Files:
-
- 2 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 //////////////// -
fact/tools/rootmacros/zerosearch.h
r12258 r12306 42 42 int VerbosityLevel=0); 43 43 44 size_t removeMaximaAbove( 45 vector<Region> ®ions, 46 float threshold= 14.0, 47 int VerbosityLevel=0); 48 44 49 #endif
Note:
See TracChangeset
for help on using the changeset viewer.