The Past Perfect Progressive is formed this way:
The difference between the Past Perfect Progressive (also called the Past Perfect Continuous) and the Past Perfect is that the Past Perfect Progressive emphasizes the duration of an activity in the past before another activity or time in the past happened. It’s also used to talk about something that was going on in the past close in time to another activity.
Here are some examples of the Past Perfect Continuous:
I had been sleeping for an hour before they woke me up.
They had been studying English grammar for one year before they felt comfortable speaking English.
She had been teaching ESL for seven years when they asked her to lead the English Department.
She had been jogging in the rain. That’s why she was all wet.
More info on the Past Perfect Continuous tense.