A simple crane consists of a light, rigid rod that is hinged to a wall at one end and tied to the wall with a horizontal cable at the other end, as shown in the diagram below. The rod makes an angle to the wall. At the same end to which the cable is attached there is also a frictionless pulley. The rope that is looped over this pulley is attached to a mass m at one end and is held at the other end so that the weight hangs in equilibrium. Given that the gravitational field is g, what is the tension, T in the horizontal support cable?

[To enter the angle into the formula use the name 'theta' (no quotes).]