I do notify the Officer who stopped me that I am armed, and I am armed because I'm an LEO. Both times I have been stopped, I said something to the effect of "I just want to let you know before I go digging around my car that I have a firearm on my right hip because I am a Police Officer." I would hope that anybody with a gun in the car (LEO, CCW, or anybody else) would tell me when I stopped them, so I do.
I DO NOT do it to get out of a ticket. I broke the law, I deserve to be issued a citation, just like anybody else. That being said, have I gotten a ticket? Nope. That's the Officer's decision to make at his discretion. (or in my case, both times it was a Trooper)
I happened to stop an Officer from a neighboring jurisdiction just last week. He did not identify himself, but I found out through my normal line of questioning (where are you coming from, which happened to be his work) that he was a PO. I asked him for his work ID, he showed it to me and he was on his way