Script to convert raw format to root format (Marian)