  The Hamiltonian thermodynamics formalism is applied to the general
$d$-dimensional Reissner-Nordstr\"om-anti-de Sitter black hole with spherical,
planar, and hyperbolic horizon topology. After writing its action and
performing a Legendre transformation, surface terms are added in order to
guarantee a well defined variational principle with which to obtain sensible
equations of motion, and also to allow later on the thermodynamical analysis.
Then a Kucha\v{r} canonical transformation is done, which changes from the
metric canonical coordinates to the physical parameters coordinates. Again a
well defined variational principle is guaranteed through boundary terms. These
terms influence the fall-off conditions of the variables and at the same time
the form of the new Lagrange multipliers. Reduction to the true degrees of
freedom is performed, which are the conserved mass and charge of the black
hole. Upon quantization a Lorentzian partition function $Z$ is written for the
grand canonical ensemble, where the temperature $\bf T$ and the electric
potential $\phi$ are fixed at infinity. After imposing Euclidean boundary
conditions on the partition function, the respective effective action $I_*$,
and thus the thermodynamical partition function, is determined for any
dimension $d$ and topology $k$. This is a quite general action. Several
previous results can be then condensed in our single general formula for the
effective action $I_*$. Phase transitions are studied for the spherical case,
and it is shown that all the other topologies have no phase transitions. A
parallel with the Bose-Einstein condensation can be established. Finally, the
expected values of energy, charge, and entropy are determined for the black
hole solution.
