Chief engineer

On starships or starbases, the chief engineer is in charge of all engineers and engineering duties.

The chief engineer's duties range from making the duty shift roster for engineering personnel to advising the captain on possible solutions for certain technical problems. In general the chief engineer is an officer with enough experience in his or her own field of expertise and with seniority over the rest of the engineers. A chief engineer is also a member of the senior staff and accountable for the overall performance of the vessel.

The captain of a Starfleet starship has the perogative to appoint someone to the post of chief engineer even if he or she does not have the seniority which normally would apply to this function. Persons with vast experience and engineering knowledge but no appropriate Starfleet rank could be appointed as chief engineer in this manner.

From Memory Alpha -- the free Star Trek reference