Yes, just take a look at this Read a tfile while writing with another process
A simple (untested) implementation would be:
//Program 1
void filler() {
TFile* f = new TFile("test.root","RECREATE");
TH1D* h = new TH1D("h", "h", 100, 0, 10);
for ( int i = 0; i < 1000000; i++ ) {
usleep(10000);
h->Fill(gRandom->Gaus(5,1));
if(i%1000==0)
{
h->Write("",TObject::kWriteDelete);
f->SaveSelf();
}
}
f->Close();
delete f;
return;
}
//Program 2 in another terminal
void readnow() {
TFile* f = TFile::Open("test.root");
new TCanvas();
TH1D *h; f->GetObject("h",h);
h->Draw();
}