/[PAMELA software]/DarthVader/src/DarthVader.cpp
ViewVC logotype

Diff of /DarthVader/src/DarthVader.cpp

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

revision 1.51 by mocchiut, Thu Jul 31 10:14:49 2014 UTC revision 1.52 by mocchiut, Wed Aug 27 14:44:38 2014 UTC
# Line 6  Line 6 
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>
# Line 652  int main(int numinp, char *inps[]){ Line 653  int main(int numinp, char *inps[]){
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      //      //

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

  ViewVC Help
Powered by ViewVC 1.1.23