fix root complains with dictionary generation and optimize the MCHistory tools usage