Yes, the German consulate will likely have an office or at least some way of contact. You may also need to report the loss to the police - so do that first to avoid wasting time.
I am a UK citizen and had my passport stolen in Spain, I got a temporary travel document sorted the next morning.