waczny
First, you wouldn't use __() as this is used for translation; URLs can't be translated. Second, if you look at the examples of usage in the code you'd see you can call it on the $cfg global (eg. $cfg->getBaseUrl()). If $cfg isn't available in that file then $ost should be in which case you can do $ost->getConfig()->getBaseUrl().
Cheers.