Index: trunk/MagicSoft/Mars/mgui/MCamNeighbor.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MCamNeighbor.cc	(revision 603)
+++ trunk/MagicSoft/Mars/mgui/MCamNeighbor.cc	(revision 653)
@@ -1,7 +1,7 @@
 #include "MCamNeighbor.h"
 
-#include <stdlib.h> 
-
-ClassImp(MCamNeighbor) 
+#include "MLog.h"
+
+ClassImp(MCamNeighbor)
 
 MCamNeighbor::MCamNeighbor()
@@ -341,107 +341,107 @@
   { 269,    270,    328,    330,    394,    395} ,
   { 217,    270,    271,    329,    395,    396} ,
-  { 271,    332,    396,    397,    432,  -9999} ,
-  { 271,    272,    331,    333,    397,  -9999} ,
-  { 272,    273,    332,    334,    398,  -9999} ,
-  { 273,    274,    333,    335,    398,  -9999} ,
-  { 274,    275,    334,    336,    399,  -9999} ,
-  { 275,    276,    335,    337,    399,  -9999} ,
-  { 276,    277,    336,    338,    400,  -9999} ,
-  { 277,    278,    337,    339,    400,  -9999} ,
-  { 278,    279,    338,    340,    401,  -9999} ,
-  { 279,    280,    339,    341,    401,  -9999} ,
-  { 280,    281,    340,    342,    402,  -9999} ,
-  { 281,    341,    343,    402,    403,  -9999} ,
-  { 281,    282,    342,    344,    403,  -9999} ,
-  { 282,    283,    343,    345,    404,  -9999} ,
-  { 283,    284,    344,    346,    404,  -9999} ,
-  { 284,    285,    345,    347,    405,  -9999} ,
-  { 285,    286,    346,    348,    405,  -9999} ,
-  { 286,    287,    347,    349,    406,  -9999} ,
-  { 287,    288,    348,    350,    406,  -9999} ,
-  { 288,    289,    349,    351,    407,  -9999} ,
-  { 289,    290,    350,    352,    407,  -9999} ,
-  { 290,    291,    351,    353,    408,  -9999} ,
-  { 291,    352,    354,    408,    409,  -9999} ,
-  { 291,    292,    353,    355,    409,  -9999} ,
-  { 292,    293,    354,    356,    410,  -9999} ,
-  { 293,    294,    355,    357,    410,  -9999} ,
-  { 294,    295,    356,    358,    411,  -9999} ,
-  { 295,    296,    357,    359,    411,  -9999} ,
-  { 296,    297,    358,    360,    412,  -9999} ,
-  { 297,    298,    359,    361,    412,  -9999} ,
-  { 298,    299,    360,    362,    413,  -9999} ,
-  { 299,    300,    361,    363,    413,  -9999} ,
-  { 300,    301,    362,    364,    414,  -9999} ,
-  { 301,    363,    365,    414,    415,  -9999} ,
-  { 301,    302,    364,    366,    415,  -9999} ,
-  { 302,    303,    365,    367,    416,  -9999} ,
-  { 303,    304,    366,    368,    416,  -9999} ,
-  { 304,    305,    367,    369,    417,  -9999} ,
-  { 305,    306,    368,    370,    417,  -9999} ,
-  { 306,    307,    369,    371,    418,  -9999} ,
-  { 307,    308,    370,    372,    418,  -9999} ,
-  { 308,    309,    371,    373,    419,  -9999} ,
-  { 309,    310,    372,    374,    419,  -9999} ,
-  { 310,    311,    373,    375,    420,  -9999} ,
-  { 311,    374,    376,    420,    421,  -9999} ,
-  { 311,    312,    375,    377,    421,  -9999} ,
-  { 312,    313,    376,    378,    422,  -9999} ,
-  { 313,    314,    377,    379,    422,  -9999} ,
-  { 314,    315,    378,    380,    423,  -9999} ,
-  { 315,    316,    379,    381,    423,  -9999} ,
-  { 316,    317,    380,    382,    424,  -9999} ,
-  { 317,    318,    381,    383,    424,  -9999} ,
-  { 318,    319,    382,    384,    425,  -9999} ,
-  { 319,    320,    383,    385,    425,  -9999} ,
-  { 320,    321,    384,    386,    426,  -9999} ,
-  { 321,    385,    387,    426,    427,  -9999} ,
-  { 321,    322,    386,    388,    427,  -9999} ,
-  { 322,    323,    387,    389,    428,  -9999} ,
-  { 323,    324,    388,    390,    428,  -9999} ,
-  { 324,    325,    389,    391,    429,  -9999} ,
-  { 325,    326,    390,    392,    429,  -9999} ,
-  { 326,    327,    391,    393,    430,  -9999} ,
-  { 327,    328,    392,    394,    430,  -9999} ,
-  { 328,    329,    393,    395,    431,  -9999} ,
-  { 329,    330,    394,    396,    431,  -9999} ,
-  { 271,    330,    331,    395,    432,  -9999} ,
+  { 271,    332,    396,    397,    432,  -1} ,
+  { 271,    272,    331,    333,    397,  -1} ,
+  { 272,    273,    332,    334,    398,  -1} ,
+  { 273,    274,    333,    335,    398,  -1} ,
+  { 274,    275,    334,    336,    399,  -1} ,
+  { 275,    276,    335,    337,    399,  -1} ,
+  { 276,    277,    336,    338,    400,  -1} ,
+  { 277,    278,    337,    339,    400,  -1} ,
+  { 278,    279,    338,    340,    401,  -1} ,
+  { 279,    280,    339,    341,    401,  -1} ,
+  { 280,    281,    340,    342,    402,  -1} ,
+  { 281,    341,    343,    402,    403,  -1} ,
+  { 281,    282,    342,    344,    403,  -1} ,
+  { 282,    283,    343,    345,    404,  -1} ,
+  { 283,    284,    344,    346,    404,  -1} ,
+  { 284,    285,    345,    347,    405,  -1} ,
+  { 285,    286,    346,    348,    405,  -1} ,
+  { 286,    287,    347,    349,    406,  -1} ,
+  { 287,    288,    348,    350,    406,  -1} ,
+  { 288,    289,    349,    351,    407,  -1} ,
+  { 289,    290,    350,    352,    407,  -1} ,
+  { 290,    291,    351,    353,    408,  -1} ,
+  { 291,    352,    354,    408,    409,  -1} ,
+  { 291,    292,    353,    355,    409,  -1} ,
+  { 292,    293,    354,    356,    410,  -1} ,
+  { 293,    294,    355,    357,    410,  -1} ,
+  { 294,    295,    356,    358,    411,  -1} ,
+  { 295,    296,    357,    359,    411,  -1} ,
+  { 296,    297,    358,    360,    412,  -1} ,
+  { 297,    298,    359,    361,    412,  -1} ,
+  { 298,    299,    360,    362,    413,  -1} ,
+  { 299,    300,    361,    363,    413,  -1} ,
+  { 300,    301,    362,    364,    414,  -1} ,
+  { 301,    363,    365,    414,    415,  -1} ,
+  { 301,    302,    364,    366,    415,  -1} ,
+  { 302,    303,    365,    367,    416,  -1} ,
+  { 303,    304,    366,    368,    416,  -1} ,
+  { 304,    305,    367,    369,    417,  -1} ,
+  { 305,    306,    368,    370,    417,  -1} ,
+  { 306,    307,    369,    371,    418,  -1} ,
+  { 307,    308,    370,    372,    418,  -1} ,
+  { 308,    309,    371,    373,    419,  -1} ,
+  { 309,    310,    372,    374,    419,  -1} ,
+  { 310,    311,    373,    375,    420,  -1} ,
+  { 311,    374,    376,    420,    421,  -1} ,
+  { 311,    312,    375,    377,    421,  -1} ,
+  { 312,    313,    376,    378,    422,  -1} ,
+  { 313,    314,    377,    379,    422,  -1} ,
+  { 314,    315,    378,    380,    423,  -1} ,
+  { 315,    316,    379,    381,    423,  -1} ,
+  { 316,    317,    380,    382,    424,  -1} ,
+  { 317,    318,    381,    383,    424,  -1} ,
+  { 318,    319,    382,    384,    425,  -1} ,
+  { 319,    320,    383,    385,    425,  -1} ,
+  { 320,    321,    384,    386,    426,  -1} ,
+  { 321,    385,    387,    426,    427,  -1} ,
+  { 321,    322,    386,    388,    427,  -1} ,
+  { 322,    323,    387,    389,    428,  -1} ,
+  { 323,    324,    388,    390,    428,  -1} ,
+  { 324,    325,    389,    391,    429,  -1} ,
+  { 325,    326,    390,    392,    429,  -1} ,
+  { 326,    327,    391,    393,    430,  -1} ,
+  { 327,    328,    392,    394,    430,  -1} ,
+  { 328,    329,    393,    395,    431,  -1} ,
+  { 329,    330,    394,    396,    431,  -1} ,
+  { 271,    330,    331,    395,    432,  -1} ,
   { 331,    332,    398,    432,    433,    434} ,
