1: \begin{abstract}
2: We consider the problem of explicitly computing dimensions of spaces of automorphic or modular forms in level one, for a split classical group $\mathbf{G}$ over $\mathbb{Q}$ such that $\mathbf{G}(\R)$ has discrete series.
3:
4: Our main contribution is an algorithm calculating orbital integrals for the characteristic function of $\mathbf{G}(\mathbb{Z}_p)$ at torsion elements of $\mathbf{G}(\mathbb{Q}_p)$.
5: We apply it to compute the geometric side in Arthur's specialisation of his invariant trace formula involving stable discrete series pseudo-coefficients for $\mathbf{G}(\mathbb{R})$.
6: Therefore we explicitly compute the Euler-Poincaré characteristic of the level one discrete automorphic spectrum of $\mathbf{G}$ with respect to a finite-dimensional representation of $\mathbf{G}(\mathbb{R})$.
7:
8: For such a group $\mathbf{G}$, Arthur's endoscopic classification of the discrete spectrum allows to analyse precisely this Euler-Poincaré characteristic.
9: For example one can deduce the number of everywhere unramified automorphic representations $\pi$ of $\mathbf{G}$ such that $\pi_{\infty}$ is isomorphic to a given discrete series representation of $\mathbf{G}(\mathbb{R})$.
10: Dimension formulae for the spaces of vector-valued Siegel modular forms are easily derived.
11: \end{abstract}
12: