The affidavit shall be filed in the office of the clerk of the superior court having jurisdiction within five days after the completion of the official canvass by the county last making the declaration. In the case of an office for which candidates are certified for the ballot by the Secretary of State, or in the case of a statewide ballot measure, the superior court having jurisdiction shall be the Superior Court for the County of Sacramento.
Ca. Elec. Code § 16421