Electron temperature in field reversed configurations and theta pinches with closed magnetic field lines