The spaces $\mathcal{L}^2(\mathbb{R})$ (square-integrable functions) and $\mathcal{L}^2(\mathbb{T})$ (1-periodic square-integrable functions) are two subspaces of the space of tempered distributions $\mathcal{S}'(\mathbb{R})$ and one can easily show that the sum $\mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T})$ is direct.
The duals of $\mathcal{L}^2(\mathbb{R})$ and $\mathcal{L}^2(\mathbb{T})$ are isometrically isomorphic to $\mathcal{L}^2(\mathbb{R})$ and $\mathcal{L}^2(\mathbb{T})$, respectively (Riesz representation theorem). Therefore, the continuous dual of the direct sum is simply $\mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T})$ in the sense that (1) an element $g_1 + g_2 \in \mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T})$ defines a continuous linear functional over $\mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T})$ via $$(f_1 + f_2) \mapsto \langle f_1 , g_1 \rangle_{\mathcal{L}^2(\mathbb{R})} + \langle f_2 , g_2 \rangle_{\mathcal{L}^2(\mathbb{T})}$$ (which uses that both the decompositions $f = f_1 + f_2$ and $g = g_1+g_2$ are unique), and that (2) any element of $(\mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T}))')$ is of this form.
I would like to identify the subset $\mathcal{X}\subset \mathcal{S}'(\mathbb{R})$ of functions $g$ such that $$ \mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T}) \ni f_1 + f_2 \mapsto \langle g , f_1 + f_2 \rangle_{\mathcal{L}^2(\mathbb{R})}$$ specifies a continuous linear functional over $\mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T})$. Clearly, by restricting it to $\mathcal{L}^2(\mathbb{R})$, we need to have $g \in\mathcal{L}^2(\mathbb{R})$. Moreover, $\mathcal{X}$ contains any square-integrable compactly supported functions, but also functions that are not compactly supported but that have sufficiently nice asymptotic properties such that $\langle g , f_2 \rangle_{\mathcal{L}^2(\mathbb{R})}$ is well-defined for any square-integrable periodic $f_2$.
Question: Is there a way to identify the space $\mathcal{X}$ I am depicting? Can we reach any linear functionals over $\mathcal{L}^2(\mathbb{R}) \oplus \mathcal{L}^2(\mathbb{T})$ by doing so? I am also interested by generalization to other direct sums between spaces of periodic and non-periodic functions (e.g., $\mathcal{L}^p$-spaces, or spaces of continuous-functions for the supremum norm).