12 lines
264 B
C
12 lines
264 B
C
{
|
|
gSystem->Load("libDictExample");
|
|
Simple s;
|
|
cout << s.GetX() << endl;
|
|
TFile *_file = TFile::Open("tmp.root", "RECREATE");
|
|
gDirectory->WriteObject(&s, "MyS");
|
|
Simple *MyS = nullptr;
|
|
gDirectory->GetObject("MyS", MyS);
|
|
cout << MyS->GetX() << endl;
|
|
_file->Close();
|
|
}
|