It depends on your definition. The magistracy may be only one of the tenants. SWD has a Probation and Community Service Order Office inside. They aren't always inside a court building either. 
(Note a court building can also contain multiple different courts and tribunals) 