$L^{2}(\mathbb R)$- norm of entire function

Let $f(z)$ be an entire function defined by $$f(z)=\prod_{n=1}^{\infty}\bigg(1-\frac{z^{2}}{a_{n}^{2}}\bigg),\qquad z\in \mathbb C$$ where $\{a_{n}\}_{n=1}^{\infty}$ is a sequence of positive real numbers, determined so that the infinite product above defines an entire function. How can we compute the integral $$\int_{-\infty}^{\infty}|f(x)|^{2}dx$$ where $x$ is real. Or at least finding an upper bound for it (if it is finite)?

-
Do you even know of an example where the integral is finite? I can't, off the top of my head. – Harald Hanche-Olsen Aug 15 '12 at 20:26
@Harald: We have $\frac{\sin\pi z}{\pi z}=\prod_{n=1}^\infty \left(1-\frac{z^2}{n^2}\right)$. – timur Aug 15 '12 at 20:41
@Norbert: Oh of course, since if not then the zeros of $f$ have a limit point, and so $f=0$, since it is entire. – Jennifer K. Aug 15 '12 at 21:20
More generally if $\sum_n 1/a_n^2 < \infty$, the infinite product converges uniformly on compact sets to an entire function whose zeros are $\pm a_n$. – Robert Israel Aug 16 '12 at 6:50
At least, nobody here can think of a method. Which doesn't mean there isn't one. A couple of observations: As noted by Robert Israel, the convergence of the product has to do with the convergence of a sum, i.e., it has to do with the asymptotic behaviour of the sequence $(a_n)$. But by adding just one more factor to timur's example, I can destroy the finiteness of the integral, which shows that this does not relate well to asymptotic behaviours of $(a_n)$. I think this is likely a quite hard problem. – Harald Hanche-Olsen Aug 16 '12 at 10:12

I searched infinite products, http://mathworld.wolfram.com/InfiniteProduct.html. Consider $$cos(x)=\prod_{n=1}^\infty \left(1-\frac{4x^2}{\pi^2(2n-1)^2}\right).$$ Then $$\int_{-\infty}^\infty |cos(x)|^2 dx=\infty.$$ So I don't think an upper bound can be found.