Changeset 288 in Idarraga
- Timestamp:
- Apr 27, 2012, 12:01:34 AM (12 years ago)
- Location:
- mafalda/MAFTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mafalda/MAFTools/MAFTools.cpp
r285 r288 24 24 #include <TGraph.h> 25 25 #include <TMath.h> 26 #include <TGraph2D.h> 26 27 27 28 using namespace std; … … 139 140 return CalcDistance(px, py, interx, intery); 140 141 } 142 141 143 142 144 void DrawLine(MediPixAlgo * algo, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Int_t wd = 2, Int_t st = 2, EColor color = kBlack) { … … 633 635 double par[] = { m_a[index], m_b[index], m_c[index], m_t[index] }; 634 636 635 /*637 /* 636 638 if(pix.first == 111 && pix.second == 70) { 637 639 std::cout << "a = " << par[0] << std::endl; … … 697 699 } 698 700 701 TGraph2D * ConvertClusterToGraph2D(blob b, int div, int id){ 702 703 TString funcname = "TGraph2D_"; 704 funcname += id; 705 return ConvertClusterToGraph2D(b, div, funcname); 706 } 707 708 TGraph2D * ConvertClusterToGraph2D(blob b, int div, TString gname){ 709 710 vector<double> x; 711 vector<double> y; 712 vector<double> z; 713 list< pair < pair<int, int>, int > >::iterator i; 714 list< pair < pair<int, int>, int > > cld = b.GetClusterDescription(); 715 716 if(div == 1 || div == 0) { 717 for ( i = cld.begin() ; i != cld.end() ; i++ ) { 718 x.push_back((*i).first.first); 719 y.push_back((*i).first.second); 720 z.push_back((*i).second); // TOT 721 } 722 } 723 /* 724 else { 725 } 726 */ 727 TGraph2D * g2 = new TGraph2D((int)x.size(), &x[0], &y[0], &z[0]); 728 g2->SetName(gname); 729 730 return g2; 731 } 732 699 733 } 700 734 #endif -
mafalda/MAFTools/MAFTools.h
r285 r288 18 18 class MediPixAlgo; 19 19 class Highlighter; 20 class TGraph2D; 20 21 //class AllBlobsContainer; 21 22 //typedef struct steerSpiral; … … 44 45 Double_t CalcPerpDistanceToLine(Float_t, Float_t, pair<Int_t, Int_t>); 45 46 Double_t CalcPerpDistanceToLine(Float_t, Float_t, Int_t, Int_t); 46 47 47 48 48 /* Drawing */ … … 78 78 void ClearOneBlobData(blob *); 79 79 80 / * Dump contents of a blob */80 // Dump contents of a blob 81 81 void DumpBlobContents(blob); 82 82 83 83 int FindDiscontinuity(blob); 84 84 85 // More functions on Clustesr 86 TGraph2D * ConvertClusterToGraph2D(blob, int, TString); // an identifier, can be string or int 87 TGraph2D * ConvertClusterToGraph2D(blob, int, int); 85 88 86 89 ///////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.