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

Diff of /DarthVader/S4Level2/src/S4Core.cpp

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

revision 1.7 by mocchiut, Thu Nov 9 17:05:47 2006 UTC revision 1.10 by mocchiut, Tue Jan 23 15:36:47 2007 UTC
# Line 29  Line 29 
29  #include <stdlib.h>  #include <stdlib.h>
30  #include <math.h>  #include <math.h>
31  //  //
32    // RunInfo header
33    //
34    #include <RunInfo.h>
35    #include <GLTables.h>
36    //
37  // YODA headers  // YODA headers
38  //  //
39  #include <PamelaRun.h>  #include <PamelaRun.h>
# Line 38  Line 43 
43  #include <CalibS4Event.h>  #include <CalibS4Event.h>
44  #include <physics/S4/S4Event.h>  #include <physics/S4/S4Event.h>
45  //#include <yodaUtility.h>  //#include <yodaUtility.h>
46  //  
 // RunInfo header  
 //  
 #include <RunInfo.h>  
 #include <GLTables.h>  
47  //  //
48  // This program headers  // This program headers
49  //  //
# Line 72  TArrayD *S4_paramfit(UInt_t atime, TSQLS Line 73  TArrayD *S4_paramfit(UInt_t atime, TSQLS
73    //    //
74    GL_S4_CALIB *glS4calib = new GL_S4_CALIB();    GL_S4_CALIB *glS4calib = new GL_S4_CALIB();
75    //    //
76      if ( !dbc->IsConnected() ) throw -504;
77    glS4calib->Query_GL_S4_CALIB(atime, dbc);    glS4calib->Query_GL_S4_CALIB(atime, dbc);
78    //    //
79    GL_ROOT *glroot = new GL_ROOT();    GL_ROOT *glroot = new GL_ROOT();
80      if ( !dbc->IsConnected() ) throw -504;
81    glroot->Query_GL_ROOT(glS4calib->ID_ROOT_L0,dbc);    glroot->Query_GL_ROOT(glS4calib->ID_ROOT_L0,dbc);
82    //    //
83    stringstream ftmpname;    stringstream ftmpname;
# Line 196  int S4Core(UInt_t run, TFile *file, TSQL Line 199  int S4Core(UInt_t run, TFile *file, TSQL
199    //    //
200    // variables needed to reprocess data    // variables needed to reprocess data
201    //    //
202      Long64_t maxsize = 10000000000LL;  
203      TTree::SetMaxTreeSize(maxsize);
204      //
205    TString S4version;    TString S4version;
206    ItoRunInfo *runinfo = 0;    ItoRunInfo *runinfo = 0;
207    TArrayI *runlist = 0;    TArrayI *runlist = 0;
# Line 341  int S4Core(UInt_t run, TFile *file, TSQL Line 347  int S4Core(UInt_t run, TFile *file, TSQL
347      //      //
348      // tree exists, we are reprocessing data. Are we reprocessing a single run or all the file?      // tree exists, we are reprocessing data. Are we reprocessing a single run or all the file?
349      //      //
350        S4trclone->SetAutoSave(900000000000000LL);
351      reproc = true;      reproc = true;
352      //      //
353      // update versioning information      // update versioning information
# Line 385  int S4Core(UInt_t run, TFile *file, TSQL Line 392  int S4Core(UInt_t run, TFile *file, TSQL
392    //    //
393    file->cd();    file->cd();
394    S4tr = new TTree("S4-new","PAMELA Level2 S4 data");    S4tr = new TTree("S4-new","PAMELA Level2 S4 data");
395      S4tr->SetAutoSave(900000000000000LL);
396    S4tr->Branch("S4Level2","S4Level2",&s4);    S4tr->Branch("S4Level2","S4Level2",&s4);
397    //    //
398    if ( reproc && !reprocall ){    if ( reproc && !reprocall ){
# Line 393  int S4Core(UInt_t run, TFile *file, TSQL Line 401  int S4Core(UInt_t run, TFile *file, TSQL
401      //      //
402      tempfile = new TFile(tempname.str().c_str(),"READ");      tempfile = new TFile(tempname.str().c_str(),"READ");
403      S4trclone = (TTree*)tempfile->Get("S4-old");      S4trclone = (TTree*)tempfile->Get("S4-old");
404        S4trclone->SetAutoSave(900000000000000LL);
405      S4trclone->SetBranchAddress("S4Level2",&s4clone);      S4trclone->SetBranchAddress("S4Level2",&s4clone);
406      //            //      
407      if ( nobefrun > 0 ){      if ( nobefrun > 0 ){
# Line 461  int S4Core(UInt_t run, TFile *file, TSQL Line 470  int S4Core(UInt_t run, TFile *file, TSQL
470      //      //
471      // prepare the timesync for the db      // prepare the timesync for the db
472      //      //
473        if ( !dbc->IsConnected() ) throw -504;
474      dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc);      dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc);
475      //      //
476      // Search in the DB the path and name of the LEVEL0 file to be processed.      // Search in the DB the path and name of the LEVEL0 file to be processed.
477      //      //
478        if ( !dbc->IsConnected() ) throw -504;
479      glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc);      glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc);
480      //      //
481      ftmpname.str("");      ftmpname.str("");

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.23