I've got a black box which can deliver high voltage DC pulses connected to a capacitor. As in the below schematic
.
I know what the input power to the black box is as it is powered by a power supply unit which shows the voltage and current.
I know the peak voltage out of the box (measured across HV+ and HV-) the width of the pulse and the frequency of the pulse. The pulse is shaped like:

I also know the capacitance of the capacitor. How do I determine the power that the black box delivers to the capacitor in one pulse and the average power in a second? Do I even have enough information? Can I use the normal energy in a capacitor equation or is that only for a constant DC input?

I know what the input power to the black box is as it is powered by a power supply unit which shows the voltage and current.
I know the peak voltage out of the box (measured across HV+ and HV-) the width of the pulse and the frequency of the pulse. The pulse is shaped like:

I also know the capacitance of the capacitor. How do I determine the power that the black box delivers to the capacitor in one pulse and the average power in a second? Do I even have enough information? Can I use the normal energy in a capacitor equation or is that only for a constant DC input?