  The large-deviation method can be used to study the measurement trajectories
of open quantum systems. For optical arrangements this formalism allows to
describe the long time properties of the (non-equilibrium) photon counting
statistics in the context of a (equilibrium) thermodynamic approach defined in
terms of dynamical phases and transitions between them in the trajectory space
[J.P. Garrahan and I. Lesanovsky, Phys. Rev. Lett. 104, 160601 (2010)]. In this
paper, we study the thermodynamic approach for fluorescent systems coupled to
complex reservoirs that induce stochastic fluctuations in their dynamical
parameters. In a fast modulation limit the thermodynamics corresponds to that
of a Markovian two-level system. In a slow modulation limit, the thermodynamic
properties are equivalent to those of a finite system that in an infinite-size
limit is characterized by a first-order transition. The dynamical phases
correspond to different intensity regimes, while the size of the system is
measured by the transition rate of the bath fluctuations. As a function of a
dimensionless intensive variable, the first and second derivative of the
thermodynamic potential develop an abrupt change and a narrow peak
respectively. Their scaling properties are consistent with a double-Gaussian
probability distribution of the associated extensive variable.
