This section applies where either of the following orders is available to a court dealing with an offender for an offence—
The court must not make an order of either of those kinds unless it is of the opinion—
In forming its opinion for the purposes of subsection (2), the court must take into account all the information that is available to it about the circumstances of the offence, or of it and the associated offence or offences, including any aggravating or mitigating factors.
The pre-sentence report requirements (see section 30) apply to the court in relation to forming that opinion.