source: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc@ 5745

Last change on this file since 5745 was 5728, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 22.5 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Oscar Blanch 12/2001 <mailto:blanch@ifae.es>
19! Author(s): Thomas Bretz 08/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
20!
21! Copyright: MAGIC Software Development, 2000-2004
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MBadPixelsTreat
29//
30// You can use MBadPixelsTreat::SetUseInterpolation to replaced the
31// bad pixels by the average of its neighbors instead of unmapping
32// them. If you want to include the central pixel use
33// MBadPixelsTreat::SetUseCentralPixel. The bad pixels are taken from
34// an existing MBadPixelsCam.
35//
36// It check if there are enough neighbors to calculate the mean
37// If not, unmap the pixel. The minimum number of good neighbors
38// should be set using SetNumMinNeighbors
39//
40// If you want to interpolate unreliable pixels and unsuitable
41// (broken) pixels use SetHardTreatment().
42//
43//
44// Options:
45// --------
46// SetHardTreatment: Also interpolate unreliable pixels not only unsuitable
47// SetUseInterpolation: Interpolate pixels instead of unmapping them
48// SetUseCentralPixel: also use the pixel itself for interpolation
49// SetProcessPedestalRun: process the pedestals once per run/file
50// SetProcessPedestalEvt: process the pedestal once per event
51// SetProcessTimes: also do some rough interpolation of the arrival time
52//
53//
54// Input Containers:
55// MCerPhotEvt
56// MPedPhotCam
57// MBadPixelsCam
58// [MGeomCam]
59//
60// Output Containers:
61// MCerPhotEvt
62//
63/////////////////////////////////////////////////////////////////////////////
64#include "MBadPixelsTreat.h"
65
66#include <fstream>
67
68#include <TEnv.h>
69#include <TObjString.h>
70
71#include "MArrayD.h" // Used instead of TArrayD because operator[] has no range check
72
73#include "MLog.h"
74#include "MLogManip.h"
75
76#include "MParList.h"
77
78#include "MGeomPix.h"
79#include "MGeomCam.h"
80
81#include "MCerPhotPix.h"
82#include "MCerPhotEvt.h"
83
84#include "MPedPhotPix.h"
85#include "MPedPhotCam.h"
86
87#include "MBadPixelsPix.h"
88#include "MBadPixelsCam.h"
89
90#include "MArrivalTime.h"
91
92ClassImp(MBadPixelsTreat);
93
94using namespace std;
95
96static const TString gsDefName = "MBadPixelsTreat";
97static const TString gsDefTitle = "Task to treat bad pixels (interpolation, unmapping)";
98
99// --------------------------------------------------------------------------
100//
101// Default constructor.
102//
103MBadPixelsTreat::MBadPixelsTreat(const char *name, const char *title)
104 : fFlags(0), fNumMinNeighbors(3)
105{
106 fName = name ? name : gsDefName.Data();
107 fTitle = title ? title : gsDefTitle.Data();
108
109 SetUseInterpolation();
110 SetProcessPedestal();
111 SetProcessTimes();
112}
113
114// --------------------------------------------------------------------------
115//
116// Returns the status of a pixel. If kHardTreatment is set a pixel must
117// be unsuitable or uriliable to be treated. If not it is treated only if
118// it is unsuitable
119// (IsBad() checks for any flag)
120//
121Bool_t MBadPixelsTreat::IsPixelBad(Int_t idx) const
122{
123 return TESTBIT(fFlags, kHardTreatment) ? (*fBadPixels)[idx].IsBad():(*fBadPixels)[idx].IsUnsuitable() ;
124}
125
126void MBadPixelsTreat::AddNamePedPhotCam(const char *name)
127{
128 fNamePedPhotCams.Add(new TObjString(name));
129}
130
131// --------------------------------------------------------------------------
132//
133// - Try to find or create MBlindPixels in parameter list.
134// - get the MCerPhotEvt from the parlist (abort if missing)
135// - if no pixels are given by the user try to determin the starfield
136// from the monte carlo run header.
137//
138Int_t MBadPixelsTreat::PreProcess (MParList *pList)
139{
140 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
141 if (!fBadPixels)
142 {
143 *fLog << err << AddSerialNumber("MBadPixelsCam") << " not found... aborting." << endl;
144 return kFALSE;
145 }
146
147 fEvt = (MCerPhotEvt*)pList->FindObject(AddSerialNumber("MCerPhotEvt"));
148 if (!fEvt)
149 {
150 *fLog << err << AddSerialNumber("MCerPhotEvt") << " not found... aborting." << endl;
151 return kFALSE;
152 }
153
154 fGeomCam = 0;
155 if (!IsUseInterpolation())
156 return kTRUE;
157
158 fGeomCam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam"));
159 if (!fGeomCam)
160 {
161 *fLog << err << AddSerialNumber("MGeomCam") << " not found - can't use interpolation... abort." << endl;
162 *fLog << " Use MBadPixelsTreat::SetUseInterpolation(kFALSE) to switch interpolation" << endl;
163 *fLog << " off and use unmapping instead." << endl;
164 return kFALSE;
165 }
166
167 const Bool_t proc = IsProcessPedestalEvt() || IsProcessPedestalRun();
168
169 if (fNamePedPhotCams.GetSize()>0 && !proc)
170 {
171 *fLog << err << "Pedestal list contains entries, but pedestal treatment is switched off... abort." << endl;
172 return kFALSE;
173 }
174
175 if (proc)
176 {
177 if (fNamePedPhotCams.GetSize()==0)
178 {
179 *fLog << inf << "No container names specified... using default: MPedPhotCam." << endl;
180 AddNamePedPhotCam();
181 }
182
183 fPedPhotCams.Clear();
184
185 TIter Next(&fNamePedPhotCams);
186 TObject *o=0;
187 while ((o=Next()))
188 {
189 TObject *p = pList->FindObject(AddSerialNumber(o->GetName()), "MPedPhotCam");
190 if (!p)
191 {
192 *fLog << err << AddSerialNumber(o->GetName()) << " [MPedPhotCam] not found... aborting." << endl;
193 //*fLog << " Use MBadPixelsTreat::SetProcessPedestalRun(kFALSE) and" << endl;
194 //*fLog << " MBadPixelsTreat::SetProcessPedestalEvt(kFALSE) to switch" << endl;
195 //*fLog << " Pedestal treatment off." << endl;
196 return kFALSE;
197 }
198
199 fPedPhotCams.Add(p);
200 }
201 }
202
203 fTimes = 0;
204 if (IsProcessTimes())
205 {
206 fTimes = (MArrivalTime*)pList->FindObject(AddSerialNumber("MArrivalTime"));
207 if (!fTimes)
208 {
209 *fLog << err << AddSerialNumber("MArrivalTime") << " not found... aborting." << endl;
210 *fLog << " Use MBadPixelsTreat::SetProcessTimes(kFALSE) to switch time interpolation off." << endl;
211 return kFALSE;
212 }
213 }
214
215 if (IsProcessPedestalEvt())
216 *fLog << inf << "Processing Pedestals once per event..." << endl;
217 if (IsProcessPedestalRun())
218 *fLog << inf << "Processing Pedestals once per run..." << endl;
219 if (IsProcessTimes())
220 *fLog << inf << "Processing Arrival Times once per event..." << endl;
221
222 return kTRUE;
223}
224
225// --------------------------------------------------------------------------
226//
227// Replaces each pixel (signal, signal error, pedestal, pedestal rms)
228// by the average of its surrounding pixels.
229// If TESTBIT(fFlags, kUseCentralPixel) is set the central pixel is also
230// included.
231//
232void MBadPixelsTreat::InterpolateSignal() const
233{
234 const UShort_t entries = fGeomCam->GetNumPixels();
235
236 //
237 // Create arrays (FIXME: Check if its possible to create it only once)
238 //
239 MArrayD nphot(entries);
240 MArrayD perr(entries);
241
242 //
243 // Loop over all pixels
244 //
245 for (UShort_t i=0; i<entries; i++)
246 {
247 MCerPhotPix *pix = fEvt->GetPixById(i);
248
249 //
250 // Check whether pixel with idx i is blind
251 //
252 if (pix && !IsPixelBad(i))
253 continue;
254
255 //
256 // Get a pointer to this pixel. If it is not yet existing
257 // create a new entry for this pixel in MCerPhotEvt
258 //
259 if (!pix)
260 {
261 pix = fEvt->AddPixel(i, 0, 0);
262 (*fBadPixels)[i].SetUnsuitable(MBadPixelsPix::kUnsuitableEvt);
263 }
264
265 //
266 // Get the corresponding geometry and pedestal
267 //
268 const MGeomPix &gpix = (*fGeomCam)[i];
269
270 // Do Not-Use-Central-Pixel
271 const Bool_t nucp = !TESTBIT(fFlags, kUseCentralPixel);
272
273 Int_t num = nucp ? 0 : 1;
274
275 nphot[i] = nucp ? 0 : pix->GetNumPhotons();
276 perr[i] = nucp ? 0 : Pow2(pix->GetErrorPhot());
277
278 //
279 // The values are rescaled to the small pixels area for the right comparison
280 //
281 const Double_t ratio = fGeomCam->GetPixRatio(i);
282
283 nphot[i] *= ratio;
284 perr[i] *= ratio;
285
286 //
287 // Loop over all its neighbors
288 //
289 const Int_t n = gpix.GetNumNeighbors();
290 for (int j=0; j<n; j++)
291 {
292 const UShort_t nidx = gpix.GetNeighbor(j);
293
294 //
295 // Do not use blind neighbors
296 //
297 if (IsPixelBad(nidx))
298 continue;
299
300 //
301 // Check whether the neighbor has a signal stored
302 //
303 const MCerPhotPix *evtpix = fEvt->GetPixById(nidx);
304 if (!evtpix)
305 continue;
306
307 //
308 // Get the geometry for the neighbor
309 //
310 const Double_t nratio = fGeomCam->GetPixRatio(nidx);
311
312 //
313 //The error is calculated as the quadratic sum of the errors
314 //
315 nphot[i] += nratio*evtpix->GetNumPhotons();
316 perr[i] += nratio* Pow2(evtpix->GetErrorPhot());
317
318 num++;
319 }
320
321 // Check if there are enough neighbors to calculate the mean
322 // If not, unmap the pixel. The maximum number of blind neighbors
323 // should be 2
324 if (num<fNumMinNeighbors)
325 {
326 pix->SetPixelUnmapped();
327 continue;
328 }
329
330 //
331 // Now the mean is calculated and the values rescaled back
332 // to the pixel area
333 //
334 nphot[i] /= (num*ratio);
335 perr[i] = TMath::Sqrt(perr[i]/(num*ratio));
336
337 pix->Set(nphot[i], perr[i]);
338 }
339}
340
341// --------------------------------------------------------------------------
342//
343void MBadPixelsTreat::InterpolatePedestals(MPedPhotCam &pedphot) const
344{
345 const Int_t entries = pedphot.GetSize();
346
347 // Create arrays (FIXME: Check if its possible to create it only once)
348 MArrayD ped(entries);
349 MArrayD rms(entries);
350
351 //
352 // Loop over all pixels
353 //
354 for (UShort_t i=0; i<entries; i++)
355 {
356 //
357 // Check whether pixel with idx i is blind
358 //
359 if (!IsPixelBad(i))
360 continue;
361
362 //
363 // Get the corresponding geometry and pedestal
364 //
365 const MGeomPix &gpix = (*fGeomCam)[i];
366 const MPedPhotPix &ppix = pedphot[i];
367
368 // Do Not-Use-Central-Pixel
369 const Bool_t nucp = !TESTBIT(fFlags, kUseCentralPixel);
370
371 Int_t num = nucp ? 0 : 1;
372
373 ped[i] = nucp ? 0 : ppix.GetMean();
374 rms[i] = nucp ? 0 : Pow2(ppix.GetRms());
375
376 //
377 // The values are rescaled to the small pixels area for the right comparison
378 //
379 const Double_t ratio = fGeomCam->GetPixRatio(i);
380
381 ped[i] *= ratio;
382 rms[i] *= ratio;
383
384 //
385 // Loop over all its neighbors
386 //
387 const Int_t n = gpix.GetNumNeighbors();
388 for (int j=0; j<n; j++)
389 {
390 const UShort_t nidx = gpix.GetNeighbor(j);
391
392 //
393 // Do not use blind neighbors
394 //
395 if (IsPixelBad(nidx))
396 continue;
397
398 //
399 // Get the geometry for the neighbor
400 //
401 const Double_t nratio = fGeomCam->GetPixRatio(nidx);
402 const MPedPhotPix &nppix = pedphot[nidx];
403
404 //
405 //The error is calculated as the quadratic sum of the errors
406 //
407 ped[i] += nratio*nppix.GetMean();
408 rms[i] += nratio*Pow2(nppix.GetRms());
409
410 num++;
411 }
412
413 // Check if there are enough neighbors to calculate the mean
414 // If not, unmap the pixel. The minimum number of good neighbors
415 // should be fNumMinNeighbors
416 if (num < fNumMinNeighbors)
417 {
418 MCerPhotPix *pix =fEvt->GetPixById(i);
419 if (!pix)
420 pix = fEvt->AddPixel(i, 0, 0);
421 pix->SetPixelUnmapped();
422 continue;
423 }
424
425 //
426 // Now the mean is calculated and the values rescaled back
427 // to the pixel area
428 //
429 ped[i] /= (num*ratio);
430 rms[i] = TMath::Sqrt(rms[i]/(num*ratio));
431
432 pedphot[i].Set(ped[i], rms[i]);
433 }
434 pedphot.SetReadyToSave();
435}
436
437// --------------------------------------------------------------------------
438//
439// loop over all MPedPhotCam and interpolate them
440//
441void MBadPixelsTreat::InterpolatePedestals() const
442{
443 TIter Next(&fPedPhotCams);
444 MPedPhotCam *cam=0;
445 while ((cam=(MPedPhotCam*)Next()))
446 {
447 InterpolatePedestals(*cam);
448 cam->ReCalc(*fGeomCam, fBadPixels);
449 }
450}
451
452// --------------------------------------------------------------------------
453//
454void MBadPixelsTreat::InterpolateTimes() const
455{
456 Int_t n = fTimes->GetSize();
457
458 for (int i=0; i<n; i++)
459 {
460 //
461 // Check whether pixel with idx i is blind
462 //
463 if (!IsPixelBad(i))
464 continue;
465
466 //
467 // Get the corresponding geometry and pedestal
468 //
469 const MGeomPix &gpix = (*fGeomCam)[i];
470
471 const Int_t n0 = gpix.GetNumNeighbors();
472
473 MArrayD time(n0);
474 for (int j=0; j<n0; j++)
475 time[j] = (*fTimes)[gpix.GetNeighbor(j)];
476
477 Int_t p0=0;
478 Int_t p1=0;
479
480 Double_t min=FLT_MAX;
481 for (int j=0; j<n0; j++)
482 for (int k=0; k<j; k++)
483 {
484 const Double_t diff = TMath::Abs(time[j] - time[k]);
485
486 if (diff>=min && diff<250)
487 continue;
488
489 p0 = j;
490 p1 = k;
491 min = diff;
492 }
493
494 if (TMath::Abs(time[p0] - time[p1])<250)
495 fTimes->SetTime(i, (time[p0]+time[p1])/2);
496 }
497}
498
499// --------------------------------------------------------------------------
500//
501// Replaces each pixel (signal, signal error, pedestal, pedestal rms)
502// by the average of its surrounding pixels.
503// If TESTBIT(fFlags, kUseCentralPixel) is set the central pixel is also
504// included.
505//
506// NT: Informations about the interpolated pedestals are added.
507// When the option Interpolated is called, the blind pixel with the new
508// values of signal and fluttuation is included in the calculation of
509// the Image Parameters.
510//
511/*
512void MBadPixelsTreat::Interpolate() const
513{
514 const UShort_t entries = fGeomCam->GetNumPixels();
515
516 //
517 // Create arrays
518 //
519 TArrayD nphot(entries);
520 TArrayD perr(entries);
521 TArrayD ped(entries);
522 TArrayD pedrms(entries);
523
524 //
525 // Loop over all pixels
526 //
527 for (UShort_t i=0; i<entries; i++)
528 {
529 MCerPhotPix *pix = fEvt->GetPixById(i);
530
531 //
532 // Check whether pixel with idx i is blind
533 //
534 if (pix && (*fBadPixels)[i].IsOK())
535 continue;
536
537 //
538 // Get a pointer to this pixel. If it is not yet existing
539 // create a new entry for this pixel in MCerPhotEvt
540 //
541 if (!pix)
542 {
543 pix = fEvt->AddPixel(i, 0, 0);
544 (*fBadPixels)[i].SetUnsuitable(MBadPixelsPix::kUnsuitableEvt);
545 }
546
547 //
548 // Get the corresponding geometry and pedestal
549 //
550 const MGeomPix &gpix = (*fGeomCam)[i];
551 const MPedPhotPix &ppix = (*fPedPhot)[i];
552
553 // Do Not-Use-Central-Pixel
554 const Bool_t nucp = !TESTBIT(fFlags, kUseCentralPixel);
555
556 Int_t num = nucp ? 0 : 1;
557
558 nphot[i] = nucp ? 0 : pix->GetNumPhotons();
559 ped[i] = nucp ? 0 : ppix.GetMean();
560 perr[i] = nucp ? 0 : Pow2(pix->GetErrorPhot());
561 pedrms[i] = nucp ? 0 : Pow2(ppix.GetRms());
562
563 //
564 // The values are rescaled to the small pixels area for the right comparison
565 //
566 const Double_t ratio = fGeomCam->GetPixRatio(i);
567
568 if (nucp)
569 {
570 nphot[i] *= ratio;
571 perr[i] *= ratio;
572 ped[i] *= ratio;
573 pedrms[i] *= ratio;
574 }
575
576 //
577 // Loop over all its neighbors
578 //
579 const Int_t n = gpix.GetNumNeighbors();
580 for (int j=0; j<n; j++)
581 {
582 const UShort_t nidx = gpix.GetNeighbor(j);
583
584 //
585 // Do not use blind neighbors
586 //
587 if ((*fBadPixels)[nidx].IsBad())
588 continue;
589
590 //
591 // Check whether the neighbor has a signal stored
592 //
593 const MCerPhotPix *evtpix = fEvt->GetPixById(nidx);
594 if (!evtpix)
595 continue;
596
597 //
598 // Get the geometry for the neighbor
599 //
600 const Double_t nratio = fGeomCam->GetPixRatio(nidx);
601 MPedPhotPix &nppix = (*fPedPhot)[nidx];
602
603 //
604 // The error is calculated as the quadratic sum of the errors
605 //
606 nphot[i] += nratio*evtpix->GetNumPhotons();
607 ped[i] += nratio*nppix.GetMean();
608 perr[i] += nratio*Pow2(evtpix->GetErrorPhot());
609 pedrms[i] += nratio*Pow2(nppix.GetRms());
610
611 num++;
612 }
613
614 if (num<fNumMinNeighbors)
615 {
616 pix->SetPixelUnmapped();
617 nphot[i] = 0;
618 ped[i] = 0;
619 perr[i] = 0;
620 pedrms[i] = 0;
621 continue;
622 }
623
624 //
625 // Now the mean is calculated and the values rescaled back to the pixel area
626 //
627 nphot[i] /= num*ratio;
628 ped[i] /= num*ratio;
629 perr[i] = TMath::Sqrt(perr[i]/(num*ratio));
630 pedrms[i] = TMath::Sqrt(pedrms[i]/(num*ratio));
631
632 }
633
634 //
635 // Now the new pixel values are calculated and can be replaced in
636 // the corresponding containers
637 //
638 for (UShort_t i=0; i<entries; i++)
639 {
640 //
641 // Do not use blind neighbors
642 //
643 if ((*fBadPixels)[i].IsOK())
644 continue;
645
646 //
647 // It must exist, we have created it in the loop before.
648 //
649 fEvt->GetPixById(i)->Set(nphot[i], perr[i]);
650 (*fPedPhot)[i].Set(ped[i], pedrms[i]);
651 }
652}
653*/
654
655// --------------------------------------------------------------------------
656//
657// Removes all blind pixels from the analysis by setting their state
658// to unused.
659//
660void MBadPixelsTreat::Unmap() const
661{
662 const UShort_t entries = fEvt->GetNumPixels();
663
664 //
665 // remove the pixels in fPixelsIdx if they are set to be used,
666 // (set them to 'unused' state)
667 //
668 for (UShort_t i=0; i<entries; i++)
669 {
670 MCerPhotPix &pix = (*fEvt)[i];
671
672 if (IsPixelBad(pix.GetPixId()))
673 pix.SetPixelUnmapped();
674 }
675}
676
677// --------------------------------------------------------------------------
678//
679// Interpolate Pedestals if kProcessPedestal not set
680//
681Bool_t MBadPixelsTreat::ReInit(MParList *pList)
682{
683 if (IsUseInterpolation() && IsProcessPedestalRun())
684 InterpolatePedestals();
685 return kTRUE;
686}
687
688// --------------------------------------------------------------------------
689//
690// Treat the blind pixels
691//
692Int_t MBadPixelsTreat::Process()
693{
694 if (IsUseInterpolation())
695 {
696 InterpolateSignal();
697 if (IsProcessPedestalEvt())
698 InterpolatePedestals();
699 if (IsProcessTimes())
700 InterpolateTimes();
701 }
702 else
703 Unmap();
704
705 return kTRUE;
706}
707
708void MBadPixelsTreat::StreamPrimitive(ofstream &out) const
709{
710 out << " MBadPixelsTreat " << GetUniqueName();
711 if (fName!=gsDefName || fTitle!=gsDefTitle)
712 {
713 out << "(\"" << fName << "\"";
714 if (fTitle!=gsDefTitle)
715 out << ", \"" << fTitle << "\"";
716 out <<")";
717 }
718 out << ";" << endl;
719
720 if (IsUseInterpolation())
721 out << " " << GetUniqueName() << ".SetUseInterpolation();" << endl;
722 if (IsUseCentralPixel())
723 out << " " << GetUniqueName() << ".SetUseCentralPixel();" << endl;
724 if (IsProcessPedestalRun())
725 out << " " << GetUniqueName() << ".SetProcessPedestalRun();" << endl;
726 if (IsProcessPedestalEvt())
727 out << " " << GetUniqueName() << ".SetProcessPedestalEvt();" << endl;
728 if (IsProcessTimes())
729 out << " " << GetUniqueName() << ".SetProcessTimes();" << endl;
730 if (IsHardTreatment())
731 out << " " << GetUniqueName() << ".SetHardTreatment();" << endl;
732 if (fNumMinNeighbors!=3)
733 out << " " << GetUniqueName() << ".SetNumMinNeighbors(" << (int)fNumMinNeighbors << ");" << endl;
734}
735
736// --------------------------------------------------------------------------
737//
738// Read the setup from a TEnv, eg:
739// MBadPixelsTreat.UseInterpolation: no
740// MBadPixelsTreat.UseCentralPixel: no
741// MBadPixelsTreat.HardTreatment: no
742// MBadPixelsTreat.ProcessPedestalRun: no
743// MBadPixelsTreat.ProcessPedestalEvt: no
744// MBadPixelsTreat.NumMinNeighbors: 3
745//
746Int_t MBadPixelsTreat::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
747{
748 Bool_t rc = kFALSE;
749 if (IsEnvDefined(env, prefix, "UseInterpolation", print))
750 {
751 rc = kTRUE;
752 SetUseInterpolation(GetEnvValue(env, prefix, "UseInterpolation", IsUseInterpolation()));
753 }
754 if (IsEnvDefined(env, prefix, "UseCentralPixel", print))
755 {
756 rc = kTRUE;
757 SetUseCentralPixel(GetEnvValue(env, prefix, "UseCentralPixel", IsUseCentralPixel()));
758 }
759 if (IsEnvDefined(env, prefix, "HardTreatment", print))
760 {
761 rc = kTRUE;
762 SetHardTreatment(GetEnvValue(env, prefix, "HardTreatment", IsHardTreatment()));
763 }
764 if (IsEnvDefined(env, prefix, "ProcessPedestalRun", print))
765 {
766 rc = kTRUE;
767 SetProcessPedestalRun(GetEnvValue(env, prefix, "ProcessPedestalRun", IsProcessPedestalRun()));
768 }
769 if (IsEnvDefined(env, prefix, "ProcessPedestalEvt", print))
770 {
771 rc = kTRUE;
772 SetProcessPedestalEvt(GetEnvValue(env, prefix, "ProcessPedestalEvt", IsProcessPedestalEvt()));
773 }
774 if (IsEnvDefined(env, prefix, "ProcessTimes", print))
775 {
776 rc = kTRUE;
777 SetProcessTimes(GetEnvValue(env, prefix, "ProcessTimes", IsProcessTimes()));
778 }
779 if (IsEnvDefined(env, prefix, "NumMinNeighbors", print))
780 {
781 rc = kTRUE;
782 SetNumMinNeighbors(GetEnvValue(env, prefix, "NumMinNeighbors", fNumMinNeighbors));
783 }
784 return rc;
785}
Note: See TracBrowser for help on using the repository browser.