6 |
// |
// |
7 |
// ROOT headers |
// ROOT headers |
8 |
// |
// |
9 |
|
#include <TTimeStamp.h> |
10 |
#include <TString.h> |
#include <TString.h> |
11 |
#include <TSQLServer.h> |
#include <TSQLServer.h> |
12 |
#include <TFile.h> |
#include <TFile.h> |
653 |
TTree::SetMaxTreeSize(maxsize); |
TTree::SetMaxTreeSize(maxsize); |
654 |
processFile->SetCompressionLevel(1); |
processFile->SetCompressionLevel(1); |
655 |
// |
// |
656 |
|
// ok, we are going to do some kinf of processing, the file is opened and ready. Save processing infos first |
657 |
|
// |
658 |
|
ProcInfo *procinfo = new ProcInfo(); |
659 |
|
procinfo->runID = run; |
660 |
|
TTimeStamp *dt = new TTimeStamp(); |
661 |
|
procinfo->date = dt->AsString(); |
662 |
|
delete dt; |
663 |
|
for ( Int_t icl = 0; icl<numinp; icl++){ |
664 |
|
procinfo->commandLine += Form("%s ",inps[icl]); |
665 |
|
} |
666 |
|
procinfo->outputFilename = filename; |
667 |
|
procinfo->localDir = gSystem->WorkingDirectory(); |
668 |
|
procinfo->uname = gSystem->GetFromPipe("uname -a"); |
669 |
|
procinfo->DB = host; |
670 |
|
|
671 |
|
TTree *pinfo = 0; |
672 |
|
pinfo = (TTree*)processFile->Get("ProcessingInfo"); |
673 |
|
// ProcessingInfo tree does not exist, crating proc info |
674 |
|
if ( !pinfo ){ |
675 |
|
if ( debug ) printf("ProcessingInfo tree does not exist, crating proc info\n"); |
676 |
|
pinfo = new TTree("ProcessingInfo","Log of data processing"); |
677 |
|
pinfo->Branch("ProcInfo","ProcInfo",&procinfo); |
678 |
|
} else { |
679 |
|
pinfo->SetBranchAddress("ProcInfo",&procinfo); |
680 |
|
} |
681 |
|
pinfo->Fill(); |
682 |
|
processFile->cd(); |
683 |
|
pinfo->Write("ProcessingInfo",TObject::kOverwrite); |
684 |
|
if ( procinfo ) delete procinfo; |
685 |
|
if ( pinfo ) pinfo->Delete(); |
686 |
// |
// |
687 |
// Run the core program, put any output error in the "error" variable |
// Run the core program, put any output error in the "error" variable |
688 |
// |
// |