The Man Trap - S1-E2
Yeoman Janice Rand: Hello Beauregard. How are you today, darling?
Sulu: Her name's Gertrude.
Yeoman Janice Rand: No, it's a he-plant. A girl can tell.
Sulu: Why do people have to call inanimate objects, she? Like um, she's a fast ship.
Yeoman Janice Rand: He is not an inanimate object. He's so animate he makes me nervous. (00:23:21)
Answer: It's never really specified, but the poles were most likely a way of going from deck to deck for engineering crew.