More Arizona Barrel Cactus (Ferocactus wislizenii) in bloom! All photos copyright Marty Horowitz 8/20/2016.
In this last photo, you can see various stages. Some buds haven't opened yet; some flowers are fully open, and some are developing fruits. You'll note the dried looking stuff at the top of the pineapple-looking green things. The dried part is the spent flower (already finished its job of attracting a pollinator); the green part is the developing fruit. The fruits are yellow when ripe and are edible, albeit a bit tart.