-  { 333,    334,    397,    399,    434,  -9999} ,
-  { 335,    336,    400,    435,    436,  -9999} ,
-  { 337,    338,    399,    401,    437,  -9999} ,
-  { 339,    340,    400,    402,    438,  -9999} ,
+  { 333,    334,    397,    399,    434,  -1} ,
+  { 335,    336,    400,    435,    436,  -1} ,
+  { 337,    338,    399,    401,    437,  -1} ,
+  { 339,    340,    400,    402,    438,  -1} ,
   { 341,    342,    401,    403,    438,    439} ,
   { 342,    343,    402,    404,    440,    441} ,
-  { 344,    345,    403,    441,    442,  -9999} ,
-  { 346,    347,    404,    442,    443,  -9999} ,
-  { 348,    349,    405,    443,    444,  -9999} ,
-  { 350,    351,    406,    444,    445,  -9999} ,
+  { 344,    345,    403,    441,    442,  -1} ,
+  { 346,    347,    404,    442,    443,  -1} ,
+  { 348,    349,    405,    443,    444,  -1} ,
+  { 350,    351,    406,    444,    445,  -1} ,
   { 352,    353,    407,    409,    445,    446} ,
   { 353,    354,    408,    410,    447,    448} ,
-  { 355,    356,    409,    411,    448,  -9999} ,
-  { 357,    358,    410,    412,    449,  -9999} ,
-  { 359,    360,    411,    450,    451,  -9999} ,
-  { 361,    362,    412,    414,    452,  -9999} ,
+  { 355,    356,    409,    411,    448,  -1} ,
+  { 357,    358,    410,    412,    449,  -1} ,
+  { 359,    360,    411,    450,    451,  -1} ,
+  { 361,    362,    412,    414,    452,  -1} ,
   { 363,    364,    413,    415,    452,    453} ,
   { 364,    365,    414,    416,    454,    455} ,
