Use the Macro THROW_CTRL instead of simple throw
Add missing code for roi2spectrum