/[PAMELA software]/DarthVader/ToFLevel2/src/ToFLevel2.cpp
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/ToFLevel2.cpp

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

revision 1.5 by mocchiut, Fri Jul 14 14:06:16 2006 UTC revision 1.6 by pam-fi, Fri Jul 21 11:02:28 2006 UTC
# Line 323  void ToFLevel2::GetPMTIndex(Int_t ind, I Line 323  void ToFLevel2::GetPMTIndex(Int_t ind, I
323    };    };
324    return;    return;
325  };  };
326    
327    /**
328     * Fills a struct cToFLevel2 with values from a ToFLevel2 object (to put data into a F77 common).
329     */
330    void ToFLevel2::GetLevel2Struct(cToFLevel2 *l2) const{
331    
332      for(Int_t i=0;i<6;i++)
333        l2->tof_j_flag[i]=tof_j_flag[i];
334    
335      l2->ntoftrk = ToFTrk->GetEntries();
336      for(Int_t j=0;j<l2->ntoftrk;j++){
337        l2->toftrkseqno[j]= ((ToFTrkVar*)ToFTrk->At(j))->toftrkseqno;
338        l2->npmttdc[j]= ((ToFTrkVar*)ToFTrk->At(j))->npmttdc;
339        for(Int_t i=0;i<l2->npmttdc[j];i++)
340          l2->pmttdc[i][j] = ((ToFTrkVar*)ToFTrk->At(j))->pmttdc.At(i);
341        for(Int_t i=0;i<13;i++)
342          l2->beta[i][j] = ((ToFTrkVar*)ToFTrk->At(j))->beta[i];
343    
344        l2->npmtadc[j]= ((ToFTrkVar*)ToFTrk->At(j))->npmtadc;
345        for(Int_t i=0;i<l2->npmtadc[j];i++){
346          l2->pmtadc[i][j] = ((ToFTrkVar*)ToFTrk->At(j))->pmtadc.At(i);
347          l2->dedx[i][j] = ((ToFTrkVar*)ToFTrk->At(j))->dedx.At(i);
348        }
349        for(Int_t i=0;i<3;i++){
350          l2->xtofpos[i][j]=((ToFTrkVar*)ToFTrk->At(j))->xtofpos[i];
351          l2->ytofpos[i][j]=((ToFTrkVar*)ToFTrk->At(j))->ytofpos[i];
352        }
353      }
354        
355      l2->npmt = PMT->GetEntries();
356       for(Int_t j=0;j<l2->npmt;j++){
357         l2->pmt_id[j] = ((ToFPMT*)PMT->At(j))->pmt_id;
358         l2->adc[j] =((ToFPMT*)PMT->At(j))->adc;
359         l2->tdc_tw[j] =((ToFPMT*)PMT->At(j))->tdc_tw;
360       }
361    }

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

  ViewVC Help
Powered by ViewVC 1.1.23