-  { 366,    367,    415,    417,    455,  -9999} ,
-  { 368,    369,    418,    456,    457,  -9999} ,
-  { 370,    371,    417,    419,    458,  -9999} ,
-  { 372,    373,    418,    420,    459,  -9999} ,
+  { 366,    367,    415,    417,    455,  -1} ,
+  { 368,    369,    418,    456,    457,  -1} ,
+  { 370,    371,    417,    419,    458,  -1} ,
+  { 372,    373,    418,    420,    459,  -1} ,
   { 374,    375,    419,    421,    459,    460} ,
   { 375,    376,    420,    422,    461,    462} ,
-  { 377,    378,    421,    462,    463,  -9999} ,
-  { 379,    380,    422,    463,    464,  -9999} ,
-  { 381,    382,    423,    464,    465,  -9999} ,
-  { 383,    384,    424,    465,    466,  -9999} ,
+  { 377,    378,    421,    462,    463,  -1} ,
+  { 379,    380,    422,    463,    464,  -1} ,
+  { 381,    382,    423,    464,    465,  -1} ,
+  { 383,    384,    424,    465,    466,  -1} ,
   { 385,    386,    425,    427,    466,    467} ,
   { 386,    387,    426,    428,    468,    469} ,
-  { 388,    389,    427,    429,    469,  -9999} ,
-  { 390,    391,    428,    430,    470,  -9999} ,
-  { 392,    393,    429,    471,    472,  -9999} ,
-  { 394,    395,    430,    432,    473,  -9999} ,
+  { 388,    389,    427,    429,    469,  -1} ,
+  { 390,    391,    428,    430,    470,  -1} ,
+  { 392,    393,    429,    471,    472,  -1} ,
+  { 394,    395,    430,    432,    473,  -1} ,
   { 331,    396,    397,    431,    473,    474} ,
