--- calo/flight/CaloPreSampler/src/CaloPreSampler.cpp 2010/03/10 12:11:11 1.17 +++ calo/flight/CaloPreSampler/src/CaloPreSampler.cpp 2014/01/23 11:23:54 1.19 @@ -210,12 +210,10 @@ Bool_t st = true; Int_t ntrkentry = 0; TrkLevel2 *trk = L2->GetTrkLevel2(); - Bool_t filled = false; + // Bool_t filled = false; // if ( debug ) printf(" Processing event at OBT %u PKT %u time %u \n",OBT,PKT,atime); // - this->Clear(); - // // find out if we have trkseqno = -1, -2 or -3 // Bool_t m1 = false; @@ -228,6 +226,18 @@ }; if ( !withtrk ) m3 = true; // + // copy variables calculated during calibration process which is skipped here... this has been moved before this->Clear() for reprocessing purpose + // + event->clevel2->good = L2->GetCaloLevel2()->good; + memcpy(event->clevel2->perr,L2->GetCaloLevel2()->perr,sizeof(L2->GetCaloLevel2()->perr)); + memcpy(event->clevel2->swerr,L2->GetCaloLevel2()->swerr,sizeof(L2->GetCaloLevel2()->swerr)); + memcpy(event->clevel2->crc,L2->GetCaloLevel2()->crc,sizeof(L2->GetCaloLevel2()->crc)); + event->clevel2->selftrigger = L2->GetCaloLevel2()->selftrigger; + // + // + this->Clear(); // moved after all calls to L2->GetCaloLevel2() since pcalo could be the same as L2->GetCaloLevel2() !!! + // + // if ( debug ) printf(" Fill estrip matrix needed to calculate variables \n"); // // Fill the estrip matrix @@ -335,13 +345,13 @@ // event->clevel1->good2 = 1; // - // copy variables calculated during calibration process which is skipped here... + // copy variables calculated during calibration process which is skipped here... this has to be moved before this->Clear() for reprocessing purpose // - event->clevel2->good = L2->GetCaloLevel2()->good; - memcpy(event->clevel2->perr,L2->GetCaloLevel2()->perr,sizeof(L2->GetCaloLevel2()->perr)); - memcpy(event->clevel2->swerr,L2->GetCaloLevel2()->swerr,sizeof(L2->GetCaloLevel2()->swerr)); - memcpy(event->clevel2->crc,L2->GetCaloLevel2()->crc,sizeof(L2->GetCaloLevel2()->crc)); - event->clevel2->selftrigger = L2->GetCaloLevel2()->selftrigger; +// event->clevel2->good = L2->GetCaloLevel2()->good; +// memcpy(event->clevel2->perr,L2->GetCaloLevel2()->perr,sizeof(L2->GetCaloLevel2()->perr)); +// memcpy(event->clevel2->swerr,L2->GetCaloLevel2()->swerr,sizeof(L2->GetCaloLevel2()->swerr)); +// memcpy(event->clevel2->crc,L2->GetCaloLevel2()->crc,sizeof(L2->GetCaloLevel2()->crc)); +// event->clevel2->selftrigger = L2->GetCaloLevel2()->selftrigger; // // Calculate variables common to all tracks (qtot, nstrip, etc.) // @@ -357,7 +367,7 @@ // ntrkentry = 0; // - filled = false; + // filled = false; // // Run over tracks (tracker or calorimeter ) // @@ -394,7 +404,7 @@ ntrkentry++; - filled = true; + // filled = true; // }; // loop on all the tracks }; @@ -439,7 +449,7 @@ if ( debug ) printf("-3 a Call FillTrkVar() \n"); event->FillTrkVar(pcalo,ntrkentry); ntrkentry++; - filled = true; + // filled = true; // } else { if ( debug ) printf(" Selftrigger: problems with event \n"); @@ -486,7 +496,7 @@ if ( debug ) printf("-2 a Call FillTrkVar() \n"); event->FillTrkVar(pcalo,ntrkentry); ntrkentry++; - filled = true; + // filled = true; // } else { if ( debug ) printf(" Selftrigger: problems with event \n"); @@ -532,7 +542,7 @@ if ( debug ) printf("-1 a Call FillTrkVar() \n"); event->FillTrkVar(pcalo,ntrkentry); ntrkentry++; - filled = true; + // filled = true; // } else { if ( debug ) printf(" Selftrigger: problems with event \n");