Since the original Q was re-written, I'll expand my answer...
The THS setting for T/O in the A320 is solely a function of T/O cg - ie. how the aircraft was loaded.
The value of T/O cg. is derived as described above, using the loadsheet data. The loadsheet is, indeed, usually spat out by a computer, but can also be calculated manually when 'in the middle of nowhere'