Since being dealt from Pittsburgh to San Francisco in 2010, things have been good for Lopez