--- calo/flight/CaloPreSampler/src/CaloPreSampler.cpp 2010/03/10 12:11:11 1.17 +++ calo/flight/CaloPreSampler/src/CaloPreSampler.cpp 2010/03/18 19:50:10 1.18 @@ -214,8 +214,6 @@ // 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.) //