| 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(""); |
| 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; |