  For a class of generalized integrable hierarchies associated with affine
(twisted or untwisted) Kac-Moody algebras, an explicit representation of their
local conserved densities by means of a single scalar tau-function is deduced.
This tau-function acts as a partition function for the conserved densities,
which fits its potential interpretation as the effective action of some quantum
system. The class consists of multi-component generalizations of the
Drinfel'd-Sokolov and the two-dimensional affine Toda lattice hierarchies. The
relationship between the former and the approach of Feigin, Frenkel and
Enriquez to soliton equations of KdV and mKdV type is also discussed. These
results considerably simplify the calculation of the conserved charges carried
by the soliton solutions to the equations of the hierarchy, which is important
to establish their interpretation as particles. By way of illustration, we
calculate the charges carried by a set of constrained KP solitons recently
constructed.
