Changeset 6513 for trunk/MagicSoft/Mars/mfileio
- Timestamp:
- 02/16/05 10:44:53 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mfileio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc
r6503 r6513 79 79 // open the input stream 80 80 // 81 fRun = new MReadTree("RunHeaders", fname, "R eadRunHeaders");81 fRun = new MReadTree("RunHeaders", fname, "RunHeaders"); 82 82 83 83 // -
trunk/MagicSoft/Mars/mfileio/MReadTree.cc
r6503 r6513 395 395 { 396 396 SetBit(kChainWasChanged); 397 *fLog << inf << GetDescriptor() << " - AddFile: " << numfiles << " files added from " << fname << "." << endl;397 *fLog << inf << GetDescriptor() << ": Added " << fname << " <" << numfiles << ">" << endl; 398 398 } 399 399 else … … 839 839 fTree->SetBranchAddress(bname, pcont); // *CHANGED-fChain-to-fTree* 840 840 841 *fLog << inf << "Master branch address '" << bname << "' ["; 842 *fLog << classname << "] setup for reading." << endl; 841 *fLog << inf << "Master branch address '" << bname << "' "; 842 if ((TString)bname!=(TString)classname) 843 *fLog << "[" << classname << "] "; 844 *fLog << "setup for reading." << endl; 843 845 844 846 //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl; -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r6507 r6513 582 582 // The containers should be written in Splitlevel=1 583 583 // 584 *fLog << inf << "Creating Branch " << cname << " of " << cont->ClassName(); 585 *fLog << " in tree " << tree->GetName() << "... " << flush; 584 *fLog << inf << "Creating Branch '" << cname << "' "; 585 if ((TString)cname!=(TString)cont->ClassName()) 586 *fLog << "[" << cont->ClassName() << "] "; 587 *fLog << "in tree " << tree->GetName() << "... " << flush; 586 588 587 589 branch = tree->Branch(branchname, cont->ClassName(), entry->GetAddress()); … … 805 807 // If you need more difficult rules please send me an eMail... 806 808 // 807 TString MWriteRootFile::GetNewFileName( TString &inname) const809 TString MWriteRootFile::GetNewFileName(const char *inname) const 808 810 { 809 811 // Remove the path from the filename … … 868 870 path.Append("/"); 869 871 870 inname.Prepend(path);872 //inname.Prepend(path); 871 873 872 874 // Create full qualified pathname … … 924 926 TTree *gettree = dynamic_cast<TTree*>(file->Get(o->GetName())); 925 927 if (!gettree) 926 continue; 928 { 929 *fLog << err << "ERROR - MakeCopies: Tree " << o->GetName() << " not found in file " << fname << "... abort." << endl; 930 return kFALSE; 931 } 927 932 928 933 gettree->SetBranchStatus(o->GetTitle(), 1); … … 960 965 Bool_t MWriteRootFile::ReInit(MParList *pList) 961 966 { 967 MRead *read = (MRead*)pList->FindTask("MRead"); 968 if (fSplitRule.IsNull() && fCopies.GetEntries()>0 && fOut) 969 { 970 if (!read) 971 { 972 *fLog << err; 973 *fLog << "ERROR: No Task 'MRead' found in the tasklist. This task is" << endl; 974 *fLog << " necessary to get the filename. Without a filename file" << endl; 975 *fLog << " AddCopySource cannot be used... abort." << endl; 976 *fLog << endl; 977 return kFALSE; 978 } 979 if (!MakeCopies(read->GetFullFileName())) 980 return kFALSE; 981 982 } 983 962 984 if (fSplitRule.IsNull() || !(fOut || TestBit(kIsNotOwner))) 963 985 return MWriteFile::ReInit(pList); 964 986 965 MRead *read = (MRead*)pList->FindTask("MRead");966 987 if (!read) 967 988 { … … 975 996 } 976 997 977 TString oldname = read->GetFileName(); 978 998 999 const TString oldname = read->GetFullFileName(); 979 1000 const TString newname = GetNewFileName(oldname); 980 1001 if (!ChangeFile(newname)) -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
r6500 r6513 93 93 // File handling 94 94 void Close(); 95 TString GetNewFileName( TString &inname) const;95 TString GetNewFileName(const char *inname) const; 96 96 Bool_t ChangeFile(const char *fname); 97 97 TFile *OpenFile(const char *name, Option_t *option, const char *title, Int_t comp);
Note:
See TracChangeset
for help on using the changeset viewer.