While in charge of a locomotive engine running upon any railroad in this state or while acting as the conductor of any cars on any railroad in this state, if any person shall be intoxicated, he or she shall be deemed guilty of a misdemeanor and punished accordingly.