bool FixedTupleListAdress::addT(tuple pids) { bool returnVal = true; System& system = storage->getSystemRef(); esutil::Error err(system.comm); // ADD THE LOCAL PARTICLES (pointers) Particle* vp, *at; std::vector<Particle*> tmp; // temporary vector std::vector<longint> pidstmp; // temporary vector longint pidK; // the pid used as key tuple::iterator it = pids.begin(); vp = storage->lookupRealParticle(*it); if (!vp) { // Particle does not exist here, return false //std::cout << "particle " << *it << " not found in localParticles \n"; returnVal = false; } else{ pidK = *it; // first pid is key //std::cout << "Add key: " << *it << "\n"; for (++it; it != pids.end(); ++it) { at = storage->lookupAdrATParticle(*it); if (!at) { // Particle does not exist here, return false std::stringstream msg; msg << "ERROR: AT particle " << *it << " not found in localAdrATParticles \n"; err.setException( msg.str() ); returnVal = false; break; } tmp.push_back(at); //std::cout << " add: " << *it << "\n"; pidstmp.push_back(*it); // pidK is not in this vector } } err.checkException(); if(returnVal){ this->add(vp, tmp); // add to TupleList // ADD THE GLOBAL PARTICLES (ids) globalTuples.insert(make_pair(pidK, pidstmp)); } LOG4ESPP_INFO(theLogger, "added fixed tuple to global tuples"); tmp.clear(); pids.clear(); pidstmp.clear(); //std::cout << "\n"; return returnVal; }