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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show 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 /**
2 * \file TrkLevel0.cpp
3 * \author Elena Vannuccini
4 */
5 #include <TrkLevel0.h>
6
7 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 //void TrkLevel0::GetCommonVar(cTrkLevel0 *l0) {
13 void TrkLevel0::GetLevel0Struct(cTrkLevel0 *l0) {
14
15 Int_t countrk=0;
16
17 l0->good0 = yodaobj->good0;
18 l0->TOTDATAlength = yodaobj->TOTDATAlength;
19 for(Int_t ii=0;ii<12;ii++){
20 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 for(Int_t iii=0;iii<3;iii++){
28 l0->addrcluster[iii][ii] = yodaobj->addrcluster[ii][iii];
29 l0->signcluster[iii][ii] = yodaobj->signcluster[ii][iii];
30 };
31 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 ++countrk;
43 };
44 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 };
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);

  ViewVC Help
Powered by ViewVC 1.1.23