I carry all the time in places that prohibit firearms. I worry about something like this happening all the time. Now maybe not exactly how you described it but similar. The fact is that even though you may pull your gun and stop the threat and save everyones lives you have still violated the no guns sign on the door. Who knows how things would turn out legally for you or me. I hope I never have to find out. But I would rather take the risk rather than not and lose my life or one of my loved ones lives.The reason it matters is simple.
Lets say nothing happens in the bank. Then it doesn't matter if you have a gun, open, concealed or no gun at all.
Lets say you are in the bank when a person bursts into the bank high on meth and executes a bank teller before demanding one of the survivors get him a million dollars and he'll kill a mother@#$%ing customer every minute until his demand is met.
The sign said you cannot carry, but you did and you pull your gun and fire in self defense, Mr methhead is crippled but lives.
The bullet passed through the methhead and injures or kills an employee of the bank or another customer.
You can be sued, because the immunity you get from the self defense act only applies if you have the legal right to be there.
You violated the banks right by carrying into a location that forbids it.
Even if you manage to avoid criminal charges, you could easily lose $100,000 in attorney fees in civil actions and that doesn't count damages if you are found liable by a jury of 6 or 12 people not smart enough to avoid jury duty in the civil cases.