-  { 397,    434,    474,    475,    476,  -9999} ,
+  { 397,    434,    474,    475,    476,  -1} ,
   { 397,    398,    433,    435,    476,    477} ,
   { 398,    399,    434,    436,    477,    478} ,
@@ -449,6 +449,6 @@
   { 400,    401,    436,    438,    479,    480} ,
   { 401,    402,    437,    439,    480,    481} ,
-  { 402,    438,    440,    481,    482,  -9999} ,
-  { 403,    439,    441,    483,    484,  -9999} ,
+  { 402,    438,    440,    481,    482,  -1} ,
+  { 403,    439,    441,    483,    484,  -1} ,
   { 403,    404,    440,    442,    484,    485} ,
   { 404,    405,    441,    443,    485,    486} ,
@@ -456,6 +456,6 @@
   { 406,    407,    443,    445,    487,    488} ,
   { 407,    408,    444,    446,    488,    489} ,
-  { 408,    445,    447,    489,    490,  -9999} ,
-  { 409,    446,    448,    491,    492,  -9999} ,
+  { 408,    445,    447,    489,    490,  -1} ,
+  { 409,    446,    448,    491,    492,  -1} ,
   { 409,    410,    447,    449,    492,    493} ,
   { 410,    411,    448,    450,    493,    494} ,
@@ -463,6 +463,6 @@
   { 412,    413,    450,    452,    495,    496} ,
   { 413,    414,    451,    453,    496,    497} ,
-  { 414,    452,    454,    497,    498,  -9999} ,
-  { 415,    453,    455,    499,    500,  -9999} ,
+  { 414,    452,    454,    497,    498,  -1} ,
+  { 415,    453,    455,    499,    500,  -1} ,
   { 415,    416,    454,    456,    500,    501} ,
   { 416,    417,    455,    457,    501,    502} ,
@@ -470,6 +470,6 @@
   { 418,    419,    457,    459,    503,    504} ,
   { 419,    420,    458,    460,    504,    505} ,
-  { 420,    459,    461,    505,    506,  -9999} ,
-  { 421,    460,    462,    507,    508,  -9999} ,
+  { 420,    459,    461,    505,    506,  -1} ,
+  { 421,    460,    462,    507,    508,  -1} ,
   { 421,    422,    461,    463,    508,    509} ,
   { 422,    423,    462,    464,    509,    510} ,
@@ -477,6 +477,6 @@
   { 424,    425,    464,    466,    511,    512} ,
   { 425,    426,    465,    467,    512,    513} ,
-  { 426,    466,    468,    513,    514,  -9999} ,
-  { 427,    467,    469,    515,    516,  -9999} ,
+  { 426,    466,    468,    513,    514,  -1} ,
+  { 427,    467,    469,    515,    516,  -1} ,
   { 427,    428,    468,    470,    516,    517} ,
   { 428,    429,    469,    471,    517,    518} ,
@@ -484,6 +484,6 @@
   { 430,    431,    471,    473,    519,    520} ,
   { 431,    432,    472,    474,    520,    521} ,
-  { 432,    433,    473,    521,    522,  -9999} ,
-  { 433,    476,    522,    523,    524,  -9999} ,
+  { 432,    433,    473,    521,    522,  -1} ,
+  { 433,    476,    522,    523,    524,  -1} ,
   { 433,    434,    475,    477,    524,    525} ,
   { 434,    435,    476,    478,    525,    526} ,
@@ -492,6 +492,6 @@
   { 437,    438,    479,    481,    528,    529} ,
   { 438,    439,    480,    482,    529,    530} ,
-  { 439,    481,    483,    530,    531,  -9999} ,
-  { 440,    482,    484,    532,    533,  -9999} ,
+  { 439,    481,    483,    530,    531,  -1} ,
+  { 440,    482,    484,    532,    533,  -1} ,
   { 440,    441,    483,    485,    533,    534} ,
   { 441,    442,    484,    486,    534,    535} ,
