〜たものだ
Used to… (nostalgic recollection)machine translation
FormationVerb た-form + ものだ
〜たものだ is used when reminiscing with emotion about a past habit that no longer exists: 子どものころ、よくこの川で泳いだものだ (when I was a child, I often used to swim in this river). The sentence usually comes with the adverb よく and phrases pointing to the distant past such as 子どものころ, 学生時代, 昔.
Formation: verb た-form + ものだ. The polite form is たものです; in casual speech it can become たもんだ.
You're already used to 〜ていた for narrating past habits neutrally; 〜たものだ differs in coating the sentence with a wistful layer of "looking back on it now…". Because it is nostalgia, this pattern isn't used for something that happened only once, nor for the very recent past — 先週 or 昨日 with たものだ sounds very strange.
Examples
子どものころ、よくこの川で泳いだものだ。
When I was a child, I often used to swim in this river.
学生時代は朝まで友達と話したものです。
In my student days, I used to talk with my friends until morning.
祖母はよく昔の話をしてくれたものだ。
My grandmother often used to tell me stories of the old days.