Commit c496e8e7763801c121464efdeb3af57321c25367
1 parent
fb15d981
adjust to new event interface
Showing
1 changed file
with
4 additions
and
3 deletions
src/ctbin/ctbin.cpp
| ... | ... | @@ -80,8 +80,9 @@ int ctbin::run(void) |
| 80 | 80 | for (GCTAEventList::iterator event = events->begin(); event != events->end(); ++event) { |
| 81 | 81 | |
| 82 | 82 | // Determine sky pixel |
| 83 | - GSkyDir dir = ((GCTAInstDir*)event->dir())->skydir(); | |
| 84 | - GSkyPixel pixel = map.dir2xy(dir); | |
| 83 | + GCTAInstDir* inst = (GCTAInstDir*)&(event->dir()); | |
| 84 | + GSkyDir dir = inst->skydir(); | |
| 85 | + GSkyPixel pixel = map.dir2xy(dir); | |
| 85 | 86 | |
| 86 | 87 | // Skip if pixel is out of range |
| 87 | 88 | if (pixel.x() < -0.5 || pixel.x() > (nx-0.5) || |
| ... | ... | @@ -89,7 +90,7 @@ int ctbin::run(void) |
| 89 | 90 | continue; |
| 90 | 91 | |
| 91 | 92 | // Determine energy bin. Skip if we are outside the energy range |
| 92 | - int index = obs.ebounds()->index(*(event->energy())); | |
| 93 | + int index = obs.ebounds()->index(event->energy()); | |
| 93 | 94 | if (index == -1) |
| 94 | 95 | continue; |
| 95 | 96 | ... | ... |