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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Mar 15 12:17:10 2007 UTC (17 years, 8 months ago) by pam-fi
Branch: MAIN
CVS Tags: v5r00, v4r00, v3r04, v3r05, v3r06, v3r03
Changes since 1.2: +14 -2 lines
workaround to retrieve clusters + other minor adjustments

1 mocchiut 1.1 /**
2     * \file TrkLevel0.cpp
3     * \author Elena Vannuccini
4     */
5     #include <TrkLevel0.h>
6 pam-fi 1.2
7 mocchiut 1.1 using namespace pamela::tracker;
8    
9     /**
10     * Pass values from the TrkLevel0 object to a struct cTrkLevel0 (to put data in F77 common).
11     */
12 pam-fi 1.2 //void TrkLevel0::GetCommonVar(cTrkLevel0 *l0) {
13     void TrkLevel0::GetLevel0Struct(cTrkLevel0 *l0) {
14 mocchiut 1.1
15     Int_t countrk=0;
16    
17 pam-fi 1.2 l0->good0 = yodaobj->good0;
18     l0->TOTDATAlength = yodaobj->TOTDATAlength;
19 mocchiut 1.1 for(Int_t ii=0;ii<12;ii++){
20 pam-fi 1.2 l0->DAQmode[ii] = yodaobj->DAQmode[ii];
21     l0->DSPnumber[ii] = yodaobj->DSPnumber[ii];
22     l0->DATAlength[ii] = yodaobj->DATAlength[ii];
23     l0->eventn[ii] = yodaobj->eventn[ii];
24     l0->nclust[ii] = yodaobj->nclust[ii];
25     l0->cutc[ii] = yodaobj->cutc[ii];
26     l0->cutcl[ii] = yodaobj->cutcl[ii];
27 mocchiut 1.1 for(Int_t iii=0;iii<3;iii++){
28 pam-fi 1.2 l0->addrcluster[iii][ii] = yodaobj->addrcluster[ii][iii];
29     l0->signcluster[iii][ii] = yodaobj->signcluster[ii][iii];
30 mocchiut 1.1 };
31 pam-fi 1.2 l0->fc[ii] = yodaobj->fc[ii];
32     l0->compressiontime[ii] = yodaobj->compressiontime[ii];
33     l0->fl5[ii] = yodaobj->fl5[ii];
34     l0->fl4[ii] = yodaobj->fl4[ii];
35     l0->fl3[ii] = yodaobj->fl3[ii];
36     l0->fl2[ii] = yodaobj->fl2[ii];
37     l0->fl1[ii] = yodaobj->fl1[ii];
38     l0->fl6[ii] = yodaobj->fl6[ii];
39     l0->checksum[ii] = yodaobj->checksum[ii];
40     for(Int_t j=0;j<yodaobj->DATAlength[ii];j++){
41     l0->datatracker[countrk] = yodaobj->TrackerData.At(countrk);
42 mocchiut 1.1 ++countrk;
43     };
44 pam-fi 1.2 l0->pnum[ii] = yodaobj->pnum[ii];
45     l0->cmdnum[ii] = yodaobj->cmdnum[ii];
46     l0->bid[ii] = yodaobj->bid[ii];
47     l0->alarm[ii] = yodaobj->alarm[ii];
48     l0->aswr[ii] = yodaobj->aswr[ii];
49 mocchiut 1.1 };
50    
51    
52     }
53 pam-fi 1.2 /**
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 pam-fi 1.3 TrkParams::Load(6);
70     if( !TrkParams::IsLoaded(6) ){
71     cout << "int TrkLevel0::ProcessEvent() -- ERROR -- VK-mask not loaded"<<endl;
72     return 0;
73     };
74 pam-fi 1.2 TrkParams::LoadCalib( );
75 pam-fi 1.3 if( !TrkParams::CalibIsLoaded() ){
76     cout << "int TrkLevel0::ProcessEvent() -- ERROR -- Calibration not loaded"<<endl;
77     return 0;
78     };
79 pam-fi 1.2
80     GetLevel0Struct();
81     int F77err = 0;
82     reductionflight_(&F77err);
83 pam-fi 1.3 if(F77err < 0){
84     cout << "int TrkLevel0::ProcessEvent() -- ERROR -- from F77 routine"<<endl;
85     return 0;
86     }
87     // cout << "...done"<<endl;
88 pam-fi 1.2
89     return 1;
90    
91     }
92 mocchiut 1.1
93 pam-fi 1.2 ClassImp(TrkLevel0);

  ViewVC Help
Powered by ViewVC 1.1.23