- Timestamp:
- 02/29/12 10:30:19 (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
r12917 r12967 71 71 { 72 72 GLfloat color[3]; 73 int first , second;73 int first; 74 74 first = vertex-1; 75 75 if (first < 0) … … 683 683 684 684 template <typename T> 685 void RawDataViewer::getCalibrationDataForDisplay(const CalibDataTypes calibTypes,685 void RawDataViewer::getCalibrationDataForDisplay(const CalibDataTypes/* calibTypes*/, 686 686 const vector<T>& inputData, 687 687 const int roi, … … 750 750 //hide the time markers 751 751 int nSlicesToRemove = 60; 752 float* backupData ;752 float* backupData = 0; 753 753 if (nRoiTM == 0) //they are written into the regular channel 754 754 { -
trunk/FACT++/src/fitsdump.cc
r12943 r12967 355 355 #endif 356 356 357 ostringstream out;358 out.precision(fout.precision());357 ostringstream sout; 358 sout.precision(fout.precision()); 359 359 for (auto it=cols.begin(); it!=cols.end(); it++) 360 360 { … … 368 368 break; 369 369 case 'B': 370 out << (unsigned int)reinterpret_cast<const unsigned char*>(it->ptr)[i] << " ";370 sout << (unsigned int)reinterpret_cast<const unsigned char*>(it->ptr)[i] << " "; 371 371 break; 372 372 case 'L': 373 out << reinterpret_cast<const bool*>(it->ptr)[i] << " ";373 sout << reinterpret_cast<const bool*>(it->ptr)[i] << " "; 374 374 break; 375 375 case 'I': 376 out << reinterpret_cast<const int16_t*>(it->ptr)[i] << " ";376 sout << reinterpret_cast<const int16_t*>(it->ptr)[i] << " "; 377 377 break; 378 378 case 'J': 379 out << reinterpret_cast<const int32_t*>(it->ptr)[i] << " ";379 sout << reinterpret_cast<const int32_t*>(it->ptr)[i] << " "; 380 380 break; 381 381 case 'K': 382 out << reinterpret_cast<const int64_t*>(it->ptr)[i] << " ";382 sout << reinterpret_cast<const int64_t*>(it->ptr)[i] << " "; 383 383 break; 384 384 case 'E': 385 out << reinterpret_cast<const float*>(it->ptr)[i] << " ";385 sout << reinterpret_cast<const float*>(it->ptr)[i] << " "; 386 386 break; 387 387 case 'D': 388 out << reinterpret_cast<const double*>(it->ptr)[i] << " ";388 sout << reinterpret_cast<const double*>(it->ptr)[i] << " "; 389 389 break; 390 390 default: … … 399 399 400 400 if (it->col.type=='A') 401 out << "'" << msg << "' ";401 sout << "'" << msg << "' "; 402 402 } 403 403 #ifdef HAVE_ROOT … … 405 405 continue; 406 406 #endif 407 fout << out.str() << endl;407 fout << sout.str() << endl; 408 408 } 409 409 } … … 424 424 *it = ' '+*it; 425 425 426 string::const_iterator beg = it->begin();427 string::const_iterator end = it->end();426 string::const_iterator ibeg = it->begin(); 427 string::const_iterator iend = it->end(); 428 428 429 429 boost::smatch what; 430 while (boost::regex_search( beg,end, what, expr, boost::match_extra))430 while (boost::regex_search(ibeg, iend, what, expr, boost::match_extra)) 431 431 { 432 432 const string all = what[0]; … … 438 438 if (ic==cols.end()) 439 439 { 440 beg++;440 ibeg++; 441 441 //cout << "Column '" << name << "' does not exist." << endl; 442 442 //return vector<MyColumn>(); … … 458 458 id << '[' << p << ']'; 459 459 460 it->replace( beg-it->begin()+what.position(1), what.length()-1, id.str());461 462 beg = what[0].first+3;463 end = it->end();460 it->replace(ibeg-it->begin()+what.position(1), what.length()-1, id.str()); 461 462 ibeg = what[0].first+3; 463 iend = it->end(); 464 464 465 465 if (p<vec.size()) … … 575 575 break; 576 576 577 //data[p++] = first-1;578 579 ostringstream out;580 out.precision(fout.precision());581 582 577 size_t p = 0; 583 578 for (auto it=vec.begin(); it!=vec.end(); it++, p++) … … 590 585 591 586 for (auto iform=form.begin()+1; iform!=form.end(); iform++) 592 out << iform->EvalPar(0, data.data()) << " ";593 594 fout << out.str() <<endl;587 fout << iform->EvalPar(0, data.data()) << " "; 588 589 fout << endl; 595 590 } 596 591 #endif -
trunk/Mars/mcore/DrsCalib.h
r12946 r12967 573 573 for (auto it=beg; it!=end-512; it++, n++) 574 574 { 575 const double v = it->first;576 const double w = it->second;575 const double valv = it->first; 576 const double valw = it->second; 577 577 578 578 it->first = sumv>0 ? n*(1-s*sumw/sumv) :0; 579 579 580 sum w += w;581 sum v += v;580 sumv += valv; 581 sumw += valw; 582 582 } 583 583 … … 588 588 for (auto it=end-1; it!=beg-1+512; it--, n++) 589 589 { 590 const double v = it->first;591 const double w = it->second;592 593 sum w += w;594 sum v += v;590 const double valv = it->first; 591 const double valw = it->second; 592 593 sumv += valv; 594 sumw += valw; 595 595 596 596 it->first = sumv>0 ? n*(s*sumw/sumv-1) : 0;
Note:
See TracChangeset
for help on using the changeset viewer.