Back Midas Rome Roody Rootana
  Rome Analyzer Framework  Not logged in ELOG logo
Entry  01 Jan 2005, Ryu Sawada, Bug Report, Multiple TTree writing 
    Reply  04 Jan 2005, Matthias Schneebeli, Bug Report, Multiple TTree writing 
Message ID: 29     Entry time: 01 Jan 2005     Reply to this: 30
Author: Ryu Sawada 
Topic: Bug Report 
Subject: Multiple TTree writing 
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;
ELOG V3.1.4-2e1708b5