Changeset 12370
- Timestamp:
- 11/04/11 13:06:58 (13 years ago)
- Location:
- fact/tools/rootmacros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/zerosearch.C
r12306 r12370 211 211 } 212 212 213 size_t removeRegionOnFallingEdge( 214 vector<Region> ®ions, 215 unsigned int FallingEdgeWidth, 216 int VerbosityLevel) 217 { 218 if ( FallingEdgeWidth < 1){ 219 if (VerbosityLevel > 0){ 220 cout << " removeRegionOnFallingEdge: FallingEdgeWidth < 1" << endl; 221 cout << " FallingEdgeWidth =" << FallingEdgeWidth << endl; 222 cout << "returning." << endl; 223 return regions.size(); 224 } 225 } 226 if (regions.size() < 1){ 227 if (VerbosityLevel > 3) 228 cout << "removeRegionOnFallingEdge: source vector empty." << endl; 229 return 0; 230 } 231 232 vector<Region>::reverse_iterator it = regions.rbegin(); 233 while( it != regions.rend()-1 ) 234 { 235 if (VerbosityLevel >10) 236 cout << it->maxPos << "\t" << (it+1)->maxPos << "\t" << it->maxPos - (it+1)->maxPos << endl; 237 238 if ( it->maxPos - (it+1)->maxPos < (int)FallingEdgeWidth) { 239 if (VerbosityLevel > 3) 240 cout << "erasing Region @ " << it->maxPos << endl; 241 regions.erase( --it.base() ) ; 242 ++it; 243 }else 244 ++it; 245 } 246 247 return regions.size(); 248 } 249 213 250 214 251 size_t removeReginWithMaximaOnEdge( … … 218 255 { 219 256 if (EdgeWidth < 1){ 220 if (VerbosityLevel > 0) 257 if (VerbosityLevel > 0){ 221 258 cout << "removeReginWithMaximaOnEdge: EdgeWidth < 1" << endl; 222 259 cout << "EdgeWidth=" << EdgeWidth << endl; 223 260 cout << "returning." << endl; 224 261 return regions.size(); 262 } 225 263 } 226 264 -
fact/tools/rootmacros/zerosearch.h
r12306 r12370 32 32 int VerbosityLevel=0); 33 33 34 size_t removeRegionOnFallingEdge( 35 vector<Region> ®ions, 36 unsigned int FallingEdgeWidth = 100, 37 int VerbosityLevel=0); 38 39 34 40 size_t removeReginWithMaximaOnEdge( 35 41 vector<Region> ®ions,
Note:
See TracChangeset
for help on using the changeset viewer.