From $ROOTSYS/tutorials/eve/camera_restore.C

void camera_restore(const char* fname, int mode = 0)
{
  TEveManager::Create();
  writeCurrentCamera(fname);
}

void writeCurrentCamera(const char* fname)
{
  TGLCamera& c = gEve->GetDefaultGLViewer()->CurrentCamera();
  TFile* f = TFile::Open(fname, "RECREATE");
  c.Write();
  f->Close();
}


void readCurrentCamera(const char* fname)
{
  TGLCamera& c = gEve->GetDefaultGLViewer()->CurrentCamera();
  TFile* f = TFile::Open(fname, "READ");
  if (!f)
    return;

  if (f->GetKey(c.ClassName())) {
    f->GetKey(c.ClassName())->Read(&c);
    c.IncTimeStamp();
    gEve->GetDefaultGLViewer()->RequestDraw();
  }
}
 camera_restore.C:1
 camera_restore.C:2
 camera_restore.C:3
 camera_restore.C:4
 camera_restore.C:5
 camera_restore.C:6
 camera_restore.C:7
 camera_restore.C:8
 camera_restore.C:9
 camera_restore.C:10
 camera_restore.C:11
 camera_restore.C:12
 camera_restore.C:13
 camera_restore.C:14
 camera_restore.C:15
 camera_restore.C:16
 camera_restore.C:17
 camera_restore.C:18
 camera_restore.C:19
 camera_restore.C:20
 camera_restore.C:21
 camera_restore.C:22
 camera_restore.C:23
 camera_restore.C:24
 camera_restore.C:25
 camera_restore.C:26
 camera_restore.C:27
 camera_restore.C:28
 camera_restore.C:29