@@ -500,6 +500,6 @@
   { 444,    445,    487,    489,    537,    538} ,
   { 445,    446,    488,    490,    538,    539} ,
-  { 446,    489,    491,    539,    540,  -9999} ,
-  { 447,    490,    492,    541,    542,  -9999} ,
+  { 446,    489,    491,    539,    540,  -1} ,
+  { 447,    490,    492,    541,    542,  -1} ,
   { 447,    448,    491,    493,    542,    543} ,
   { 448,    449,    492,    494,    543,    544} ,
@@ -508,6 +508,6 @@
   { 451,    452,    495,    497,    546,    547} ,
   { 452,    453,    496,    498,    547,    548} ,
-  { 453,    497,    499,    548,    549,  -9999} ,
-  { 454,    498,    500,    550,    551,  -9999} ,
+  { 453,    497,    499,    548,    549,  -1} ,
+  { 454,    498,    500,    550,    551,  -1} ,
   { 454,    455,    499,    501,    551,    552} ,
   { 455,    456,    500,    502,    552,    553} ,
@@ -516,6 +516,6 @@
   { 458,    459,    503,    505,    555,    556} ,
   { 459,    460,    504,    506,    556,    557} ,
-  { 460,    505,    507,    557,    558,  -9999} ,
-  { 461,    506,    508,    559,    560,  -9999} ,
+  { 460,    505,    507,    557,    558,  -1} ,
+  { 461,    506,    508,    559,    560,  -1} ,
   { 461,    462,    507,    509,    560,    561} ,
   { 462,    463,    508,    510,    561,    562} ,
@@ -524,6 +524,6 @@
   { 465,    466,    511,    513,    564,    565} ,
   { 466,    467,    512,    514,    565,    566} ,
-  { 467,    513,    515,    566,    567,  -9999} ,
-  { 468,    514,    516,    568,    569,  -9999} ,
+  { 467,    513,    515,    566,    567,  -1} ,
+  { 468,    514,    516,    568,    569,  -1} ,
   { 468,    469,    515,    517,    569,    570} ,
   { 469,    470,    516,    518,    570,    571} ,
@@ -532,105 +532,108 @@
   { 472,    473,    519,    521,    573,    574} ,
   { 473,    474,    520,    522,    574,    575} ,
