Changeset 8376 for trunk/MagicSoft/Cosy/main
- Timestamp:
- 03/14/07 19:12:17 (18 years ago)
- Location:
- trunk/MagicSoft/Cosy/main
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MBending.cc
r4255 r8376 59 59 #include "MBending.h" 60 60 61 #include <fstream .h>62 #include <iomanip .h>61 #include <fstream> 62 #include <iomanip> 63 63 #include <TVector3.h> 64 64 … … 68 68 69 69 ClassImp(MBending); 70 71 using namespace std; 70 72 71 73 #undef DEBUG -
trunk/MagicSoft/Cosy/main/MCaos.cc
r7790 r8376 1 1 #include "MCaos.h" 2 2 3 #include < iostream>3 #include <fstream> 4 4 #include <iomanip> 5 5 … … 21 21 #include "coord.h" 22 22 23 void MCaos::ReadResources(const char *name="leds.txt") 23 using namespace std; 24 25 void MCaos::ReadResources(const char *name) 24 26 { 25 27 ifstream fin(name); … … 242 244 c->Update(); 243 245 244 const Int_t n1 = (Int_t)( sqrt(fPositions.GetEntriesFast())+1.0);245 const Int_t n2 = (Int_t)( sqrt(fPositions.GetEntriesFast())+0.5);246 const Int_t n1 = (Int_t)(TMath::Sqrt(fPositions.GetEntriesFast())+1.0); 247 const Int_t n2 = (Int_t)(TMath::Sqrt(fPositions.GetEntriesFast())+0.5); 246 248 247 249 TCanvas *c1 = new TCanvas("cpos", "Led Positions", 800, 600); … … 330 332 } 331 333 332 Ring MCaos::Run(byte *img, bool printl, bool printr, const ZdAz &pos, const MTime &t, Double_t box, Double_t cut)334 Ring MCaos::Run(byte *img, bool printl, bool printr, const ZdAz &pos, const MTime &t, Int_t box, Double_t cut) 333 335 { 334 336 Leds &leds = *fLeds; … … 355 357 // Try to find Led in this area 356 358 const Led &l0 = fPositions(i); 357 f.Execute(leds, l0.GetX(), l0.GetY());359 f.Execute(leds, TMath::FloorNint(l0.GetX()), TMath::FloorNint(l0.GetY())); 358 360 359 361 // Loop over newly found Leds -
trunk/MagicSoft/Cosy/main/MCaos.h
r4865 r8376 89 89 90 90 Ring Run(byte *img, bool printl, bool printr, const ZdAz &pos, 91 const MTime &t, Double_t box, Double_t cut);91 const MTime &t, Int_t box, Double_t cut); 92 92 }; 93 93 -
trunk/MagicSoft/Cosy/main/MCosy.cc
r7790 r8376 1 1 #include "MCosy.h" 2 2 3 #include <iomanip.h> 4 #include <fstream.h> 5 #include <iostream.h> 3 #include <iomanip> 4 #include <fstream> 6 5 7 6 #include <TROOT.h> … … 30 29 31 30 ClassImp(MCosy); 31 32 using namespace std; 32 33 33 34 typedef struct tm tm_t; … … 493 494 { 494 495 #ifdef EXPERT 495 fMac1->SetDeceleration( 0.5*fMac1->GetVelRes());496 fMac2->SetDeceleration( 0.5*fMac2->GetVelRes());496 fMac1->SetDeceleration(TMath::Nint(0.5*fMac1->GetVelRes())); 497 fMac2->SetDeceleration(TMath::Nint(0.5*fMac2->GetVelRes())); 497 498 #else 498 fMac1->SetDeceleration( 0.3*fMac1->GetVelRes());499 fMac2->SetDeceleration( 0.3*fMac2->GetVelRes());499 fMac1->SetDeceleration(TMath::Nint(0.3*fMac1->GetVelRes())); 500 fMac2->SetDeceleration(TMath::Nint(0.3*fMac2->GetVelRes())); 500 501 #endif 501 502 fMac1->SetRpmMode(FALSE); -
trunk/MagicSoft/Cosy/main/MPointing.cc
r7230 r8376 6 6 7 7 ClassImp(MPointing); 8 9 using namespace std; 8 10 9 11 //#define EXPERT … … 30 32 if (ratio<1) 31 33 { 32 fCosy->fMac1->SetVelocity( vel);33 fCosy->fMac2->SetVelocity( vel*ratio);34 fCosy->fMac1->SetVelocity(TMath::Nint(vel)); 35 fCosy->fMac2->SetVelocity(TMath::Nint(vel*ratio)); 34 36 } 35 37 else 36 38 { 37 fCosy->fMac1->SetVelocity( vel/ratio);38 fCosy->fMac2->SetVelocity( vel);39 fCosy->fMac1->SetVelocity(TMath::Nint(vel/ratio)); 40 fCosy->fMac2->SetVelocity(TMath::Nint(vel)); 39 41 } 40 42 } … … 56 58 fCosy->SetStatus(MDriveCom::kMoving); 57 59 58 if (axe1) fCosy->fMac2->StartRelPos( rd.Zd());59 if (axe2) fCosy->fMac1->StartRelPos( rd.Az());60 if (axe1) fCosy->fMac2->StartRelPos(TMath::Nint(rd.Zd())); 61 if (axe2) fCosy->fMac1->StartRelPos(TMath::Nint(rd.Az())); 60 62 #ifdef EXPERT 61 63 cout << "Waiting for positioning..." << flush; … … 73 75 { 74 76 const int vr = mac->GetVelRes(); 75 mac->SetAcceleration( acc*vr);76 mac->SetDeceleration( dec*vr);77 mac->SetAcceleration(TMath::Nint(acc*vr)); 78 mac->SetDeceleration(TMath::Nint(dec*vr)); 77 79 return !mac->IsZombieNode(); 78 80 } -
trunk/MagicSoft/Cosy/main/MStargHistograms.cc
r7767 r8376 22 22 23 23 #include "coord.h" 24 25 using namespace std; 24 26 25 27 void MStargHistograms::OpenFile() -
trunk/MagicSoft/Cosy/main/MStarguider.cc
r7795 r8376 4 4 #include "MStarguider.h" 5 5 6 #include <fstream .h> // ifstream7 #include <iostream .h> // cout8 #include <iomanip .h>// cout6 #include <fstream> // ifstream 7 #include <iostream> // cout 8 #include <iomanip> // cout 9 9 10 10 #include <TH2F.h> … … 57 57 58 58 ClassImp(MStarguider); 59 60 using namespace std; 59 61 60 62 enum { … … 1457 1459 1458 1460 const Int_t idx = x.GetSize(); 1459 1461 1460 1462 x.Set(idx+1); 1461 1463 y.Set(idx+1); 1462 1464 mag.Set(idx+1); 1463 1465 1464 1466 x.AddAt(dpos.X(), idx); 1465 1467 y.AddAt(dpos.Y(), idx); … … 1507 1509 fPZdAz->SetCoordinates(cpos); 1508 1510 1509 1510 1511 // Check StargTPoint data set request 1511 1512 if (!fStargTPoint->IsDown()) … … 1575 1576 } 1576 1577 1577 XY MStarguider::FindRoqueLamp(FilterLed &f, FilterLed &f2, Ring &CameraCenter, MTime &t, Double_t cut, Double_t box, XY SearchCenter)1578 XY MStarguider::FindRoqueLamp(FilterLed &f, FilterLed &f2, Ring &CameraCenter, MTime &t, Double_t cut, Int_t box, XY SearchCenter) 1578 1579 { 1579 1580 // Set search Paremeters (FIXME: Get them from user input!) … … 1611 1612 } 1612 1613 1613 ZdAz MStarguider::FindStar(FilterLed &f, FilterLed &f2, Ring ¢er, MTime &t, Double_t cut, Double_t box, Double_t scalefactor = 1.0)1614 ZdAz MStarguider::FindStar(FilterLed &f, FilterLed &f2, Ring ¢er, MTime &t, Double_t cut, Int_t box, Double_t scalefactor = 1.0) 1614 1615 { 1615 1616 // Set search Paremeters (FIXME: Get them from user input!) … … 1850 1851 { 1851 1852 // SCALE FACTOR ASSUMED TO BE 70 1852 FindStar(f, f2, center, t, 3 .5, 70);1853 FindStar(f, f2, center, t, 3/*3.5*/, 70); 1853 1854 SendAmcTrigger("TPoint"); 1854 1855 } … … 1920 1921 1921 1922 Double_t imageclean = 1.5; 1922 Double_tboxradius = 60;1923 Int_t boxradius = 60; 1923 1924 //Double_t scalefactor = 1; 1924 1925 XY searchcenter(768/2-1,576/2+25); … … 1947 1948 1948 1949 Double_t imageclean = 5; 1949 Double_tboxradius = 60;1950 Int_t boxradius = 60; 1950 1951 //Double_t scalefactor = 1; 1951 1952 // XY searchcenter(sgcenter.GetX(),sgcenter.GetY()); … … 2016 2017 sgcenter.GetY()-293.6+28.5); 2017 2018 2018 fSao->CalcStars(stars, 530, 292, off.X(), off.Y());2019 fSao->CalcStars(stars, 530, 292, TMath::FloorNint(off.X()), TMath::FloorNint(off.Y())); 2019 2020 fSao->DrawStars(stars, cimg); 2020 2021
Note:
See TracChangeset
for help on using the changeset viewer.