During the siege of Gondor:
Faramir is gravely injured by a southron (Haradrim) dart while trying to hold Osgiliath.
When he is brought back to Gondor, there is this passage:
The Prince Imrahil brought Faramir to the White Tower, and he said: 'Your son has returned, lord, after great deeds,' and he told all that he had seen. But Denethor rose and looked on the face of his son and was silent. Then he bade them make a bed in the chamber and lay Faramir upon it and depart. But he himself went up alone into the secret room under the summit of the Tower; and many who looked up thither at that time saw a pale light that gleamed and flickered from the narrow windows for a while, and then flashed and went out. And when Denethor descended again he went to Faramir and sat beside him without speaking, but the face of the Lord as grey, more deathlike than his son's.
The Lord of the Rings Book 5 Chapter 4: The Siege of Gondor
I've emphasized the portion relating to my question: what did Denethor go up there for? Did he do anything special in the secret room? What was the secret room for, anyway? It seems a bit strange that in a time of such great grief he'd decide to visit some random secret room, so I'm guessing there was something particularly special about it that he needed.