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

Diff of /DarthVader/OrbitalInfo/src/OrbitalInfo.cpp

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

revision 1.16 by pam-mep, Fri Mar 28 20:47:15 2014 UTC revision 1.18 by malakhov, Tue Mar 3 10:58:10 2015 UTC
# Line 61  void OrbitalInfo::Set(){//ELENA Line 61  void OrbitalInfo::Set(){//ELENA
61    if ( !OrbitalInfoTrk ) OrbitalInfoTrk = new TClonesArray("OrbitalInfoTrkVar",2); //ELENA}      if ( !OrbitalInfoTrk ) OrbitalInfoTrk = new TClonesArray("OrbitalInfoTrkVar",2); //ELENA}  
62    //  if ( !Iij ) Iij = new TMatrixD(3,3);    //  if ( !Iij ) Iij = new TMatrixD(3,3);
63  }//ELENA  }//ELENA
64    //--------------------------------------
65    //
66    //
67    //--------------------------------------
68    void OrbitalInfo::SetTrackArray(TClonesArray *track){//ELENA
69    //    if(track && strcmp(track->GetClass()->GetName(),"OrbitalInfoTrkVar")==0){
70            if(OrbitalInfoTrk)OrbitalInfoTrk->Clear("C");
71            OrbitalInfoTrk = track;
72    //    }
73    }
74    
75  OrbitalInfoTrkVar *OrbitalInfo::GetOrbitalInfoTrkVar(Int_t itrk){  OrbitalInfoTrkVar *OrbitalInfo::GetOrbitalInfoTrkVar(Int_t itrk){
76    //        //    
# Line 75  OrbitalInfoTrkVar *OrbitalInfo::GetOrbit Line 85  OrbitalInfoTrkVar *OrbitalInfo::GetOrbit
85    OrbitalInfoTrkVar *orbtrack = (OrbitalInfoTrkVar*)t[itrk];    OrbitalInfoTrkVar *orbtrack = (OrbitalInfoTrkVar*)t[itrk];
86    return orbtrack;    return orbtrack;
87  }  }
88    /**
89     * Retrieves the tof track matching the seqno-th tracker stored track.
90     *
91     */
92    OrbitalInfoTrkVar *OrbitalInfo::GetOrbitalInfoStoredTrack(int seqno){
93    
94      if( ntrk()==0 ){
95        printf("OrbitalInfo::GetOrbitalInfoStoredTrack(int) : requested tracker SeqNo %i but no OrbitalInforimeter tracks are stored\n",seqno);
96        return NULL;
97      };
98      
99      OrbitalInfoTrkVar *c = 0;
100      Int_t it_tof=0;
101        
102      do {
103        c = GetOrbitalInfoTrkVar(it_tof);
104        it_tof++;
105      } while( c && seqno != c->trkseqno && it_tof < ntrk());      
106      
107      if(!c || seqno != c->trkseqno){
108        c = 0;
109        if(seqno!=-1 ) printf("OrbitalInfo::GetOrbitalInfoStoredTrack(int) : requested tracker SeqNo %i does not match OrbitalInfo stored tracks\n",seqno);
110      };
111      return c;
112        
113    }
114    
115  void OrbitalInfo::Clear(Option_t *t){  void OrbitalInfo::Clear(Option_t *t){
116    //    //
# Line 121  void OrbitalInfo::Clear(Option_t *t){ Line 157  void OrbitalInfo::Clear(Option_t *t){
157    qkind = -1000;    qkind = -1000;
158    errq =  -1000;    errq =  -1000;
159    azim =  -1000;    azim =  -1000;
160      rtqual =-1000;
161    //  std::fill_n(goodAttitude, 5, 0);    //  std::fill_n(goodAttitude, 5, 0);
162  }  }
163    
# Line 166  void OrbitalInfo::GetLevel2Struct(cOrbit Line 203  void OrbitalInfo::GetLevel2Struct(cOrbit
203    l2->qkind = qkind;    l2->qkind = qkind;
204    l2->errq = errq;    l2->errq = errq;
205    l2->azim = azim;    l2->azim = azim;
206      l2->rtqual=rtqual;
207    
208  //   memcpy(l2->goodAttitude, goodAttitude, sizeof(goodAttitude));  //   memcpy(l2->goodAttitude, goodAttitude, sizeof(goodAttitude));
209  }  }
# Line 209  void OrbitalInfo::SetFromLevel2Struct(cO Line 247  void OrbitalInfo::SetFromLevel2Struct(cO
247    qkind = l2->qkind;    qkind = l2->qkind;
248    errq = l2->errq;    errq = l2->errq;
249    azim = l2->azim;    azim = l2->azim;
250      rtqual=l2->rtqual;
251    
252  //   memcpy(goodAttitude, l2->goodAttitude, sizeof(l2->goodAttitude));  //   memcpy(goodAttitude, l2->goodAttitude, sizeof(l2->goodAttitude));
253  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.23