#include <AlgThread.h>
Public Member Functions | |
| PrevDataKey () | |
| PrevDataKey (DataIter ibeg, DataIter iend) | |
| PrevDataKey (const std::vector< short > &kvec_) | |
| bool | operator() (const Data &data) const |
| bool | operator() (Event &event) const |
| bool | operator() (Track &track) const |
Private Attributes | |
| DataVec | dvec |
| bool | valid |
|
|
Definition at line 187 of file AlgThread.cxx.
|
|
||||||||||||
|
Definition at line 194 of file AlgThread.cxx. References dvec. 00195 :dvec(), 00196 valid(true) 00197 { 00198 // 00199 // Save input elements: key and data pairs 00200 // 00201 dvec.insert(dvec.end(), ibeg, iend); 00202 00203 // 00204 // Sort keys 00205 // 00206 std::sort(dvec.begin(), dvec.end()); 00207 }
|
|
|
Definition at line 210 of file AlgThread.cxx. References Anp::Data, and dvec. 00211 :dvec(), 00212 valid(true) 00213 { 00214 for(unsigned int i = 0; i < kvec_.size(); ++i) 00215 { 00216 dvec.push_back(Anp::Data(kvec_[i], 0.0)); 00217 } 00218 00219 // 00220 // Sort vector 00221 // 00222 std::sort(dvec.begin(), dvec.end()); 00223 }
|
|
|
Definition at line 261 of file AlgThread.cxx. References Anp::Track::Add(), Anp::Data, dvec, and Anp::Corr::Key. 00262 {
00263 if(!valid)
00264 {
00265 cerr << "PrevDataKey::operator() - invalid internal state" << endl;
00266 return false;
00267 }
00268
00269 //
00270 // Add current elements to Track
00271 //
00272 for(DataVec::const_iterator dit = dvec.begin(); dit != dvec.end(); ++dit)
00273 {
00274 track.Add(dit -> Key(), dit -> Data());
00275 }
00276
00277 return true;
00278 }
|
|
|
Definition at line 241 of file AlgThread.cxx. References Anp::Event::Add(), Anp::Data, dvec, and Anp::Corr::Key. 00242 {
00243 if(!valid)
00244 {
00245 cerr << "PrevDataKey::operator() - invalid internal state" << endl;
00246 return false;
00247 }
00248
00249 //
00250 // Add current elements to Event
00251 //
00252 for(DataVec::const_iterator dit = dvec.begin(); dit != dvec.end(); ++dit)
00253 {
00254 event.Add(dit -> Key(), dit -> Data());
00255 }
00256
00257 return true;
00258 }
|
|
|
Definition at line 226 of file AlgThread.cxx. References Anp::Data, and dvec. 00227 {
00228 if(!valid)
00229 {
00230 cerr << "PrevDataKey::operator() - invalid internal state" << endl;
00231 return false;
00232 }
00233
00234 //
00235 // return true if this key is found
00236 //
00237 return std::binary_search(dvec.begin(), dvec.end(), data);
00238 }
|
|
|
Definition at line 96 of file AlgThread.h. Referenced by operator()(), and PrevDataKey(). |
|
|
Definition at line 97 of file AlgThread.h. |
1.3.9.1