7. In the Cartesian coordinate system $x O y$, the graph of the function $f(x)=a \sin a x+\cos a x(a>0)$ over an interval of the smallest positive period length and the graph of the function $g(x)=\sqrt{a^{2}+1}$ enclose a closed figure whose area is $\qquad$ .
$$
\begin{array}{l}
f(x)=a \sin a x+\cos a x=\sqrt{a^{2}+1} \sin (a x+\varphi) \\
\Rightarrow T=\frac{2 \pi}{a}, \text { thus } S_{A B C D}=2 \sqrt{a^{2}+1} \cdot \frac{2 \pi}{a} .
\end{array}
$$

As shown in the figure, by the symmetry of the graph, the area of the enclosed figure 
$S_{\text {shaded }}=\frac{1}{2} S_{A B C D}=\frac{2 \pi \sqrt{a^{2}+1}}{a}$.