Usually you would have a current transducer on your cable carrying this pulse and then you link the output of this transducer to some scope and use math functions to get the square .However just measuring the current does not not really tell you the energy since you need to know the impedance (resistance) where the energy related to this current is dissipated.
Fritz Caspers : Dear Mr Fritz, Thank you for your quick response.
In our application, the current is generated due to the capacitor connected as a Load. The current is the initial short circuit current of the capacitor before charging.
I am going to test the above-suggested method and will share details of my test results.
As Fritz Caspers says, amp squared seconds is not energy (Joules), it is Joules per ohm, so you need to know something else to get energy.
Amp seconds is charge (coulombs) so if you multiply this by the mean voltage you get the energy.
Alternatively you could use approximately ((Current x time )squared)/(2 x capacitance) or more exactly (charge squared)/(2 x capacitance), where charge is the integral of current with time, not current times time, unless the current is constant.