Studies for a common selection software environment in ATLAS: from the level-2 trigger to the offline reconstruction