> When I make two TTree's write flag true. Both TTrees is written in one file. And the other file is empty.
>
> I added some lines to fix it in ROMEEventLoop.cpp
>
> -------
> This is other topic.
> Probably, to close TFile after each run is good.
> Because, when program runs for several run,
> even if program aborts after some runs, files of former runs are safe.
>
>
>
> -------
> 941 // Write non accumulative output tree files
> 942 ROMEString filename;
> 943 ROMETree *romeTree;
> 944 TTree *tree;
> 945 TFile *fTreeFile;
> 946 ROMEString runNumberString;
> 947 gROME->GetCurrentRunNumberString(runNumberString);
> 948 for (int j=0;j<gROME->GetTreeObjectEntries();j++) {
> 949 romeTree = gROME->GetTreeObjectAt(j);
> 950 fTreeFile = fTreeFiles[j];
> 951 if (romeTree->isWrite() && !gROME->isTreeAccumulation()) {
> 952 tree = romeTree->GetTree();
> 953 cout << "Writing Root-File " << tree->GetName() << runNumberString.Data() << ".root"
> << endl;
> 954 fTreeFile->cd();
> 955 tree->Write("",TObject::kOverwrite);
> 956 }
> 957 }
> 958 cout << endl;
Thanks |