A cardiac harness adapted to fit generally around a least a portion of a heart includes at least one elastic spring member forming an annular portion that is elastically deformable and at least one sensor disposed on the annular portion for providing a sensor signal representative of cardiac function. The cardiac harness applies a compressive force on the heart during diastole and systole. The sensor is configured to take a measurement of impedance across the heart, impedance across a lung, evoked response of the heart, activation patterns of the heart, acceleration of a portion of the heart, position of a portion of the heart relative to an ultrasonic transmitter, pH on the heart's epicardial surface, blood oxygen saturation of a portion of the heart, or position of a portion of the heart relative to a magnetic field generating device. The cardiac harness and sensor are delivered and implanted on the heart by minimally invasive access.