Hawkes processes are a class of simple point processes that are self-exciting and have clustering effect, with wide applications in finance, social networks and many other fields. This paper considers a self-exciting Hawkes process where the baseline intensity is time-dependent, the exciting function is a general function and the jump sizes of the intensity process are independent and identically distributed non-negative random variables. This Hawkes model is non-Markovian in general. We obtain closedform formulas for the Laplace transform, moments and the distribution of the Hawkes process. To illustrate the applications of our results, we use the Hawkes process to model the clustered arrival of trades in a dark pool and analyze various performance metrics including time-to-first-fill, time-to-complete-fill and the expected fill rate of a resting dark order.