/[PAMELA software]/PadmeAmidala/src/RunGlue.cpp
ViewVC logotype

Diff of /PadmeAmidala/src/RunGlue.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mocchiut, Tue Jan 9 10:19:54 2007 UTC revision 1.7 by mocchiut, Tue Feb 13 09:37:53 2007 UTC
# Line 382  Bool_t RunGlue::OpenFile(){ Line 382  Bool_t RunGlue::OpenFile(){
382    //    //
383    fOpen = false;    fOpen = false;
384    printf(" Check if output file already exists \n");    printf(" Check if output file already exists \n");
385    Target = TFile::Open((this->GetFilename()).Data(), "READ" );    ifstream myfile;
386    //    myfile.open((this->GetFilename()).Data());
387    if ( Target ){    if ( myfile ){
388      Target->Close();      //  Target = TFile::Open((this->GetFilename()).Data(), "READ" );
389        //
390        //  if ( Target ){
391        //    Target->Close();
392        myfile.close();
393      printf("Error opening target file, %s  already exist!\n",(this->GetFilename()).Data());      printf("Error opening target file, %s  already exist!\n",(this->GetFilename()).Data());
394      return(false);      return(false);
395    } else {    } else {
# Line 546  void RunGlue::MergeRootfile(TList *sourc Line 550  void RunGlue::MergeRootfile(TList *sourc
550      //      //
551      // loop over all keys in this directory      // loop over all keys in this directory
552      //      //
553      TChain *globChain = 0;      TChain *globChain = 0;    
554      TIter nextkey( current_sourcedir->GetListOfKeys() );      TIter nextkey( current_sourcedir->GetListOfKeys() );
555      TKey *key = 0;      TKey *key = 0;
556      TKey *oldkey = 0;      TKey *oldkey = 0;
# Line 611  void RunGlue::MergeRootfile(TList *sourc Line 615  void RunGlue::MergeRootfile(TList *sourc
615          //          //
616          globChain = new TChain(obj_name);          globChain = new TChain(obj_name);
617          //          //
618            globChain->SetCacheSize(0);
619            //
620          globChain->Add(first_source->GetName());          globChain->Add(first_source->GetName());
621          //          //
622          TFile *nextsource = (TFile*)sourcelist->After( first_source );          TFile *nextsource = (TFile*)sourcelist->After( first_source );

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23