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

Diff of /DarthVader/NDLevel2/src/NDCore.cpp

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

revision 1.5 by mocchiut, Tue Sep 5 14:49:42 2006 UTC revision 1.8 by mocchiut, Fri Nov 17 10:08:09 2006 UTC
# Line 360  int NDCore(UInt_t run, TFile *file, TSQL Line 360  int NDCore(UInt_t run, TFile *file, TSQL
360      //      //
361      // prepare the timesync for the db      // prepare the timesync for the db
362      //      //
363        if ( !dbc->IsConnected() ) throw -604;
364      dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc);      dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc);
365      //      //
366      // 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.
367      //      //
368        if ( !dbc->IsConnected() ) throw -604;
369      glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc);      glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc);
370      //      //
371      ftmpname.str("");      ftmpname.str("");
# Line 461  int NDCore(UInt_t run, TFile *file, TSQL Line 463  int NDCore(UInt_t run, TFile *file, TSQL
463        //        //
464        l0ND->GetEntry(re);        l0ND->GetEntry(re);
465        tmpSize = l0ne->Records->GetEntries();        tmpSize = l0ne->Records->GetEntries();
466        if (!tmpSize) continue;        if ( tmpSize && l0ne->unpackError == 0 ){
467        if (l0ne->unpackError == 1) continue;          for (Int_t j = 0; j < tmpSize; j++){
468        for (Int_t j = 0; j < tmpSize; j++){            l0nr = (pamela::neutron::NeutronRecord*)l0ne->Records->At(j);
469          l0nr = (pamela::neutron::NeutronRecord*)l0ne->Records->At(j);            yTrig            = yTrig             + (float)l0nr->trigPhysics;
470          yTrig            = yTrig             + (float)l0nr->trigPhysics;            yUpperBackground  = yUpperBackground  + (float)l0nr->upperBack;
471          yUpperBackground  = yUpperBackground  + (float)l0nr->upperBack;            yBottomBackground = yBottomBackground + (float)l0nr->bottomBack;
472          yBottomBackground = yBottomBackground + (float)l0nr->bottomBack;          }
473        }          nd->upperBack = yUpperBackground;
474        nd->upperBack = yUpperBackground;          nd->bottomBack = yBottomBackground;
475        nd->bottomBack = yBottomBackground;          nd->trigPhysics = yTrig;            
476        nd->trigPhysics = yTrig;              };
477              //
478          nd->unpackError = l0ne->unpackError;
479          //
480        NDtr->Fill();        // Fill tree NDLevel2 in the root file        NDtr->Fill();        // Fill tree NDLevel2 in the root file
481          //
482        yUpperBackground =0;        yUpperBackground =0;
483        yBottomBackground =0;        yBottomBackground =0;
484        yTrig=0;              yTrig=0;      

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23