The fire marshal shall, under the instructions and orders of the mayor, be authorized to enter any building or premises, wherein a fire has at any time occurred, for the purpose of making such examination as may be deemed necessary to ascertain the cause of the burning; and any person preventing or obstructing, or attempting to prevent or obstruct, said fire marshal, while in the discharge of the duty aforesaid, shall be guilty of a misdemeanor; and, on conviction thereof, shall be fined in a sum not exceeding fifty dollars, or undergo an imprisonment not exceeding three calendar months, or both, at the discretion of the court.
53 P.S. § 16598