Section 16A. At the trial of a complaint or indictment for rape, incest, carnal abuse or other crime involving sex, where a minor under eighteen years of age is the person upon, with or against whom the crime is alleged to have been committed, or at the trial of a complaint or indictment for getting a woman with child out of wedlock, or for the non-support of a child born out of wedlock, the presiding justice shall exclude the general public from the court room, admitting only such persons as may have a direct interest in the case.