- Timestamp:
- 03/25/18 16:32:05 (7 years ago)
- Location:
- trunk/Mars
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/CMakeLists.txt
r18956 r18957 62 62 SET(CMAKE_CXX_FLAGS 63 63 "${CMAKE_CXX_FLAGS} -Wall -Winit-self -Wpointer-arith \ 64 -Wcast-align -Wformat= 2-Woverloaded-virtual \64 -Wcast-align -Wformat=1 -Woverloaded-virtual \ 65 65 -Wnon-virtual-dtor -Wshadow -fPIC") # -Wextra 66 66 … … 116 116 # ------------------------------------------------------- 117 117 118 FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/dictionary) 119 118 120 MACRO(SRCFILES subdir) 119 121 … … 136 138 SEPARATE_ARGUMENTS(_HEADERS) 137 139 138 ROOT_GENERATE_DICTIONARY( G__${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${_CINT}LinkDef.h OPTIONS -p)139 TARGET_SOURCES(mars PRIVATE G__${_CINT}.cxx ${_SRCLIST})140 ROOT_GENERATE_DICTIONARY(dictionary/${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${_CINT}LinkDef.h OPTIONS -p) 141 TARGET_SOURCES(mars PRIVATE dictionary/${_CINT}.cxx ${_SRCLIST}) 140 142 141 143 ENDMACRO() … … 192 194 INCLUDE_DIRECTORIES(${ROOT_INCLUDE_DIRS} ${DIRECTORIES} mcore .) 193 195 194 ROOT_GENERATE_DICTIONARY( G__MARS196 ROOT_GENERATE_DICTIONARY(dictionary/MARS 195 197 factofits.h 196 198 factfits.h … … 204 206 OPTIONS -p -D__MARS__ -DHAVE_ZLIB) 205 207 206 ADD_LIBRARY(mars SHARED G__MARS.cxx)208 ADD_LIBRARY(mars SHARED dictionary/MARS.cxx) 207 209 TARGET_LINK_LIBRARIES(mars ${ROOT_LIBRARIES}) 208 210 TARGET_LINK_LIBRARIES(mars ${NOVA_LIBRARY}) … … 215 217 216 218 ADD_CUSTOM_COMMAND(TARGET mars POST_BUILD 217 COMMAND ln -sf ${ CMAKE_CURRENT_BINARY_DIR}/libmars.so ${PROJECT_SOURCE_DIR}/218 COMMENT "Creating symlink for libmars.so to ${ CMAKE_CURRENT_BINARY_DIR}")219 COMMAND ln -sf ${PROJECT_BINARY_DIR}/libmars.so ${PROJECT_SOURCE_DIR}/ 220 COMMENT "Creating symlink for libmars.so to ${PROJECT_BINARY_DIR}") 219 221 220 222 #---Create a shared library with geneated dictionary -
trunk/Mars/manalysis/MSoftwareTriggerCalc.cc
r18482 r18957 93 93 Int_t MSoftwareTriggerCalc::Process() 94 94 { 95 const UShort_t *id x= fRawEvt->GetPixelIds();95 const UShort_t *ids = fRawEvt->GetPixelIds(); 96 96 97 97 const int beg = 10; … … 118 118 continue; 119 119 120 const Float_t *raw = fSignal->GetSamples(id x[hw]);120 const Float_t *raw = fSignal->GetSamples(ids[hw]); 121 121 122 122 Float_t *sum = buf.GetArray()+(hw/9)*num; -
trunk/Mars/mbase/MStatusDisplay.cc
r18139 r18957 2396 2396 2397 2397 // Add the canvas to the list 2398 const TString name = c->GetName();2399 const TString title = c->GetTitle();2400 if ( title.IsNull() || name==title)2398 const TString _name = c->GetName(); 2399 const TString _title = c->GetTitle(); 2400 if (_title.IsNull() || _name==_title) 2401 2401 c->SetTitle(gFile->GetName()); 2402 2402 list.Add(c); -
trunk/Mars/mfileio/MWriteFitsFile.cc
r18570 r18957 548 548 // create the DOL of the table. It will be something like: 549 549 // fileNameNoExt_dataName.fits[dataName] 550 TString dol = fileNameNoExt;551 dol += "_";552 dol += i_table->first;553 dol += ".fits";550 TString dol2 = fileNameNoExt; 551 dol2 += "_"; 552 dol2 += i_table->first; 553 dol2 += ".fits"; 554 554 555 555 if (fOpenOption == "RECREATE") 556 556 // remove the file 557 unlink(dol .Data());558 559 dol += "[";560 dol += i_table->first;561 dol += "]";557 unlink(dol2.Data()); 558 559 dol2 += "["; 560 dol2 += i_table->first; 561 dol2 += "]"; 562 562 // *fLog << err << "Reiner would have opened fits file: " << dol.Data() << endl; 563 563 //exit(0); -
trunk/Mars/mhflux/MHAlpha.cc
r18888 r18957 583 583 if (hoff) 584 584 { 585 TH1D *dum = fOffData->ProjectionZ("dumxy", 0, fOffData->GetNbinsX()+1, 0, fOffData->GetNbinsY()+1);586 dum ->SetDirectory(0);585 TH1D *dum2 = fOffData->ProjectionZ("dumxy", 0, fOffData->GetNbinsX()+1, 0, fOffData->GetNbinsY()+1); 586 dum2->SetDirectory(0); 587 587 hoff->Reset(); 588 hoff->Add(dum );589 delete dum ;588 hoff->Add(dum2); 589 delete dum2; 590 590 591 591 const Double_t alpha = fFit.Scale(*hoff, *hon); -
trunk/Mars/mjobs/MJMerpp.cc
r11453 r18957 389 389 SetPathOut(name2); 390 390 391 const Int_t rc = Process();392 if (rc ==0)391 const Int_t rc2 = Process(); 392 if (rc2==0) 393 393 continue; 394 394 395 return rc ;395 return rc2; 396 396 } 397 397 return 0; -
trunk/Mars/mjobs/MJSimulation.cc
r18576 r18957 1108 1108 gPad->SetGridy(); 1109 1109 gROOT->SetSelectedPad(0); 1110 MHCamera * c= new MHCamera(static_cast<MGeomCam&>(*env1.GetCont()));1111 c->SetStats(kFALSE);1112 c->SetBit(MHCamera::kNoLegend);1113 c->SetBit(kCanDelete);1114 c->Draw();1110 MHCamera *hcam = new MHCamera(static_cast<MGeomCam&>(*env1.GetCont())); 1111 hcam->SetStats(kFALSE); 1112 hcam->SetBit(MHCamera::kNoLegend); 1113 hcam->SetBit(kCanDelete); 1114 hcam->Draw(); 1115 1115 } 1116 1116 … … 1123 1123 gPad->SetGridy(); 1124 1124 gROOT->SetSelectedPad(0); 1125 MHCamera * c= new MHCamera(*cam);1126 c->SetStats(kFALSE);1127 c->SetBit(MHCamera::kNoLegend);1128 c->SetBit(kCanDelete);1129 c->Draw();1125 MHCamera *hcam = new MHCamera(*cam); 1126 hcam->SetStats(kFALSE); 1127 hcam->SetBit(MHCamera::kNoLegend); 1128 hcam->SetBit(kCanDelete); 1129 hcam->Draw(); 1130 1130 } 1131 1131 } … … 1173 1173 gPad->SetGridy(); 1174 1174 gROOT->SetSelectedPad(0); 1175 MParSpline * all = (MParSpline*)splinepde.DrawClone();1175 MParSpline *sall = (MParSpline*)splinepde.DrawClone(); 1176 1176 //all->SetTitle("Combined acceptance"); 1177 all->SetBit(kCanDelete);1177 sall->SetBit(kCanDelete); 1178 1178 if (splinemirror.GetSpline()) 1179 all->Multiply(*splinemirror.GetSpline());1179 sall->Multiply(*splinemirror.GetSpline()); 1180 1180 if (splinecones2.GetSpline()) 1181 all->Multiply(*splinecones2.GetSpline());1181 sall->Multiply(*splinecones2.GetSpline()); 1182 1182 } 1183 1183 -
trunk/Mars/mjobs/MSequence.cc
r17834 r18957 321 321 while (!files.IsNull()) 322 322 { 323 const TString num = files(regexp);324 if ( num.IsNull())323 const TString fnum = files(regexp); 324 if (fnum.IsNull()) 325 325 { 326 326 *fLog << warn << "WARNING - File in run " << run << " is NaN (not a number): '" << files << "'" << endl; … … 328 328 } 329 329 330 const Ssiz_t p1 =num.First(':');331 if ( p1>=0)330 const Ssiz_t q1 = fnum.First(':'); 331 if (q1>=0) 332 332 { 333 const Int_t n1 = atoi(num.Data());334 const Int_t n2 = atoi(num.Data()+p1+1);335 336 if ( n2<n1)333 const Int_t m1 = atoi(fnum.Data()); 334 const Int_t m2 = atoi(fnum.Data()+q1+1); 335 336 if (m2<m1) 337 337 { 338 *fLog << warn << "WARNING - Invalid range in '" << num << "'... ignored." << endl;338 *fLog << warn << "WARNING - Invalid range in '" << fnum << "'... ignored." << endl; 339 339 return; 340 340 } 341 341 342 342 // FIXME: n2==0 || n2<n1 343 for (int i= n1; i<=n2; i++)343 for (int i=m1; i<=m2; i++) 344 344 AddEntry(run, i, data, sub); 345 345 } 346 346 else 347 347 { 348 const Int_t file = atoi( num.Data());348 const Int_t file = atoi(fnum.Data()); 349 349 AddEntry(run, file, data, sub); 350 350 } 351 351 352 files.Remove(0, files.First( num)+num.Length());352 files.Remove(0, files.First(fnum)+fnum.Length()); 353 353 } 354 354 } -
trunk/Mars/mjtrain/MJTrainCuts.cc
r9892 r18957 941 941 return kFALSE; 942 942 943 MHn *hist = hs->GetHistN(fRules);944 MFillH *fill = new MFillH(hist, "", Form("Fill%s", hist->GetName()));945 946 fill ->SetWeight("MWeight");947 fill ->SetDrawOption("colz");948 fill ->SetNameTab(hist->GetName());949 fill ->SetBit(MFillH::kDoNotDisplay);950 951 tlist.AddToList(fill );952 953 autodel.Add(fill );954 autodel.Add(hist );943 MHn *histn = hs->GetHistN(fRules); 944 MFillH *filln = new MFillH(histn, "", Form("Fill%s", histn->GetName())); 945 946 filln->SetWeight("MWeight"); 947 filln->SetDrawOption("colz"); 948 filln->SetNameTab(histn->GetName()); 949 filln->SetBit(MFillH::kDoNotDisplay); 950 951 tlist.AddToList(filln); 952 953 autodel.Add(filln); 954 autodel.Add(histn); 955 955 } 956 956 tlist.AddToList(&fillh0); // Fill MHHadronness (not displayed in first loop) … … 982 982 while ((o=NextF())) 983 983 { 984 MFillH *fill = dynamic_cast<MFillH*>(o);985 if (fill )986 fill ->ResetBit(MFillH::kDoNotDisplay);984 MFillH *fillh = dynamic_cast<MFillH*>(o); 985 if (fillh) 986 fillh->ResetBit(MFillH::kDoNotDisplay); 987 987 } 988 988 -
trunk/Mars/msimcamera/MSimCamera.cc
r18333 r18957 155 155 } 156 156 // Check all entries for inf and nan. Those are not accepted here. 157 for( int row_index=0; row_index<fFixTimeOffsetsBetweenPixelsInNs->fM.size(); row_index++){158 std::vector<double> row = fFixTimeOffsetsBetweenPixelsInNs->fM.at(row_index);159 for( int col_index=0; col_index<row.size(); col_index++){160 double specific_delay = row.at(col_index);161 if( std::isnan(specific_delay) || std::isinf(specific_delay) ){157 for(size_t row_index=0; row_index<fFixTimeOffsetsBetweenPixelsInNs->fM.size(); row_index++){ 158 const vector<double> row = fFixTimeOffsetsBetweenPixelsInNs->fM.at(row_index); 159 for(size_t col_index=0; col_index<row.size(); col_index++){ 160 const double specific_delay = row.at(col_index); 161 if( isnan(specific_delay) || isinf(specific_delay) ){ 162 162 *fLog << err << "In Source: "<< __FILE__ <<" in line: "; 163 163 *fLog << __LINE__; -
trunk/Mars/msimreflector/MSimReflector.cc
r18449 r18957 472 472 UInt_t cnt[6] = { 0, 0, 0, 0, 0, 0 }; 473 473 474 const Int_t n um= arr.GetEntriesFast();475 for (Int_t idx=0; idx<n um; idx++)474 const Int_t nentries = arr.GetEntriesFast(); 475 for (Int_t idx=0; idx<nentries; idx++) 476 476 { 477 477 MPhotonData *dat = static_cast<MPhotonData*>(arr.UncheckedAt(idx)); -
trunk/Mars/mtools/MRolke.cc
r8105 r18957 171 171 Double_t med = 0; 172 172 Double_t maxiter=1000, acc = 0.00001; 173 Int_t i;174 173 Int_t bp = 0; 175 174 … … 314 313 } 315 314 316 for( i = 0; i < maxiter; i++) {315 for(Int_t i = 0; i < maxiter; i++) { 317 316 l = (target-fhigh)/(flow-fhigh); 318 317 if (l < 0.2) l = 0.2; … … 388 387 mu = (x-y/tau)/zm; 389 388 b = y/tau; 390 Double_t e = zm;391 f = LikeMod1(mu,b,e ,x,y,z,tau,m);389 Double_t ee = zm; 390 f = LikeMod1(mu,b,ee,x,y,z,tau,m); 392 391 } 393 392 -
trunk/Mars/mtools/MagicReversi.cc
r9369 r18957 245 245 // Adopt absolute sized of markers to relative range 246 246 // 247 Float_tr = (*fGeomCam)[i].GetT()*gPad->XtoAbsPixel(1)/325;248 GetFlag(i)->SetMarkerSize(20.0*r /fRange);247 const Float_t rr = (*fGeomCam)[i].GetT()*gPad->XtoAbsPixel(1)/325; 248 GetFlag(i)->SetMarkerSize(20.0*rr/fRange); 249 249 250 250 if (pix.TestBit(kHasFlag)) -
trunk/Mars/mtools/MineSweeper.cc
r9369 r18957 223 223 // Adopt absolute sized of markers to relative range 224 224 // 225 Float_tr = (*fGeomCam)[i].GetT()*gPad->XtoAbsPixel(1)/325;226 GetFlag(i)->SetMarkerSize(20.0*r /fRange);225 const Float_t rr = (*fGeomCam)[i].GetT()*gPad->XtoAbsPixel(1)/325; 226 GetFlag(i)->SetMarkerSize(20.0*rr/fRange); 227 227 228 228 if (pix.TestBit(kHasFlag))
Note:
See TracChangeset
for help on using the changeset viewer.