I would imagine that San Francisco's public library system is much like Multnomah County public library (Portland's Public Library); an amazing and vibrant library system that might be confused with a homeless shelter.
I love the central branch here in Portland - it's a beautiful building and the staff is amazing. I pick up the materials that I place on reserve there. I've even received some helpful research assistance from the reference librarians.
It is an open, free, democratic space. Hence, the proliferation of street kids, homeless folks and various other-rarely-discussed-members of society. Unfortunately it can make the library a little uncomfortable. On rainy days it's particularly smelly. Its hard to concentrate on homework when there is a gentleman having boisterous arguments with (I presume) the book he is reading. And you're generally pretty cautious when entering the restroom.
A few months ago I was having a conversation with two library staff members (one of whom holds a masters in social work) and they both agreed that a social worker embedded in the library would make a world of difference.
San Francisco's public library is one step ahead of us.
Not only has the library hired a social worker to refer patrons to various services (such as shelters, showers, food and employment services), she is overseeing a program where the library actually hires homeless patrons to act as "Health and Safety Associates," (i.e bathroom monitors). The social worker also trains library staff what to do when witnessing unpleasant behavior from the patrons.
I think this is amazing. Libraries should be information-sharing community centers. By having a social worker in the library, an individual with the proper training and experience is in a very visible place to assist specific members of the community find information that could directly improve their situations.
This is the view that I feel libraries need to take in general. It's not just about accessing books, it's more about accessing the community.