Commits

gemm...@4525493e-7705-40b1-a816-d608a930855b  committed 0102ad9

Create addresses for new proxies to make remapping work 'ForceRead = true'

  • Participants
  • Parent commits dec8f1f

Comments (0)

Files changed (2)

+2009-07-24  Peter van Gemmeren <gemmeren@anl.gov>
+
+	* src/AddressRemappingSvc.cxx: Create addresses for new proxies to make remapping work with
+	OutputStream ForceRead = true; and use GenericAddress.par() to copy token, so it can be overloaded
+	for PoolTokenAddress.
+	* tagged as SGComps-00-00-23
+
 2009-05-27  scott snyder  <snyder@bnl.gov>
 	* src/AddressRemappingSvc.cxx: Handle chained remappings.
 	* tagged as SGComps-00-00-22
+
 2009-05-04  Paolo Calafiura 
 	* AddressRemappingSvc: add ProxyDict property for PileUp jobs
 	* tagged as SGComps-00-00-21

File src/AddressRemappingSvc.cxx

 }
 //________________________________________________________________________________
 StatusCode AddressRemappingSvc::loadAddresses(StoreID::type /*storeID*/,
-	IAddressProvider::tadList& /*tads*/) {
+	IAddressProvider::tadList& tads) {
+   for (std::vector<SG::TransientAddress>::const_iterator oldIter = m_oldTads.begin(),
+		   oldIterEnd = m_oldTads.end(); oldIter != oldIterEnd; oldIter++) {
+      SG::TransientAddress* tadd = new SG::TransientAddress(*oldIter);
+      tads.push_back(tadd);
+   }
    return(StatusCode::SUCCESS);
 }
 //________________________________________________________________________________
             return(StatusCode::FAILURE);
          }
          GenericAddress* newGadd = 0;
-	 if (dataProxy->isValidAddress()) 
-	   newGadd = dynamic_cast<GenericAddress*>(dataProxy->address());
+	 if (dataProxy->isValidAddress()) newGadd = dynamic_cast<GenericAddress*>(dataProxy->address());
          if (newGadd == 0) {
             log << MSG::WARNING << "Cannot get GenericAddress for: " << newIter->clID() << "#" << newIter->name() << endreq;
             return(StatusCode::FAILURE);
          }
-         GenericAddress* oldGadd = new GenericAddress(*newGadd);
-         oldGadd->setClID(tad->clID());
+         GenericAddress* oldGadd = new GenericAddress(newGadd->svcType(), tad->clID(), *newGadd->par(), tad->name(), *newGadd->ipar());
          tad->setAddress(oldGadd);
          return(StatusCode::SUCCESS);
       }