If you must be in the same courtroom, then at the time of your arrival at the courthouse, you should let the sheriff know your circumstances so that you can be separated from the other person. If you are a witness, then you have likely been subpoenaed so that your presence is required. Ellen Fischer
This is one of the few times that you ARE permitted to go into the same place as a person with a restraining order against you. Yes, you should notify courtroom personnel. It might be wise to have a copy of the order with you in case an issue actually arises.
Although you cannot speak directly to the judge in advance regarding any matters, you may notify staff in advance that there is a restraining order. You can be sure that the person on the other side will be all too happy to let people know that one exists. You can be there -- but do be sure that your behavior is exemplary while you are in the courthouse.