#define WRITEALLHISTS \ gDirectory->cd("root:/"); \ wlist = gDirectory->GetList(); \ if(!UpdateRootFile) f1= new TFile(ROOTFile, ROOTFileOption); \ if (ComPressLevel>NOTDEF) f1->SetCompressionLevel(ComPressLevel); \ printf("writing all spectra to [%s]\n", ROOTFile); \ printf("be patient... "); \ fflush(stdout); \ t1 = time(NULL); \ wlist->Write(0,TObject::kOverwrite); \ t2 = time(NULL); \ printf("DONE! on "); \ time_stamp(); \ printf("file size: %i, ",f1->GetSize()); \ printf("compression level: %i, ",f1->GetCompressionLevel()); \ printf("and factor: %f\n",f1->GetCompressionFactor()); \ printf("uncompressed root file size: %f\n",f1->GetSize()*f1->GetCompressionFactor()); \ printf("writeout time: %i seconds\n", t2 - t1); \ printf("at %7.2f Mbytes/sec\n", (float) f1->GetSize() / (t2 - t1) / 1000000.0); \ printf("on "); \ time_stamp(); \ fflush(stdout); #define UPDSSHMEM \ t1 = time(NULL); \ mfile->Update(); \ t2 = time(NULL); \ printf("done! "); \ printf("shared memory size: %i\n", mfile->GetSize()); \ printf("update time: %i seconds ", t2 - t1); \ printf("at %7.2f Mbytes/sec\n", (float) mfile->GetSize() / (t2 - t1) / 1000000.0); \ printf("to mapfile [%s] on ",ShareMemFile); \ time_stamp(); \ fflush(stdout);