source: trunk/MagicSoft/Mars/callisto.cc@ 8983

Last change on this file since 8983 was 8904, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 23.4 KB
Line 
1#include <TROOT.h>
2#include <TClass.h>
3#include <TSystem.h>
4#include <TGClient.h>
5#include <TApplication.h>
6#include <TObjectTable.h>
7
8#include "MLog.h"
9#include "MLogManip.h"
10
11#include "MEnv.h"
12#include "MArgs.h"
13#include "MArray.h"
14#include "MDirIter.h"
15
16#include "MStatusDisplay.h"
17
18#include "MSequence.h"
19#include "MJPedestal.h"
20#include "MJCalibration.h"
21#include "MJCalibrateSignal.h"
22#include "MJCalibTest.h"
23
24using namespace std;
25
26static void StartUpMessage()
27{
28 gLog << all << endl;
29
30 // 1 2 3 4 5
31 // 12345678901234567890123456789012345678901234567890
32 gLog << "========================================================" << endl;
33 gLog << " Callisto - MARS V" << MARSVER << endl;
34 gLog << " MARS -- CALibrate LIght Signals and Time Offsets" << endl;
35 gLog << " Compiled with ROOT v" << ROOT_RELEASE << " on <" << __DATE__ << ">" << endl;
36 gLog << "========================================================" << endl;
37 gLog << endl;
38}
39
40static void Usage()
41{
42 // 1 2 3 4 5 6 7 8
43 // 12345678901234567890123456789012345678901234567890123456789012345678901234567890
44 gLog << all << endl;
45 gLog << "Sorry the usage is:" << endl;
46 gLog << " callisto [-c] [-y] [options] sequence.txt|number" << endl << endl;
47 gLog << " Arguments:" << endl;
48 gLog << " sequence.txt: ASCII file defining a sequence of runs" << endl;
49 gLog << " number: The sequence number (using file in the datacenter)" << endl;
50 gLog << " For more details see MSequence" << endl;
51 gLog << " Root Options:" << endl;
52 gLog << " -b Batch mode (no graphical output to screen)" << endl<<endl;
53 gLog << " Operation Modes:" << endl;
54 gLog << " -c Calculate the calibration constants" << endl;
55 gLog << " -y Extract and calibrate signal" << endl << endl;
56 gLog << " Data Type (exclusive):" << endl;
57 gLog << " -mc Input root-files are monte carlo files" << endl;
58 gLog << " Options:" << endl;
59 gLog.Usage();
60 gLog << " --debug-env=0 Disable debugging setting resources <default>" << endl;
61 gLog << " --debug-env[=1] Display untouched resources after program execution" << endl;
62 gLog << " --debug-env=2 Display untouched resources after eventloop setup" << endl;
63 gLog << " --debug-env=3 Debug setting resources from resource file and command line" << endl;
64 gLog << " --debug-mem Debug memory usage" << endl << endl;
65 gLog << " --rc=Name:option Set or overwrite a resource of the resource file." << endl;
66 gLog << " (Note, that this option can be used multiple times." << endl;
67 gLog << endl;
68 gLog << " -q Quit when job is finished" << endl;
69 gLog << " -f Force overwrite of existing files" << endl;
70 gLog << " --ind=path Path where to search for the data files" << endl;
71 gLog << " [default=standard path in datacenter]" << endl;
72 gLog << " --iny=path Path where to search for the calibration files" << endl;
73 gLog << " [default=local path or output path of Mode-C]" << endl;
74 gLog << " --outc=path Path to write Mode-C result to [def=local path]" << endl;
75 gLog << " --outy=path Path to write Mode-Y result to [def=local path]" << endl;
76 gLog << " --out=path Path to write the all results to [def=local path]" << endl;
77 gLog << " (overwrites --outc and --outy)" << endl;
78 gLog << " --path=path Path to write the all results to [def=local path]" << endl;
79 gLog << " (overwrites --iny, --outc and --outy)" << endl;
80 gLog << " --dev-null Suppress output of Y-files (for test purpose)" << endl;
81 gLog << " --print-seq Print Sequence information" << endl;
82 gLog << " --print-files Print Files taken from Sequence" << endl;
83 gLog << " --print-found Print Files found from Sequence" << endl;
84 gLog << " --use-test Apply calibration constants to same calibration" << endl;
85 gLog << " file (for testing, calibration mode only)" << endl;
86 gLog << " --movie Write a movie in addition to Mode-Y (this might " << endl;
87 gLog << " stop the eventloop before all evts are processed)" << endl;
88// gLog << " --moon Force using pedestal fits instead of calculated RMS" << endl;
89 gLog << " --config=callisto.rc Resource file [default=callisto.rc]" << endl;
90 gLog << endl;
91 gLog << " --version, -V Show startup message with version number" << endl;
92 gLog << " -?, -h, --help This help" << endl << endl;
93 gLog << " Setup of the two jobs run by callisto (MJPedestal and MJCalibration)" << endl;
94 gLog << " can be done with the resource file. See MJPedestal and MJCalibration" << endl;
95 gLog << " especially CheckEnv() for more details. Command line options might" << endl;
96 gLog << " be overwritten by the resource file." << endl << endl;
97 gLog << " If running in Mode-C and Mode-Y --iny= is obsolete, instead --outc=" << endl;
98 gLog << " is used." << endl << endl;
99 gLog << " Using --iny=, --outc=, --outy=, --out= or --path= automatically" << endl;
100 gLog << " enables the corresponding modes. In this case -c/-y are obsolete." << endl << endl;
101 gLog << "Description:" << endl;
102 gLog << " callisto will calculate pedestals from pedestal-files defined in a" << endl;
103 gLog << " sequence-file. This pedestals are used to calculate the calibration" << endl;
104 gLog << " constants. These constants are stored in a so called calibration-file" << endl;
105 gLog << " together with some datacheck plots which can be viewed using either" << endl;
106 gLog << " showplot or MStatusDisplay in the interpreter. A description of a" << endl;
107 gLog << " sequence-file can be found in the class reference of MSequence." << endl << endl;
108 gLog << "Background:" << endl;
109 gLog << " Callisto is a large, icy, dark-colored, low-density outer moon of" << endl;
110 gLog << " Jupiter that is scarred with impact craters and ejecta. It has a" << endl;
111 gLog << " diameter of about 4800km, the second-largest moon of Jupiter; it is" << endl;
112 gLog << " roughly the size of Mercury. Callisto has the largest-known impact" << endl;
113 gLog << " crater in the Solar System, Valhalla, which has a bright patch 600km" << endl;
114 gLog << " across and rings that go out to almost 3000km. Callisto orbits" << endl;
115 gLog << " Jupiter at a mean distance of 1,883,000km. Its mass is 1.1e23 kg. It" << endl;
116 gLog << " takes Callisto 16.7 days to orbit Jupiter in a synchronous orbit." << endl;
117 gLog << " Jupiter's moon Callisto was discovered independently by Galileo and" << endl;
118 gLog << " S.Marius in 1610." << endl << endl;
119 gLog << "Example:" << endl;
120 gLog << " callisto -f --outc=mycal/ --outy=mysignal/ --log sequence02345.txt" << endl;
121 gLog << endl;
122}
123
124static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t raw, Bool_t showall)
125{
126 const char *prep = showall ? "Found" : "Scheduled";
127
128 MDirIter Next1, Next2, Next3;
129 seq.SetupPedRuns(Next1, kInpathD, raw);
130 seq.SetupCalRuns(Next2, kInpathD, raw);
131 seq.SetupDatRuns(Next3, kInpathD, raw);
132
133 gLog << all;
134 gLog.Separator(Form("%s Pedestal Files", prep));
135 Next1.Print(showall?"all":"");
136 gLog << endl;
137 gLog.Separator(Form("%s Calibration Files", prep));
138 Next2.Print(showall?"all":"");
139 gLog << endl;
140 gLog.Separator(Form("%s Data Files", prep));
141 Next3.Print(showall?"all":"");
142 gLog << endl;
143}
144
145int main(int argc, char **argv)
146{
147 if (!MARS::CheckRootVer())
148 return 0xff;
149
150 MLog::RedirectErrorHandler(MLog::kColor);
151
152 //
153 // Evaluate arguments
154 //
155 MArgs arg(argc, argv, kTRUE);
156 gLog.Setup(arg);
157
158 StartUpMessage();
159
160 if (arg.HasOnly("-V") || arg.HasOnly("--version"))
161 return 0;
162
163 if (arg.HasOnly("-?") || arg.HasOnly("-h") || arg.HasOnly("--help"))
164 {
165 Usage();
166 return 2;
167 }
168
169 const TString kConfig = arg.GetStringAndRemove("--config=", "callisto.rc");
170
171 const Bool_t kPrintSeq = arg.HasOnlyAndRemove("--print-seq");
172 const Bool_t kPrintFiles = arg.HasOnlyAndRemove("--print-files");
173 const Bool_t kPrintFound = arg.HasOnlyAndRemove("--print-found");
174 const Bool_t kUseTest = arg.HasOnlyAndRemove("--use-test");
175 const Bool_t kMovie = arg.HasOnlyAndRemove("--movie");
176 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem");
177 const Bool_t kNullOut = arg.HasOnlyAndRemove("--dev-null");
178// Bool_t kMoon = arg.HasOnlyAndRemove("--moon");
179 Int_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0;
180 kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv);
181
182 const Bool_t kQuit = arg.HasOnlyAndRemove("-q");
183 const Bool_t kBatch = arg.HasOnlyAndRemove("-b");
184 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f");
185 //const Bool_t kForceExec = arg.HasOnlyAndRemove("-ff");
186
187 const TString kInpathD = arg.GetStringAndRemove("--ind=", "");
188 TString kInpathY = arg.GetStringAndRemove("--iny=", "");
189 TString kOutpathY = arg.GetStringAndRemove("--outy=", "");
190 TString kOutpathC = arg.GetStringAndRemove("--outc=", "");
191 const TString kOutpath = arg.GetStringAndRemove("--out=", "");
192 const TString kPath = arg.GetStringAndRemove("--path=", "");
193
194 Bool_t kModeC = arg.HasOnlyAndRemove("-c");
195 Bool_t kModeY = arg.HasOnlyAndRemove("-y");
196 const Bool_t kIsMC = arg.HasOnlyAndRemove("-mc");
197
198 if (!kInpathY.IsNull() || !kOutpathY.IsNull() || !kOutpath.IsNull() || !kPath.IsNull())
199 kModeY = kTRUE;
200 if (!kOutpathC.IsNull() || !kOutpath.IsNull() || !kPath.IsNull())
201 kModeC = kTRUE;
202
203 //
204 // check for the right usage of the program (number of arguments)
205 //
206 if (arg.GetNumArguments()!=1)
207 {
208 gLog << warn << "WARNING - Wrong number of arguments..." << endl;
209 Usage();
210 return 2;
211 }
212
213 //
214 // Now we access/read the resource file. This will remove all
215 // --rc= from the list of arguments.
216 //
217 MEnv env(kConfig);
218 if (!env.IsValid())
219 {
220 gLog << err << "ERROR - Reading resource file " << kConfig << "." << endl;
221 return 0xfe;
222 }
223
224 // And move the resource options from the command line to the MEnv
225 if (!env.TakeEnv(arg, kDebugEnv>2))
226 return 0xfd;
227
228 //
229 // check for the right usage of the program (number of options)
230 //
231 if (arg.GetNumOptions()>0)
232 {
233 gLog << warn << "WARNING - Unknown commandline options..." << endl;
234 arg.Print("options");
235 gLog << endl;
236 return 2;
237 }
238
239 if (!kModeC && !kModeY /*&& !kUseTest*/)
240 {
241 gLog << err << "Neither calibration (-c), signal extraction (-y) or test-mode (--use-test)" << endl;
242 gLog << "specified! You can also give the operation mode by the options defining the" << endl;
243 gLog << "output path --outc, --outy or --out." << endl;
244 Usage();
245 return 2;
246 }
247 if (!kModeY && kMovie)
248 {
249 gLog << err << "Signal extraction mode (-y) not switched on but movie requested." << endl;
250 Usage();
251 return 2;
252 }
253
254 if ((kModeC/* || kUseTest*/) && kOutpathC.IsNull())
255 kOutpathC = ".";
256 if (kModeY)
257 {
258 if (kInpathY.IsNull())
259 kInpathY = ".";
260 if (kOutpathY.IsNull())
261 kOutpathY = ".";
262 }
263 if (!kOutpath.IsNull())
264 {
265 kOutpathC = kOutpath;
266 kOutpathY = kOutpath;
267 }
268 if (!kPath.IsNull())
269 {
270 kOutpathC = kOutpath;
271 kOutpathY = kOutpath;
272 kInpathY = kOutpath;
273 }
274
275 if (kModeC && kModeY)
276 kInpathY = kOutpathC;
277
278 //
279 // Setup sequence file and check for its existance
280 //
281 TString kSequence = arg.GetArgumentStr(0);
282
283 if (!MSequence::InflatePath(kSequence, kIsMC))
284 return 3;
285
286 if (kDebugMem)
287 TObject::SetObjectStat(kTRUE);
288
289 //
290 // Setup sequence and check its validity
291 //
292 MSequence seq(kSequence, kInpathD);
293 if (!seq.IsMonteCarlo())
294 seq.SetMonteCarlo(kIsMC);
295 if (kPrintSeq)
296 {
297 gLog << all;
298 gLog.Separator(kSequence);
299 seq.Print();
300 gLog << endl;
301 }
302 if (!seq.IsValid())
303 {
304 gLog << err << "Sequence read but not valid!" << endl << endl;
305 return 5;
306 }
307
308 //
309 // Process print options
310 //
311 if (kPrintFiles)
312 PrintFiles(seq, kInpathD, !seq.IsMonteCarlo(), kFALSE);
313 if (kPrintFound)
314 PrintFiles(seq, kInpathD, !seq.IsMonteCarlo(), kTRUE);
315
316// if (seq.HasMoon())
317// kMoon = kTRUE;
318
319
320 /*
321 //
322 // Check for existance of all files
323 //
324 MDirIter iter;
325 const Int_t n0 = seq.SetupAllRuns(iter, kInpathD, "[DPC]");
326 const Int_t n1 = seq.GetNumAllRuns();
327 if (n0 != n1)
328 {
329 if (kForceExec)
330 gLog << warn << "WARNING";
331 else
332 gLog << err << "ERROR";
333 gLog << " - " << n1 << " files in sequence defined, but " << n0 << " found in ";
334 gLog << (kInpathD.IsNull() ? "<defaultpath>" : kInpathD.Data()) << endl;
335 if (!kForceExec)
336 return 2;
337 }
338
339 if (kPrintOnly)
340 return 0;
341 */
342 //
343 // Initialize root
344 //
345 MArray::Class()->IgnoreTObjectStreamer();
346 MParContainer::Class()->IgnoreTObjectStreamer();
347
348 TApplication app("callisto", &argc, argv);
349 if (!gROOT->IsBatch() && !gClient || gROOT->IsBatch() && !kBatch)
350 {
351 gLog << err << "Bombing... maybe your DISPLAY variable is not set correctly!" << endl;
352 return 1;
353 }
354
355 //
356 // Update frequency by default = 1Hz
357 //
358 MStatusDisplay *d = new MStatusDisplay;
359
360 // From now on each 'Exit' means: Terminate the application
361 d->SetBit(MStatusDisplay::kExitLoopOnExit);
362 d->SetTitle(kSequence);
363
364 if (kModeC/* || kUseTest*/)
365 {
366 //
367 // Calculate pedestal for pedestal-calculation and calibration
368 //
369 MJPedestal job1(Form("MJPedestalC1 #%d", seq.GetSequence()));
370 job1.SetNoStorage();
371 job1.SetSequence(seq);
372 job1.SetEnv(&env);
373 job1.SetEnvDebug(kDebugEnv);
374 job1.SetDisplay(d);
375 job1.SetOverwrite(kOverwrite);
376// job1.SetUseHists(kMoon);
377
378
379 job1.SetExtractionFundamental();
380 // job1.SetPathOut(kOutpathC); // not yet needed
381 // job1.SetPathIn(kInpathC); // DO NOT CALL IT. IT WOULD READ THE XEXTRACTOR FROM calib-file
382
383 if (!job1.Process())
384 {
385 gLog << err << "Calculation of pedestal failed." << endl << endl;
386 return 6;
387 }
388
389 if (!job1.GetDisplay())
390 {
391 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
392 return 1;
393 }
394
395 //
396 // Calculate pedestal and pedestal resolution
397 //
398 MJPedestal job2(Form("MJPedestalC2 #%d", seq.GetSequence()));
399 job2.SetNoStorage();
400 job2.SetSequence(seq);
401 job2.SetEnv(&env);
402 job2.SetEnvDebug(kDebugEnv);
403 job2.SetDisplay(d);;
404 job2.SetOverwrite(kOverwrite);
405// job2.SetUseHists(kMoon);
406 job2.SetDeadPixelCheck();
407 // job1.SetPathOut(kOutpathC); // not yet needed
408 // job1.SetPathIn(kInpathC); // DO NOT CALL IT. IT WOULD READ THE XEXTRACTOR FROM calib-file
409
410 //job2.SetExtractorResolution();
411 job2.SetExtractionWithExtractorRndm();
412 job2.SetExtractor(job1.GetExtractor());
413 job2.SetPedestals(job1.GetPedestalCam());
414 job2.SetBadPixels(job1.GetBadPixels());
415
416 // Please check the Changelog of 2005/04/20 about further deatils of the next comment
417 //if (job1.GetExtractor().InheritsFrom("MExtractTimeAndCharge"))
418 if (!job2.Process())
419 {
420 gLog << err << "Calculation of pedestal resolution failed." << endl << endl;
421 return 7;
422 }
423
424 if (!job2.GetDisplay())
425 {
426 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
427 return 1;
428 }
429
430 //
431 // Do calibration
432 //
433 MJCalibration job3(Form("MJCalibration #%d", seq.GetSequence()));
434 job3.SetSequence(seq);
435 job3.SetEnv(&env);
436 job3.SetEnvDebug(kDebugEnv);
437 job3.SetDisplay(d);
438 job3.SetOverwrite(kOverwrite);
439 job3.SetPathOut(kOutpathC);
440 // job2.SetPathIn(kInpathC); // not yet needed
441
442 job3.SetBadPixels(job2.GetBadPixels());
443 job3.SetExtractor(job2.GetExtractor());
444 job3.SetExtractorCam(job2.GetPedestalCam());
445
446 if (!job3.Process(job1.GetPedestalCam()))
447 {
448 gLog << err << "Calculation of calibration failed." << endl << endl;
449 return 8;
450 }
451
452 if (kDebugEnv>0)
453 env.PrintUntouched();
454
455 if (!job3.GetDisplay())
456 {
457 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
458 return 1;
459 }
460
461 if (kUseTest)
462 {
463 MJCalibTest job4(Form("MJCalibTest #%d", seq.GetSequence()));
464 job4.SetBadPixels(job2.GetBadPixels());
465 job4.SetSequence(seq);
466 job4.SetEnv(&env);
467 job4.SetEnvDebug(kDebugEnv);
468 job4.SetDisplay(d);;
469 job4.SetOverwrite(kOverwrite);
470 job4.SetPathOut(kOutpathC);
471
472 if (!job4.Process(job1.GetPedestalCam()))
473 {
474 gLog << err << "Calibration of calibration failed." << endl << endl;
475 return 9;
476 }
477
478 if (kDebugEnv>0)
479 env.PrintUntouched();
480
481 if (!job4.GetDisplay())
482 {
483 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
484 return 1;
485 }
486 }
487 }
488
489 if (kModeY)
490 {
491 d->Reset();
492
493 //
494 // Calculate starting pedestal for data extraction
495 //
496 MJPedestal job1(Form("MJPedestalY1 #%d", seq.GetSequence()));
497 job1.SetNoStorage();
498 job1.SetSequence(seq);
499 job1.SetEnv(&env);
500 job1.SetEnvDebug(kDebugEnv);
501 job1.SetDisplay(d);
502 job1.SetNoDisplay();
503 job1.SetOverwrite(kOverwrite);
504 job1.SetPathIn(kInpathY); // --> READ Extractor from calib-file
505 //job1.SetPathOut(kOutpathY); // not yet needed
506 job1.SetUseData();
507 job1.SetExtractionFundamental();
508// job1.SetUseHists(kMoon);
509
510 if (!job1.Process())
511 {
512 gLog << err << "Calculation of fundamental pedestal failed." << endl << endl;
513 return 10;
514 }
515
516 if (!job1.GetDisplay())
517 {
518 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
519 return 1;
520 }
521
522 //
523 // Calculate pedestal and pedestal resolution
524 //
525 MJPedestal job2(Form("MJPedestalY2 #%d", seq.GetSequence()));
526 job2.SetNoStorage(kMovie);
527 job2.SetSequence(seq);
528 job2.SetEnv(&env);
529 job2.SetEnvDebug(kDebugEnv);
530 job2.SetDisplay(d);
531 job2.SetNoDisplay();
532 job2.SetOverwrite(kOverwrite);
533 job2.SetPathIn(kInpathY);
534 job2.SetPulsePosCheck(!seq.IsMonteCarlo());
535 job2.SetPathOut(kOutpathY); // for updating the extractor
536
537 job2.SetUseData();
538 job2.SetExtractionWithExtractorRndm();
539 job2.SetExtractor(job1.GetExtractor());
540 job2.SetPedestals(job1.GetPedestalCam());
541 job2.SetBadPixels(job1.GetBadPixels());
542// job2.SetUseHists(kMoon);
543
544 // Please check the Changelog of 2005/04/20 about further deatils of the next comment
545 //if (job1.GetExtractor().InheritsFrom("MExtractTimeAndCharge"))
546 const Int_t rc = job2.Process();
547 if (rc<=0)
548 {
549 // rc==0: Error
550 // rc==-1: too much to the left
551 // rc==-2: too much to the right
552 // rc==-3: too much to the right (beyond limits)
553
554 gLog << err << "Calculation of pedestal from extractor (random) failed." << endl << endl;
555
556 //error coding for the automatic analysis (to be filled into the database)
557 switch (rc)
558 {
559 case 0:
560 return 11;
561 case -1:
562 return 12;
563 case -2:
564 return 13;
565 case -3:
566 return 14;
567 }
568 return 2;
569 }
570
571 if (!job2.GetDisplay())
572 {
573 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
574 return 1;
575 }
576
577 //
578 // Calculate pedestal and pedestal resolution
579 //
580 MJPedestal job3(Form("MJPedestalY3 #%d", seq.GetSequence()));
581 job3.SetNoStorage();
582 job3.SetSequence(seq);
583 job3.SetEnv(&env);
584 job3.SetEnvDebug(kDebugEnv);
585 job3.SetDisplay(d);
586 job3.SetNoDisplay();
587 job3.SetOverwrite(kOverwrite);
588 job3.SetPathIn(kInpathY);
589 // job1.SetPathOut(kOutpathC); // not yet needed
590 // job1.SetPathIn(kInpathC); // not yet needed
591
592 job3.SetUseData();
593 job3.SetExtractionWithExtractor();
594 job3.SetExtractor(job2.GetExtractor());
595 job3.SetPedestals(job1.GetPedestalCam());
596 job3.SetBadPixels(job1.GetBadPixels());
597// job3.SetUseHists(kMoon);
598
599 if (!job3.Process())
600 {
601 gLog << err << "Calculation of pedestal from extractor failed." << endl << endl;
602 return 15;
603 }
604
605 if (!job3.GetDisplay())
606 {
607 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
608 return 1;
609 }
610
611 //
612 // Extract signal and calibrate it
613 //
614 MJCalibrateSignal job4(Form("MJCalibrateSignal #%d", seq.GetSequence()));
615 job4.SetSequence(seq);
616 job4.SetDisplay(d);;
617 job4.SetEnv(&env);
618 job4.SetEnvDebug(kDebugEnv);
619 job4.SetOverwrite(kOverwrite);
620 job4.SetPathIn(kInpathY);
621 job4.SetPathOut(kOutpathY);
622 job4.SetMovieMode(kMovie);
623 job4.SetNullOut(kNullOut);
624 if (!seq.IsMonteCarlo())
625 job4.SetExtractor(job2.GetExtractor());
626
627 // Where to search for calibration files
628 if (!job4.Process(job1.GetPedestalCam(), job3.GetPedestalCam(), job2.GetPedestalCam()))
629 return 16;
630
631 if (kDebugEnv>0)
632 env.PrintUntouched();
633
634 if (!job4.GetDisplay())
635 {
636 gLog << warn << "Display closed by user... execution aborted." << endl << endl;
637 return 1;
638 }
639 }
640
641 if (kBatch || kQuit)
642 delete d;
643 else
644 {
645 // From now on each 'Close' means: Terminate the application
646 d->SetBit(MStatusDisplay::kExitLoopOnClose);
647
648 // Wait until the user decides to exit the application
649 app.Run(kFALSE);
650 }
651
652 if (TObject::GetObjectStat())
653 {
654 TObject::SetObjectStat(kFALSE);
655 gObjectTable->Print();
656 }
657
658 return 0;
659}
660
Note: See TracBrowser for help on using the repository browser.