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 { |
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; |
571 |
// |
// |
572 |
// |
// |
573 |
// |
// |
574 |
if ( !strcmp(key->GetName(),"Tracker") && !li->TRK2 && !li->TRK1 && !li->TRKh ) continue; |
if ( !strcmp(key->GetName(),"Tracker") && !li->IsTRK2() && !li->IsTRK1() && !li->IsTRKh() ) continue; |
575 |
// |
// |
576 |
if ( !strcmp(key->GetName(),"Calorimeter") && !li->CAL2 && !li->CAL1 ) continue; |
if ( !strcmp(key->GetName(),"Calorimeter") && !li->IsCAL2() && !li->IsCAL1() ) continue; |
577 |
// |
// |
578 |
if ( !strcmp(key->GetName(),"ToF") && !li->TOF ) continue; |
if ( !strcmp(key->GetName(),"ToF") && !li->IsTOF() ) continue; |
579 |
// |
// |
580 |
if ( !strcmp(key->GetName(),"Trigger") && !li->TRG ) continue; |
if ( !strcmp(key->GetName(),"Trigger") && !li->IsTRG() ) continue; |
581 |
// |
// |
582 |
if ( !strcmp(key->GetName(),"Anticounter") && !li->AC ) continue; |
if ( !strcmp(key->GetName(),"Anticounter") && !li->IsAC() ) continue; |
583 |
// |
// |
584 |
if ( !strcmp(key->GetName(),"S4") && !li->S4 ) continue; |
if ( !strcmp(key->GetName(),"S4") && !li->IsS4() ) continue; |
585 |
// |
// |
586 |
if ( !strcmp(key->GetName(),"NeutronD") && !li->ND ) continue; |
if ( !strcmp(key->GetName(),"NeutronD") && !li->IsND() ) continue; |
587 |
// |
// |
588 |
if ( !strcmp(key->GetName(),"OrbitalInfo") && !li->ORB ) continue; |
if ( !strcmp(key->GetName(),"OrbitalInfo") && !li->IsORB() ) continue; |
589 |
// |
// |
590 |
if ( !strcmp(key->GetName(),"Run") && !RUN ) continue; |
if ( !strcmp(key->GetName(),"Run") && !li->IsRUN() ) continue; |
591 |
// |
// |
592 |
if ( strcmp(key->GetName(),"Calorimeter") && strcmp(key->GetName(),"Tracker") && strcmp(key->GetName(),"ToF") && strcmp(key->GetName(),"Trigger") && strcmp(key->GetName(),"Anticounter") && strcmp(key->GetName(),"S4") && strcmp(key->GetName(),"NeutronD") && strcmp(key->GetName(),"OrbitalInfo") && strcmp(key->GetName(),"Run") && strcmp(key->GetName(),"ProcessID0") ){ |
if ( strcmp(key->GetName(),"Calorimeter") && strcmp(key->GetName(),"Tracker") && strcmp(key->GetName(),"ToF") && strcmp(key->GetName(),"Trigger") && strcmp(key->GetName(),"Anticounter") && strcmp(key->GetName(),"S4") && strcmp(key->GetName(),"NeutronD") && strcmp(key->GetName(),"OrbitalInfo") && strcmp(key->GetName(),"Run") && strcmp(key->GetName(),"ProcessID0") ){ |
593 |
if ( DebugMode() ) printf(" ERROR UNKNOWN KEY %s !\n",key->GetName()); |
if ( DebugMode() ) printf(" ERROR UNKNOWN KEY %s !\n",key->GetName()); |
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 ); |