Commit 1f50c6317a4b35f9f60b4dbaa8b92a6eb2150755

Authored by knodlseder
1 parent 2238bbb4

add file counter increment

Showing 1 changed file with 7 additions and 4 deletions
src/ctbin/ctbin.cpp
@@ -324,6 +324,9 @@ void ctbin::save(void) @@ -324,6 +324,9 @@ void ctbin::save(void)
324 // Save file 324 // Save file
325 obs->save(filename, clobber()); 325 obs->save(filename, clobber());
326 326
  327 + // Increment file number
  328 + file_num++;
  329 +
327 } // endif: observation was a CTA observation 330 } // endif: observation was a CTA observation
328 331
329 } // endfor: looped over files 332 } // endfor: looped over files
@@ -410,7 +413,7 @@ void ctbin::bin_events(GCTAObservation* obs) @@ -410,7 +413,7 @@ void ctbin::bin_events(GCTAObservation* obs)
410 413
411 // Get Good Time intervals 414 // Get Good Time intervals
412 GGti gti = obs->events()->gti(); 415 GGti gti = obs->events()->gti();
413 - 416 +
414 // Create skymap 417 // Create skymap
415 GSkymap map = GSkymap(m_proj, m_coordsys, 418 GSkymap map = GSkymap(m_proj, m_coordsys,
416 m_xref, m_yref, m_binsz, m_binsz, 419 m_xref, m_yref, m_binsz, m_binsz,
@@ -420,7 +423,7 @@ void ctbin::bin_events(GCTAObservation* obs) @@ -420,7 +423,7 @@ void ctbin::bin_events(GCTAObservation* obs)
420 int num_outside_map = 0; 423 int num_outside_map = 0;
421 int num_outside_ebds = 0; 424 int num_outside_ebds = 0;
422 int num_in_map = 0; 425 int num_in_map = 0;
423 - 426 +
424 // Fill sky map 427 // Fill sky map
425 GCTAEventList* events = (GCTAEventList*)obs->events(); 428 GCTAEventList* events = (GCTAEventList*)obs->events();
426 for (GCTAEventList::iterator event = events->begin(); event != events->end(); ++event) { 429 for (GCTAEventList::iterator event = events->begin(); event != events->end(); ++event) {
@@ -447,7 +450,7 @@ void ctbin::bin_events(GCTAObservation* obs) @@ -447,7 +450,7 @@ void ctbin::bin_events(GCTAObservation* obs)
447 // Fill event in skymap 450 // Fill event in skymap
448 map(pixel, index) += 1.0; 451 map(pixel, index) += 1.0;
449 num_in_map++; 452 num_in_map++;
450 - 453 +
451 } // endfor: looped over all events 454 } // endfor: looped over all events
452 455
453 // Log binning results 456 // Log binning results
@@ -542,7 +545,7 @@ void ctbin::copy_members(const ctbin& app) @@ -542,7 +545,7 @@ void ctbin::copy_members(const ctbin& app)
542 545
543 // Return 546 // Return
544 return; 547 return;
545 -} 548 +}
546 549
547 550
548 /***********************************************************************//** 551 /***********************************************************************//**