  In this paper we prove a version of a trace Paley--Wiener theorem for
tempered representations of a reductive $p$--adic group. This is applied to
complete certain investigation of Shahidi on the proof that a Plancherel
measure is invariant of a $L$--packet of discrete series.
