As I previously mentioned an inspection warrant is not difficult to obtain. Neither is having the building corrected, as the owner will be fined until deficiencies are corrected or the city demos the building on the owners dime.
CA CODE OF CIVIL PROCEDURE
SECTION 1822.50-1822.60
1822.50. An inspection warrant is an order, in writing, in the name
of the people, signed by a judge of a court of record, directed to a
state or local official, commanding him to conduct any inspection
required or authorized by state or local law or regulation relating
to building, fire, safety, plumbing, electrical, health, labor, or
zoning.