The original trial court may issue the order provided in § 5-26-414:
(1) Before the trial, with the consent of the defendant;
(2) At the trial, on entry of plea of guilty; or
(3) After conviction, in lieu of a penalty provided in § 5-26-401 or in addition to a penalty provided in § 5-26-401.