Tom Sj|blom has it exactly right. Ogam is a "translation," letter-for-letter
of the Latin alphabet, with a couple of adaptations for Irish. James Carney
wrote the definitive article on the subject 30 years ago, and his work has
only been refined, not disputed.
P.S. There's a great scene in one of the Ulster Cycle tales where Cu Chulainn
leaves a long message in "ogam" for Fergus that caused our Old Irish
class to crack up. The "stick" that Cu Chulainn would need to have
used to copy his message would have been the heighth of a telephone
pole (more or less)!