-  { 474,    475,    521,    575,    576,  -9999} ,
-  { 475,    524,    576,  -9999,  -9999,  -9999} ,
-  { 475,    476,    523,    525,  -9999,  -9999} ,
-  { 476,    477,    524,    526,  -9999,  -9999} ,
-  { 477,    478,    525,    527,  -9999,  -9999} ,
-  { 478,    479,    526,    528,  -9999,  -9999} ,
-  { 479,    480,    527,    529,  -9999,  -9999} ,
-  { 480,    481,    528,    530,  -9999,  -9999} ,
-  { 481,    482,    529,    531,  -9999,  -9999} ,
-  { 482,    530,    532,  -9999,  -9999,  -9999} ,
-  { 483,    531,    533,  -9999,  -9999,  -9999} ,
-  { 483,    484,    532,    534,  -9999,  -9999} ,
-  { 484,    485,    533,    535,  -9999,  -9999} ,
-  { 485,    486,    534,    536,  -9999,  -9999} ,
-  { 486,    487,    535,    537,  -9999,  -9999} ,
-  { 487,    488,    536,    538,  -9999,  -9999} ,
-  { 488,    489,    537,    539,  -9999,  -9999} ,
-  { 489,    490,    538,    540,  -9999,  -9999} ,
-  { 490,    539,    541,  -9999,  -9999,  -9999} ,
-  { 491,    540,    542,  -9999,  -9999,  -9999} ,
-  { 491,    492,    541,    543,  -9999,  -9999} ,
-  { 492,    493,    542,    544,  -9999,  -9999} ,
-  { 493,    494,    543,    545,  -9999,  -9999} ,
-  { 494,    495,    544,    546,  -9999,  -9999} ,
-  { 495,    496,    545,    547,  -9999,  -9999} ,
-  { 496,    497,    546,    548,  -9999,  -9999} ,
-  { 497,    498,    547,    549,  -9999,  -9999} ,
-  { 498,    548,    550,  -9999,  -9999,  -9999} ,
-  { 499,    549,    551,  -9999,  -9999,  -9999} ,
-  { 499,    500,    550,    552,  -9999,  -9999} ,
-  { 500,    501,    551,    553,  -9999,  -9999} ,
-  { 501,    502,    552,    554,  -9999,  -9999} ,
-  { 502,    503,    553,    555,  -9999,  -9999} ,
-  { 503,    504,    554,    556,  -9999,  -9999} ,
-  { 504,    505,    555,    557,  -9999,  -9999} ,
-  { 505,    506,    556,    558,  -9999,  -9999} ,
-  { 506,    557,    559,  -9999,  -9999,  -9999} ,
-  { 507,    558,    560,  -9999,  -9999,  -9999} ,
-  { 507,    508,    559,    561,  -9999,  -9999} ,
-  { 508,    509,    560,    562,  -9999,  -9999} ,
-  { 509,    510,    561,    563,  -9999,  -9999} ,
-  { 510,    511,    562,    564,  -9999,  -9999} ,
-  { 511,    512,    563,    565,  -9999,  -9999} ,
-  { 512,    513,    564,    566,  -9999,  -9999} ,
-  { 513,    514,    565,    567,  -9999,  -9999} ,
-  { 514,    566,    568,  -9999,  -9999,  -9999} ,
-  { 515,    567,    569,  -9999,  -9999,  -9999} ,
-  { 515,    516,    568,    570,  -9999,  -9999} ,
-  { 516,    517,    569,    571,  -9999,  -9999} ,
-  { 517,    518,    570,    572,  -9999,  -9999} ,
-  { 518,    519,    571,    573,  -9999,  -9999} ,
-  { 519,    520,    572,    574,  -9999,  -9999} ,
-  { 520,    521,    573,    575,  -9999,  -9999} ,
-  { 521,    522,    574,    576,  -9999,  -9999} ,
-  { 522,    523,    575,  -9999,  -9999,  -9999}  } ; 
-
+  { 474,    475,    521,    575,    576,  -1} ,
+  { 475,    524,    576,  -1,  -1,  -1} ,
+  { 475,    476,    523,    525,  -1,  -1} ,
+  { 476,    477,    524,    526,  -1,  -1} ,
+  { 477,    478,    525,    527,  -1,  -1} ,
+  { 478,    479,    526,    528,  -1,  -1} ,
+  { 479,    480,    527,    529,  -1,  -1} ,
+  { 480,    481,    528,    530,  -1,  -1} ,
+  { 481,    482,    529,    531,  -1,  -1} ,
+  { 482,    530,    532,  -1,  -1,  -1} ,
+  { 483,    531,    533,  -1,  -1,  -1} ,
+  { 483,    484,    532,    534,  -1,  -1} ,
+  { 484,    485,    533,    535,  -1,  -1} ,
+  { 485,    486,    534,    536,  -1,  -1} ,
+  { 486,    487,    535,    537,  -1,  -1} ,
+  { 487,    488,    536,    538,  -1,  -1} ,
+  { 488,    489,    537,    539,  -1,  -1} ,
+  { 489,    490,    538,    540,  -1,  -1} ,
+  { 490,    539,    541,  -1,  -1,  -1} ,
+  { 491,    540,    542,  -1,  -1,  -1} ,
+  { 491,    492,    541,    543,  -1,  -1} ,
+  { 492,    493,    542,    544,  -1,  -1} ,
+  { 493,    494,    543,    545,  -1,  -1} ,
+  { 494,    495,    544,    546,  -1,  -1} ,
+  { 495,    496,    545,    547,  -1,  -1} ,
+  { 496,    497,    546,    548,  -1,  -1} ,
+  { 497,    498,    547,    549,  -1,  -1} ,
+  { 498,    548,    550,  -1,  -1,  -1} ,
+  { 499,    549,    551,  -1,  -1,  -1} ,
+  { 499,    500,    550,    552,  -1,  -1} ,
+  { 500,    501,    551,    553,  -1,  -1} ,
+  { 501,    502,    552,    554,  -1,  -1} ,
+  { 502,    503,    553,    555,  -1,  -1} ,
+  { 503,    504,    554,    556,  -1,  -1} ,
+  { 504,    505,    555,    557,  -1,  -1} ,
+  { 505,    506,    556,    558,  -1,  -1} ,
+  { 506,    557,    559,  -1,  -1,  -1} ,
+  { 507,    558,    560,  -1,  -1,  -1} ,
+  { 507,    508,    559,    561,  -1,  -1} ,
+  { 508,    509,    560,    562,  -1,  -1} ,
+  { 509,    510,    561,    563,  -1,  -1} ,
+  { 510,    511,    562,    564,  -1,  -1} ,
+  { 511,    512,    563,    565,  -1,  -1} ,
+  { 512,    513,    564,    566,  -1,  -1} ,
+  { 513,    514,    565,    567,  -1,  -1} ,
+  { 514,    566,    568,  -1,  -1,  -1} ,
+  { 515,    567,    569,  -1,  -1,  -1} ,
+  { 515,    516,    568,    570,  -1,  -1} ,
+  { 516,    517,    569,    571,  -1,  -1} ,
+  { 517,    518,    570,    572,  -1,  -1} ,
+  { 518,    519,    571,    573,  -1,  -1} ,
+  { 519,    520,    572,    574,  -1,  -1} ,
+  { 520,    521,    573,    575,  -1,  -1} ,
+  { 521,    522,    574,    576,  -1,  -1} ,
+  { 522,    523,    575,  -1,  -1,  -1}  } ; 
 
   for (Int_t ip=0; ip<577; ip++)
