30 #include <TObjString.h>
31 #include <TFileMerger.h>
47 const Text_t* ftitle, Int_t
compress)
48 :TNamed(fname, ftitle),
50 RootFile(new TFile(fname,option,ftitle,
compress))
61 :TNamed(f->GetName(), f->GetTitle()),
132 const Text_t* ftitle, Int_t
compress)
142 std::fstream* f =
new std::fstream(fname);
161 cerr <<
"-E- Could not open input file " << fname << endl;
162 Fatal(
"open",
"Could not open input file");
169 const Text_t* ftitle, Int_t
compress)
173 TString newParFileName =
"";
177 TListIter myIter(fnamelist);
184 while((
string = (TObjString*)myIter.Next())) {
185 inFile = TFile::Open(string->GetString().Data());
187 cout <<
"-W- File \"" <<
string->GetString().Data() <<
"\" does not exist" << endl;
191 if ( nofFiles == 0 ) {
192 newParFileName =
string->GetString();
193 newParFileName.Replace(newParFileName.Last(
'/')+1,
194 newParFileName.Length(),
"");
195 newParFileName = Form(
"%sallParams_%d_%d.root",
196 newParFileName.Data(),
197 currentDate.GetDate(),
198 currentDate.GetTime());
199 newParFile =
new TFile(newParFileName.Data(),
"RECREATE");
202 TList* inputKeys = (TList*)inFile->GetListOfKeys();
204 TListIter keyIter(inputKeys);
205 while((inpKey = (TKey*)keyIter.Next())) {
206 TObject* tempObj = inFile->Get(inpKey->GetName());
217 std::cout <<
"**** merged file = \"" << newParFileName.Data() <<
"\"" << std::endl;
219 return this->
open(newParFileName,option,ftitle,compress);
262 cout<<
"Root file I/O "<<
file->GetName()<<
" is open\n";
263 cout<<
"detector I/Os: ";
265 cout<<
" "<<io->GetName();
269 cout<<
"No ROOT file open\n";