In making any investigation or inspection necessary to enforce or implement the Safety of Dams and Reservoirs Act, the department or its representatives, upon reasonable notice, may enter upon private property of the dam and reservoir owner as necessary. Such right of entry shall extend to all employees, surveyors, or other agents of the department in the official performance of their duties, and such persons shall not be liable for prosecution for trespass when performing their official duties.