An analysis framework for the Compact Muon Solenoid