/[PAMELA software]/DarthVader/TrackerLevel2/src/TrkLevel0.cpp
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/TrkLevel0.cpp

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

revision 1.1.1.1 by mocchiut, Fri May 19 13:15:54 2006 UTC revision 1.3 by pam-fi, Thu Mar 15 12:17:10 2007 UTC
# Line 3  Line 3 
3   * \author Elena Vannuccini   * \author Elena Vannuccini
4   */   */
5  #include <TrkLevel0.h>  #include <TrkLevel0.h>
6    
7  using namespace pamela::tracker;  using namespace pamela::tracker;
8    
9  /**  /**
10   * Pass values from the TrkLevel0 object to a struct cTrkLevel0 (to put data in F77 common).   * Pass values from the TrkLevel0 object to a struct cTrkLevel0 (to put data in F77 common).
11   */   */
12  void TrkLevel0::GetCommonVar(cTrkLevel0 *l0) {  //void TrkLevel0::GetCommonVar(cTrkLevel0 *l0) {
13    void TrkLevel0::GetLevel0Struct(cTrkLevel0 *l0) {
14            
15      Int_t countrk=0;      Int_t countrk=0;
16    
17      l0->good0         = good0;      l0->good0         = yodaobj->good0;
18      l0->TOTDATAlength = TOTDATAlength;      l0->TOTDATAlength = yodaobj->TOTDATAlength;
19      for(Int_t ii=0;ii<12;ii++){      for(Int_t ii=0;ii<12;ii++){
20          l0->DAQmode[ii]         = DAQmode[ii];          l0->DAQmode[ii]         = yodaobj->DAQmode[ii];
21          l0->DSPnumber[ii]       = DSPnumber[ii];          l0->DSPnumber[ii]       = yodaobj->DSPnumber[ii];
22          l0->DATAlength[ii]      = DATAlength[ii];          l0->DATAlength[ii]      = yodaobj->DATAlength[ii];
23          l0->eventn[ii]          = eventn[ii];          l0->eventn[ii]          = yodaobj->eventn[ii];
24          l0->nclust[ii]          = nclust[ii];          l0->nclust[ii]          = yodaobj->nclust[ii];
25          l0->cutc[ii]            = cutc[ii];          l0->cutc[ii]            = yodaobj->cutc[ii];
26          l0->cutcl[ii]           = cutcl[ii];          l0->cutcl[ii]           = yodaobj->cutcl[ii];
27          for(Int_t iii=0;iii<3;iii++){          for(Int_t iii=0;iii<3;iii++){
28              l0->addrcluster[iii][ii] = addrcluster[ii][iii];              l0->addrcluster[iii][ii] = yodaobj->addrcluster[ii][iii];
29              l0->signcluster[iii][ii] = signcluster[ii][iii];              l0->signcluster[iii][ii] = yodaobj->signcluster[ii][iii];
30          };          };
31          l0->fc[ii]              = fc[ii];          l0->fc[ii]              = yodaobj->fc[ii];
32          l0->compressiontime[ii] = compressiontime[ii];          l0->compressiontime[ii] = yodaobj->compressiontime[ii];
33          l0->fl5[ii]             = fl5[ii];          l0->fl5[ii]             = yodaobj->fl5[ii];
34          l0->fl4[ii]             = fl4[ii];          l0->fl4[ii]             = yodaobj->fl4[ii];
35          l0->fl3[ii]             = fl3[ii];          l0->fl3[ii]             = yodaobj->fl3[ii];
36          l0->fl2[ii]             = fl2[ii];          l0->fl2[ii]             = yodaobj->fl2[ii];
37          l0->fl1[ii]             = fl1[ii];          l0->fl1[ii]             = yodaobj->fl1[ii];
38          l0->fl6[ii]             = fl6[ii];          l0->fl6[ii]             = yodaobj->fl6[ii];
39          l0->checksum[ii]        = checksum[ii];          l0->checksum[ii]        = yodaobj->checksum[ii];
40          for(Int_t j=0;j<DATAlength[ii];j++){          for(Int_t j=0;j<yodaobj->DATAlength[ii];j++){
41              l0->datatracker[countrk] = TrackerData.At(countrk);              l0->datatracker[countrk] = yodaobj->TrackerData.At(countrk);
42              ++countrk;              ++countrk;
43          };          };
44          l0->pnum[ii]            = pnum[ii];          l0->pnum[ii]            = yodaobj->pnum[ii];
45          l0->cmdnum[ii]          = cmdnum[ii];          l0->cmdnum[ii]          = yodaobj->cmdnum[ii];
46          l0->bid[ii]             = bid[ii];          l0->bid[ii]             = yodaobj->bid[ii];
47          l0->alarm[ii]           = alarm[ii];          l0->alarm[ii]           = yodaobj->alarm[ii];
48          l0->aswr[ii]            = aswr[ii];          l0->aswr[ii]            = yodaobj->aswr[ii];
49      };      };
50    
51            
52  }  }
53    /**
54     * Pass values from the TrkLevel0 object to a struct cTrkLevel0 (to put data in F77 common).
55     */
56    void TrkLevel0::SetFromLevel0Struct(cTrkLevel0 *){
57        
58        cout<<"void TrkLevel0::SetFromLevel0Struct(cTrkLevel0 *) -- not implemented"<<endl;
59        
60    };
61    /**
62     * Method to call the F77 routine that performs level0->level1 processing.
63     * The level1 output is stored in a common block, which can be retrieved
64     * by mean of the method TrkLevel1::SetFromLevel1Struct().
65     */
66    int TrkLevel0::ProcessEvent(){
67    
68    //    cout << "int TrkLevel0::ProcessEvent()" << endl;
69        TrkParams::Load(6);
70        if( !TrkParams::IsLoaded(6) ){
71            cout << "int TrkLevel0::ProcessEvent() -- ERROR -- VK-mask not loaded"<<endl;
72            return 0;
73        };
74        TrkParams::LoadCalib( );
75        if( !TrkParams::CalibIsLoaded() ){
76            cout << "int TrkLevel0::ProcessEvent() -- ERROR -- Calibration not loaded"<<endl;
77            return 0;
78        };
79    
80        GetLevel0Struct();
81        int F77err = 0;
82        reductionflight_(&F77err);
83        if(F77err < 0){
84            cout << "int TrkLevel0::ProcessEvent() -- ERROR -- from F77 routine"<<endl;
85            return 0;
86        }
87    //    cout << "...done"<<endl;
88        
89        return 1;
90    
91    }
92    
93    ClassImp(TrkLevel0);

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23