Q:

"HagGomel" and Sefer Torah

The widespread practice seems to say the beracha of HagGomel in the presence of a Sefer Torah. Is this a halacha or a minhag? What is the source for this practice? 
Furthermore, what is the relationship between the beracha of HagGomel and a Sefer Torah?

A:

Orach Chaim 219:3 we make the Bracha of Hagomel in front of a Sefer Torah since there is 10 people there and it is proper to  say the Bracha with a Minyan.

