Commit 419f3dc5 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 14/4/15 fix bug in GetPixelPositions; add library making in Makefile

parent 718cd86e
...@@ -46,6 +46,11 @@ CXXOBJ = $(OBJ)laguerreBuilder.o \ ...@@ -46,6 +46,11 @@ CXXOBJ = $(OBJ)laguerreBuilder.o \
$(OBJ)lagSphericTransform.o \ $(OBJ)lagSphericTransform.o \
$(OBJ)walltimer.o $(OBJ)walltimer.o
CXXSHOBJ = laguerreBuilder.o \
laguerreTransform.o \
lagSphericTransform.o \
walltimer.o
#C++ common Headers #C++ common Headers
CXXHDR = lagsht_exceptions.h \ CXXHDR = lagsht_exceptions.h \
...@@ -68,6 +73,18 @@ $(OBJ)%.o: %.cc $(CXXHDR) ...@@ -68,6 +73,18 @@ $(OBJ)%.o: %.cc $(CXXHDR)
echo "compile... $<", echo "compile... $<",
$(CXXCOMPILE) $< -o $@ $(CXXCOMPILE) $< -o $@
######################
.PHONY: sharelib
sharelib : $(CXXOBJ)
echo $(CXXSHOBJ) ; \
cd $(OBJ); \
$(CMDSHLCXX) -o $liblagsht.$(SLEXT) $(CXXSHOBJ) $(LDFLAGS)
.PHONY: lib
lib : $(OBJ)liblagsht.a
$(OBJ)liblagsht.a : $(CXXOBJ)
$(AR) $(ARFLAGS) $@ $?
###################### ######################
.PHONY: lagsht_testsuite .PHONY: lagsht_testsuite
lagsht_testsuite: $(EXE)lagsht_testsuite lagsht_testsuite: $(EXE)lagsht_testsuite
......
...@@ -82,7 +82,7 @@ void BaseLagSphTransform::SetThetaPhiMap(string choice, int nrings, int nphi){ ...@@ -82,7 +82,7 @@ void BaseLagSphTransform::SetThetaPhiMap(string choice, int nrings, int nphi){
}//SetThetaPhiMap }//SetThetaPhiMap
BaseLagSphTransform::geom_t BaseLagSphTransform::GetPixelPositions() { BaseLagSphTransform::geom_t BaseLagSphTransform::GetPixelPositions() {
geom_t pixels(Npix_); geom_t pixels;
sharp_geom_info *ginfo; sharp_geom_info *ginfo;
ginfo = sharpjob_.get_geom_info(); ginfo = sharpjob_.get_geom_info();
for (int i=0; i<ginfo->npairs; ++i) { for (int i=0; i<ginfo->npairs; ++i) {
...@@ -92,7 +92,7 @@ BaseLagSphTransform::geom_t BaseLagSphTransform::GetPixelPositions() { ...@@ -92,7 +92,7 @@ BaseLagSphTransform::geom_t BaseLagSphTransform::GetPixelPositions() {
double phi0 = ginfo->pair[i].r1.phi0; double phi0 = ginfo->pair[i].r1.phi0;
for(int j=0; j<nph1; j++) { for(int j=0; j<nph1; j++) {
double phi1 = phi0 + j*(2.0*M_PI/nph1); double phi1 = phi0 + j*(2.0*M_PI/nph1);
cout << "pixels ( "<< theta1 << ", " << phi1 << ")" << endl; // cout << "pixels ( "<< theta1 << ", " << phi1 << ")" << endl;
pixels.push_back(make_pair(theta1,phi1)); pixels.push_back(make_pair(theta1,phi1));
} }
if (ginfo->pair[i].r2.nph>0) {// the second ring in this pair exists if (ginfo->pair[i].r2.nph>0) {// the second ring in this pair exists
...@@ -101,7 +101,7 @@ BaseLagSphTransform::geom_t BaseLagSphTransform::GetPixelPositions() { ...@@ -101,7 +101,7 @@ BaseLagSphTransform::geom_t BaseLagSphTransform::GetPixelPositions() {
double phi0 = ginfo->pair[i].r2.phi0; double phi0 = ginfo->pair[i].r2.phi0;
for(int j=0; j<nph2; j++) { for(int j=0; j<nph2; j++) {
double phi2 = phi0 + j*(2.0*M_PI/nph2); double phi2 = phi0 + j*(2.0*M_PI/nph2);
cout << "pixels ( "<< theta2 << ", " << phi2 << ")" << endl; // cout << "pixels ( "<< theta2 << ", " << phi2 << ")" << endl;
pixels.push_back(make_pair(theta2,phi2)); pixels.push_back(make_pair(theta2,phi2));
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment