/[PAMELA software]/calo/flight/CaloPreSampler/src/CaloPreSampler.cpp
ViewVC logotype

Diff of /calo/flight/CaloPreSampler/src/CaloPreSampler.cpp

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

revision 1.16 by mocchiut, Mon Dec 14 14:31:55 2009 UTC revision 1.18 by mocchiut, Thu Mar 18 19:50:10 2010 UTC
# Line 14  CaloPreSampler::CaloPreSampler(){ Line 14  CaloPreSampler::CaloPreSampler(){
14    Clear();    Clear();
15  }  }
16    
17    void CaloPreSampler::SetCaloLevel2Pointer(CaloLevel2 *cl2p){
18      if ( pcalo ) delete pcalo;
19      pcalo = cl2p;
20    }
21    
22  CaloPreSampler::CaloPreSampler(PamLevel2 *l2p){    CaloPreSampler::CaloPreSampler(PamLevel2 *l2p){  
23    //    //
24    L2 = l2p;    L2 = l2p;
# Line 209  void CaloPreSampler::Process(){ Line 214  void CaloPreSampler::Process(){
214    //    //
215    if ( debug ) printf(" Processing event at OBT %u PKT %u time %u \n",OBT,PKT,atime);    if ( debug ) printf(" Processing event at OBT %u PKT %u time %u \n",OBT,PKT,atime);
216    //    //
   this->Clear();  
   //  
217    // find out if we have trkseqno = -1, -2 or -3    // find out if we have trkseqno = -1, -2 or -3
218    //    //
219    Bool_t m1 = false;    Bool_t m1 = false;
# Line 223  void CaloPreSampler::Process(){ Line 226  void CaloPreSampler::Process(){
226    };    };
227    if ( !withtrk ) m3 = true;    if ( !withtrk ) m3 = true;
228    //    //
229      // copy variables calculated during calibration process which is skipped here... this has been moved before this->Clear() for reprocessing purpose
230      //
231      event->clevel2->good = L2->GetCaloLevel2()->good;
232      memcpy(event->clevel2->perr,L2->GetCaloLevel2()->perr,sizeof(L2->GetCaloLevel2()->perr));
233      memcpy(event->clevel2->swerr,L2->GetCaloLevel2()->swerr,sizeof(L2->GetCaloLevel2()->swerr));
234      memcpy(event->clevel2->crc,L2->GetCaloLevel2()->crc,sizeof(L2->GetCaloLevel2()->crc));
235      event->clevel2->selftrigger = L2->GetCaloLevel2()->selftrigger;
236      //
237      //
238      this->Clear(); // moved after all calls to L2->GetCaloLevel2() since pcalo could be the same as L2->GetCaloLevel2() !!!
239      //
240      //
241    if ( debug ) printf(" Fill estrip matrix needed to calculate variables \n");    if ( debug ) printf(" Fill estrip matrix needed to calculate variables \n");
242    //    //
243    // Fill the estrip matrix    // Fill the estrip matrix
# Line 330  void CaloPreSampler::Process(){ Line 345  void CaloPreSampler::Process(){
345    //    //
346    event->clevel1->good2 = 1;    event->clevel1->good2 = 1;
347    //    //
348    // 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
349    //    //
350    event->clevel2->good = L2->GetCaloLevel2()->good;  //  event->clevel2->good = L2->GetCaloLevel2()->good;
351    memcpy(event->clevel2->perr,L2->GetCaloLevel2()->perr,sizeof(L2->GetCaloLevel2()->perr));  //  memcpy(event->clevel2->perr,L2->GetCaloLevel2()->perr,sizeof(L2->GetCaloLevel2()->perr));
352    memcpy(event->clevel2->swerr,L2->GetCaloLevel2()->swerr,sizeof(L2->GetCaloLevel2()->swerr));  //  memcpy(event->clevel2->swerr,L2->GetCaloLevel2()->swerr,sizeof(L2->GetCaloLevel2()->swerr));
353    memcpy(event->clevel2->crc,L2->GetCaloLevel2()->crc,sizeof(L2->GetCaloLevel2()->crc));  //  memcpy(event->clevel2->crc,L2->GetCaloLevel2()->crc,sizeof(L2->GetCaloLevel2()->crc));
354    event->clevel2->selftrigger = L2->GetCaloLevel2()->selftrigger;  //  event->clevel2->selftrigger = L2->GetCaloLevel2()->selftrigger;
355    //    //
356    // Calculate variables common to all tracks (qtot, nstrip, etc.)    // Calculate variables common to all tracks (qtot, nstrip, etc.)
357    //    //

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.23