Structural failure and stochastic discrete process of random events: an application to seismic vulnerability analysis of an historic building