When a person is detained in custody on a criminal charge prior to conviction for want of bail, that person is entitled to an automatic review of the order fixing the amount of the bail by the judge or magistrate having jurisdiction of the offense. That review shall be held not later than five days from the time of the original order fixing the amount of bail on the original accusatory pleading. The defendant may waive this review.
Ca. Pen. Code § 1270.2