-    for (Int_t in=0; in<6; in++)
-      fNN[ip][in] = help[ip][in] ;  
-
-
+      for (Int_t in=0; in<6; in++)
+          fNN[ip][in] = help[ip][in];
 } 
 
-Int_t MCamNeighbor::GetNN(Int_t pix, Int_t inn ) 
+Int_t MCamNeighbor::GetNN(Int_t pix, Int_t inn)
 { 
-  // return the number of one neighbor
-
-  if ( pix >= 577 ) { 
-    cout << "ERROR GetNN -> pixel out of range" << endl  ;
-    exit (123) ; 
-  } 
-  
-  if ( inn >= 6 ) { 
-    cout << "ERROR GetNN -> not more than 6 neighbors" << endl  ;
-    exit (123) ; 
-  } 
-  
-  return fNN[pix][inn] ; 
+    // return the number of one neighbor
+
+    if ( pix >= 577 )
+    {
+        gLog << "WARNING: GetNN -> pixel out of range" << endl;
+        return -1;
+    }
+
+    if ( inn >= 6 )
+    {
+        gLog << "WARNING: GetNN -> not more than 6 neighbors" << endl;
+        return -1;
+    }
+
+    return fNN[pix][inn] ;
 } 
 
 void MCamNeighbor::CheckPixel(Int_t  pix) 
 { 
-  cout << " Pixel " << pix << " has neighbors " ; 
-  for (Int_t i=0; i<6; i++ ) 
-    cout << fNN[pix][i] << "/" ; 
-  cout << endl ; 
-    
+  gLog << " Pixel " << pix << " has neighbors " ;
+
+  gLog << fNN[pix][0];
+
+  for (Int_t i=1; i<6; i++ )
+      if (fNN[pix][i] >= 0)
+          gLog << ", " << fNN[pix][i];
+
+  gLog << endl ;
+
 } 
 
-void MCamNeighbor::Print() 
+void MCamNeighbor::Print(Option_t *)
 { 
-  for (Int_t i=0; i<577; i++ ) { 
-    
-    cout << " Pixel " << i  ; 
-
-    for (Int_t j=0; j<6; j++ ) { 
-      cout << " ->" << fNN[i][j] ; 
-    } 
-    cout << endl ; 
-
-  } 
+    for (Int_t i=0; i<577; i++ )
+    {
+        gLog << " Pixel " << i << ":";
+
+        for (Int_t j=0; j<6; j++ )
+            gLog << " " << fNN[i][j];
+
+        gLog << endl;
+    }
 } 
