Commit d72c13e649476d06e9d9916a5c17da71a80c28c1

Authored by Jürgen Knödlseder
1 parent 7f39d54f

Rename virtual abstract ctool::run() method to ctool::process() and add non-abst…

…ract ctool::run() method (#3592)
Showing 124 changed files with 388 additions and 600 deletions

Too many changes.

To preserve performance only 100 of 124 files are displayed.

ChangeLog
1   -2022-02-02
  1 +2022-02-22
2 2  
3 3 * Version 2.0.0 released
4 4 ========================
5 5  
  6 + Rename virtual abstract ctool::run() method to ctool::process() and
  7 + add non-abstract ctool::run() method (#3592) (#3592)
6 8 Add methods to access ctlike attributes
7 9 Add csadd2caldb script
8 10 Add restart of bisection in case of bad convergence in ctulimit
... ...
1 1 New Features and Important Changes in ctools 2.0.0
2 2  
3   -2 February 2022
  3 +22 February 2022
4 4  
5 5  
6 6 Introduction
... ... @@ -34,7 +34,10 @@ Added optimizer setter to ctlikelihood base class.
34 34  
35 35 Base classes
36 36 ------------
37   -None
  37 +Renamed virtual abstract ctool::run() method to ctool::process() and introduce
  38 +high-level non-abstact class ctool::run() that handles the counting of running
  39 +GApplication instances. In that way a tool knows whether it is a child or a
  40 +parent application (#3592).
38 41  
39 42  
40 43 ctbin - CTA event binning
... ...
README.md
1 1 ctools information
2 2 ==================
3   -* Version: 2.0.0.dev (2 February 2022)
  3 +* Version: 2.0.0.dev (22 February 2022)
4 4 * GammaLib dependency: 2.0.0.dev
5 5  
6 6 [![Build Status](https://cta-jenkins.irap.omp.eu/buildStatus/icon?job=ctools-integrate-os)](https://cta-jenkins.irap.omp.eu/job/ctools-integrate-os/)
... ...
cscripts/csadd2caldb.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Add IRFs to CALDB
4 4 #
5   -# Copyright (C) 2021 Juergen Knoedlseder
  5 +# Copyright (C) 2021-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -376,14 +376,10 @@ class csadd2caldb(ctools.cscript):
376 376  
377 377  
378 378 # Public methods
379   - def run(self):
  379 + def process(self):
380 380 """
381   - Run the script
  381 + Process the script
382 382 """
383   - # Switch screen logging on in debug mode
384   - if self._logDebug():
385   - self._log.cout(True)
386   -
387 383 # Get parameters
388 384 self._get_parameters()
389 385  
... ...
cscripts/csbkgmodel.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates background model
4 4 #
5   -# Copyright (C) 2018-2019 Juergen Knoedlseder
  5 +# Copyright (C) 2018-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -456,14 +456,10 @@ class csbkgmodel(ctools.csobservation):
456 456  
457 457  
458 458 # Public methods
459   - def run(self):
  459 + def process(self):
460 460 """
461   - Run the script
  461 + Process the script
462 462 """
463   - # Switch screen logging on in debug mode
464   - if self._logDebug():
465   - self._log.cout(True)
466   -
467 463 # Get parameters
468 464 self._get_parameters()
469 465  
... ...
cscripts/cscaldb.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Show the content of the ctools calibration database
4 4 #
5   -# Copyright (C) 2014-2017 Juergen Knoedlseder
  5 +# Copyright (C) 2014-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -136,14 +136,10 @@ class cscaldb(ctools.cscript):
136 136  
137 137  
138 138 # Public methods
139   - def run(self):
  139 + def process(self):
140 140 """
141   - Run the script.
  141 + Process the script.
142 142 """
143   - # Switch screen logging on in debug mode
144   - if self._logDebug():
145   - self._log.cout(True)
146   -
147 143 # Get parameters
148 144 self._get_parameters()
149 145  
... ...
cscripts/csebins.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates energy boundaries for stacked analysis
4 4 #
5   -# Copyright (C) 2017-2018 Juergen Knoedlseder
  5 +# Copyright (C) 2017-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -238,14 +238,10 @@ class csebins(ctools.csobservation):
238 238  
239 239  
240 240 # Public methods
241   - def run(self):
  241 + def process(self):
242 242 """
243   - Run the script
  243 + Process the script
244 244 """
245   - # Switch screen logging on in debug mode
246   - if self._logDebug():
247   - self._log.cout(True)
248   -
249 245 # Get parameters
250 246 self._get_parameters()
251 247  
... ...
cscripts/csfindobs.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Find observations from an IACT data store
4 4 #
5   -# Copyright (C) 2016-2018 Michael Mayer
  5 +# Copyright (C) 2016-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -164,14 +164,10 @@ class csfindobs(ctools.cscript):
164 164  
165 165  
166 166 # Public methods
167   - def run(self):
  167 + def process(self):
168 168 """
169   - Run the script
  169 + Process the script
170 170 """
171   - # Switch screen logging on in debug mode
172   - if self._logDebug():
173   - self._log.cout(True)
174   -
175 171 # Get parameters
176 172 self._get_parameters()
177 173  
... ...
cscripts/csfootprint.py
... ... @@ -493,14 +493,10 @@ class csfootprint(ctools.cscript):
493 493  
494 494  
495 495 # Public methods
496   - def run(self):
  496 + def process(self):
497 497 """
498   - Run the script
  498 + Process the script
499 499 """
500   - # Switch screen logging on in debug mode
501   - if self._logDebug():
502   - self._log.cout(True)
503   -
504 500 # Get parameters
505 501 self._get_parameters()
506 502  
... ...
cscripts/csiactcopy.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Copies IACT data from remote machine
4 4 #
5   -# Copyright (C) 2016-2018 Michael Mayer
  5 +# Copyright (C) 2016-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -397,14 +397,10 @@ class csiactcopy(ctools.cscript):
397 397  
398 398  
399 399 # Public methods
400   - def run(self):
  400 + def process(self):
401 401 """
402   - Run the script
  402 + Process the script
403 403 """
404   - # Switch screen logging on in debug mode
405   - if self._logDebug():
406   - self._log.cout(True)
407   -
408 404 # Get parameters
409 405 self._get_parameters()
410 406  
... ...
cscripts/csiactdata.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Inspect an IACT data storage
4 4 #
5   -# Copyright (C) 2015-2018 Michael Mayer
  5 +# Copyright (C) 2015-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -118,14 +118,10 @@ class csiactdata(ctools.cscript):
118 118  
119 119  
120 120 # Public methods
121   - def run(self):
  121 + def process(self):
122 122 """
123   - Run the script
  123 + Process the script
124 124 """
125   - # Switch screen logging on in debug mode
126   - if self._logDebug():
127   - self._log.cout(True)
128   -
129 125 # Get parameters
130 126 self._get_parameters()
131 127  
... ...
cscripts/csiactobs.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates an IACT observation definition XML file
4 4 #
5   -# Copyright (C) 2015-2020 Michael Mayer
  5 +# Copyright (C) 2015-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -563,14 +563,10 @@ class csiactobs(ctools.cscript):
563 563  
564 564  
565 565 # Public methods
566   - def run(self):
  566 + def process(self):
567 567 """
568   - Run the script
  568 + Process the script
569 569 """
570   - # Switch screen logging on in debug mode
571   - if self._logDebug():
572   - self._log.cout(True)
573   -
574 570 # Get parameters
575 571 self._get_parameters()
576 572  
... ...
cscripts/cslightcrv.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates a lightcurve.
4 4 #
5   -# Copyright (C) 2014-2021 Michael Mayer
  5 +# Copyright (C) 2014-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -603,14 +603,10 @@ class cslightcrv(ctools.csobservation):
603 603  
604 604  
605 605 # Public methods
606   - def run(self):
  606 + def process(self):
607 607 """
608   - Run the script
  608 + Process the script
609 609 """
610   - # Switch screen logging on in debug mode
611   - if self._logDebug():
612   - self._log.cout(True)
613   -
614 610 # Get parameters
615 611 self._get_parameters()
616 612  
... ...
cscripts/csmodelinfo.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Shows the content of a model container
4 4 #
5   -# Copyright (C) 2015-2018 Michael Mayer
  5 +# Copyright (C) 2015-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -85,14 +85,10 @@ class csmodelinfo(ctools.cscript):
85 85  
86 86  
87 87 # Public methods
88   - def run(self):
  88 + def process(self):
89 89 """
90   - Run the script
  90 + Process the script
91 91 """
92   - # Switch screen logging on in debug mode
93   - if self._logDebug():
94   - self._log.cout(True)
95   -
96 92 # Get parameters
97 93 self._get_parameters()
98 94  
... ...
cscripts/csmodelmerge.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Merge model definition XML files
4 4 #
5   -# Copyright (C) 2015-2018 Michael Mayer
  5 +# Copyright (C) 2015-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -110,14 +110,10 @@ class csmodelmerge(ctools.cscript):
110 110  
111 111  
112 112 # Public methods
113   - def run(self):
  113 + def process(self):
114 114 """
115   - Run the script
  115 + Process the script
116 116 """
117   - # Switch screen logging on in debug mode
118   - if self._logDebug():
119   - self._log.cout(True)
120   -
121 117 # Get parameters
122 118 self._get_parameters()
123 119  
... ...
cscripts/csmodelselect.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Selects model from a model definition XML file
4 4 #
5   -# Copyright (C) 2016-2018 Juergen Knoedlseder
  5 +# Copyright (C) 2016-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -216,14 +216,10 @@ class csmodelselect(ctools.csobservation):
216 216  
217 217  
218 218 # Public methods
219   - def run(self):
  219 + def process(self):
220 220 """
221   - Run the script
  221 + Process the script
222 222 """
223   - # Switch screen logging on in debug mode
224   - if self._logDebug():
225   - self._log.cout(True)
226   -
227 223 # Get parameters
228 224 self._get_parameters()
229 225  
... ...
cscripts/csmodelsois.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Puts subset of sources in diffuse model cube
4 4 #
5   -# Copyright (C) 2017-2021 Josh Cardenzana
  5 +# Copyright (C) 2017-2022 Josh Cardenzana
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -146,14 +146,10 @@ class csmodelsois(ctools.cscript):
146 146  
147 147  
148 148 # Public methods
149   - def run(self):
  149 + def process(self):
150 150 """
151 151 Implements the actual bulk of the script's tasks
152 152 """
153   - # Switch screen logging on in debug mode
154   - if self._logDebug():
155   - self._log.cout(True)
156   -
157 153 # Get parameters
158 154 self._get_parameters()
159 155  
... ...
cscripts/csobs2caldb.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Creates a calibration database entry for an IACT observation
4 4 #
5   -# Copyright (C) 2015-2021 Michael Mayer
  5 +# Copyright (C) 2015-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -328,14 +328,10 @@ class csobs2caldb(ctools.csobservation):
328 328  
329 329  
330 330 # Public methods
331   - def run(self):
  331 + def process(self):
332 332 """
333   - Run the script
  333 + Process the script
334 334 """
335   - # Switch screen logging on in debug mode
336   - if self._logDebug():
337   - self._log.cout(True)
338   -
339 335 # Get parameters
340 336 self._get_parameters()
341 337  
... ...
cscripts/csobsdef.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generation of an observation definition file
4 4 #
5   -# Copyright (C) 2015-2018 Juergen Knoedlseder
  5 +# Copyright (C) 2015-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -157,19 +157,15 @@ class csobsdef(ctools.cscript):
157 157  
158 158  
159 159 # Public methods
160   - def run(self):
  160 + def process(self):
161 161 """
162   - Run the script
  162 + Process the script
163 163  
164 164 Raises
165 165 ------
166 166 RuntimeError
167 167 Invalid pointing definition file format
168 168 """
169   - # Switch screen logging on in debug mode
170   - if self._logDebug():
171   - self._log.cout(True)
172   -
173 169 # Get parameters
174 170 self._get_parameters()
175 171  
... ...
cscripts/csobsinfo.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Dump information about observation into log file
4 4 #
5   -# Copyright (C) 2015-2018 Michael Mayer
  5 +# Copyright (C) 2015-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -86,14 +86,10 @@ class csobsinfo(ctools.csobservation):
86 86  
87 87  
88 88 # Public methods
89   - def run(self):
  89 + def process(self):
90 90 """
91   - Run the script
  91 + Process the script
92 92 """
93   - # Switch screen logging on in debug mode
94   - if self._logDebug():
95   - self._log.cout(True)
96   -
97 93 # Get parameters
98 94 self._get_parameters()
99 95  
... ...
cscripts/csobsselect.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Selects observations from an observation definition XML file
4 4 #
5   -# Copyright (C) 2016-2018 Juergen Knoedlseder
  5 +# Copyright (C) 2016-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -290,14 +290,10 @@ class csobsselect(ctools.csobservation):
290 290  
291 291  
292 292 # Public methods
293   - def run(self):
  293 + def process(self):
294 294 """
295   - Run the script
  295 + Process the script
296 296 """
297   - # Switch screen logging on in debug mode
298   - if self._logDebug():
299   - self._log.cout(True)
300   -
301 297 # Get parameters
302 298 self._get_parameters()
303 299  
... ...
cscripts/csphagen.py
... ... @@ -3,7 +3,7 @@
3 3 # Computes the PHA spectra for source/background and ARF/RMF files using the
4 4 # reflected region method
5 5 #
6   -# Copyright (C) 2017-2021 Luigi Tibaldo
  6 +# Copyright (C) 2017-2022 Luigi Tibaldo
7 7 #
8 8 # This program is free software: you can redistribute it and/or modify
9 9 # it under the terms of the GNU General Public License as published by
... ... @@ -1005,14 +1005,10 @@ class csphagen(ctools.csobservation):
1005 1005  
1006 1006  
1007 1007 # Public methods
1008   - def run(self):
  1008 + def process(self):
1009 1009 """
1010   - Run the script
  1010 + Process the script
1011 1011 """
1012   - # Switch screen logging on in debug mode
1013   - if self._logDebug():
1014   - self._log.cout(True)
1015   -
1016 1012 # Get parameters
1017 1013 self._get_parameters()
1018 1014  
... ...
cscripts/csphasecrv.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates spectra as a function of phase
4 4 #
5   -# Copyright (C) 2017-2021 Rolf Buehler
  5 +# Copyright (C) 2017-2022 Rolf Buehler
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -461,14 +461,10 @@ class csphasecrv(ctools.csobservation):
461 461  
462 462  
463 463 # Public methods
464   - def run(self):
  464 + def process(self):
465 465 """
466   - Run the script
  466 + Process the script
467 467 """
468   - # Switch screen logging on in debug mode
469   - if self._logDebug():
470   - self._log.cout(True)
471   -
472 468 # Get parameters
473 469 self._get_parameters()
474 470  
... ...
cscripts/cspull.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # This script generates the pull distribution for all model parameters.
4 4 #
5   -# Copyright (C) 2011-2021 Juergen Knoedlseder
  5 +# Copyright (C) 2011-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -439,14 +439,10 @@ class cspull(ctools.csobservation):
439 439  
440 440  
441 441 # Public methods
442   - def run(self):
  442 + def process(self):
443 443 """
444   - Run the script
  444 + Process the script
445 445 """
446   - # Switch screen logging on in debug mode
447   - if self._logDebug():
448   - self._log.cout(True)
449   -
450 446 # Get parameters
451 447 self._get_parameters()
452 448  
... ...
cscripts/csresmap.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates a residual map.
4 4 #
5   -# Copyright (C) 2014-2021 Michael Mayer
  5 +# Copyright (C) 2014-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -134,14 +134,10 @@ class csresmap(ctools.csobservation):
134 134  
135 135  
136 136 # Public methods
137   - def run(self):
  137 + def process(self):
138 138 """
139   - Run the script
  139 + Process the script
140 140 """
141   - # Switch screen logging on in debug mode
142   - if self._logDebug():
143   - self._log.cout(True)
144   -
145 141 # Get parameters
146 142 self._get_parameters()
147 143  
... ...
cscripts/csresspec.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates a residual spectrum.
4 4 #
5   -# Copyright (C) 2017-2020 Luigi Tibaldo
  5 +# Copyright (C) 2017-2022 Luigi Tibaldo
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -747,14 +747,10 @@ class csresspec(ctools.csobservation):
747 747 return result
748 748  
749 749 # Public methods
750   - def run(self):
  750 + def process(self):
751 751 """
752   - Run the script
  752 + Process the script
753 753 """
754   - # Switch screen logging on in debug mode
755   - if self._logDebug():
756   - self._log.cout(True)
757   -
758 754 # Get parameters
759 755 self._get_parameters()
760 756  
... ...
cscripts/csroot2caldb.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generate IRFs in CALDB format from a ROOT offaxis performance file
4 4 #
5   -# Copyright (C) 2016-2021 Juergen Knoedlseder
  5 +# Copyright (C) 2016-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -1739,9 +1739,9 @@ class csroot2caldb(ctools.cscript):
1739 1739  
1740 1740  
1741 1741 # Public methods
1742   - def run(self):
  1742 + def process(self):
1743 1743 """
1744   - Run the script
  1744 + Process the script
1745 1745 """
1746 1746 # Optional ROOT import
1747 1747 try:
... ... @@ -1755,10 +1755,6 @@ class csroot2caldb(ctools.cscript):
1755 1755 gammalib.warning('csroot2caldb', 'ROOT Python module not present, '
1756 1756 'script will create empty IRF.')
1757 1757  
1758   - # Switch screen logging on in debug mode
1759   - if self._logDebug():
1760   - self._log.cout(True)
1761   -
1762 1758 # Get parameters
1763 1759 self._get_parameters()
1764 1760  
... ...
cscripts/csscs.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Spectral component separation script
4 4 #
5   -# Copyright (C) 2020-2021 Luigi Tibaldo
  5 +# Copyright (C) 2020-2022 Luigi Tibaldo
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -791,14 +791,10 @@ class csscs(ctools.csobservation):
791 791 return skymap
792 792  
793 793 # Public methods
794   - def run(self):
  794 + def process(self):
795 795 """
796   - Run the script
  796 + Process the script
797 797 """
798   - # Switch screen logging on in debug mode
799   - if self._logDebug():
800   - self._log.cout(True)
801   -
802 798 # Get parameters
803 799 self._get_parameters()
804 800  
... ...
cscripts/cssens.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Computes the array sensitivity using the Test Statistic for a test source
4 4 #
5   -# Copyright (C) 2011-2021 Juergen Knoedlseder
  5 +# Copyright (C) 2011-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -1079,14 +1079,10 @@ class cssens(ctools.csobservation):
1079 1079  
1080 1080  
1081 1081 # Public methods
1082   - def run(self):
  1082 + def process(self):
1083 1083 """
1084   - Run the script
  1084 + Process the script
1085 1085 """
1086   - # Switch screen logging on in debug mode
1087   - if self._logDebug():
1088   - self._log.cout(True)
1089   -
1090 1086 # Get parameters
1091 1087 self._get_parameters()
1092 1088  
... ...
cscripts/csspec.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates a spectrum.
4 4 #
5   -# Copyright (C) 2014-2021 Michael Mayer
  5 +# Copyright (C) 2014-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -1253,14 +1253,10 @@ class csspec(ctools.csobservation):
1253 1253  
1254 1254  
1255 1255 # Public methods
1256   - def run(self):
  1256 + def process(self):
1257 1257 """
1258   - Run the script
  1258 + Process the script
1259 1259 """
1260   - # Switch screen logging on in debug mode
1261   - if self._logDebug():
1262   - self._log.cout(True)
1263   -
1264 1260 # Get parameters
1265 1261 self._get_parameters()
1266 1262  
... ...
cscripts/cssrcdetect.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Detects sources in a sky map
4 4 #
5   -# Copyright (C) 2016-2019 Juergen Knoedlseder
  5 +# Copyright (C) 2016-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -422,17 +422,13 @@ class cssrcdetect(ctools.cscript):
422 422  
423 423  
424 424 # Public methods
425   - def run(self):
  425 + def process(self):
426 426 """
427   - Run the script
  427 + Process the script
428 428 """
429 429 # Clear model container
430 430 self._models.clear()
431 431  
432   - # Switch screen logging on in debug mode
433   - if self._logDebug():
434   - self._log.cout(True)
435   -
436 432 # Get parameters
437 433 self._get_parameters()
438 434  
... ...
cscripts/cstsdist.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generates the TS distribution for a particular model
4 4 #
5   -# Copyright (C) 2011-2021 Juergen Knoedlseder
  5 +# Copyright (C) 2011-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -355,14 +355,10 @@ class cstsdist(ctools.csobservation):
355 355  
356 356  
357 357 # Public methods
358   - def run(self):
  358 + def process(self):
359 359 """
360   - Run the script
  360 + Process the script
361 361 """
362   - # Switch screen logging on in debug mode
363   - if self._logDebug():
364   - self._log.cout(True)
365   -
366 362 # Get parameters
367 363 self._get_parameters()
368 364  
... ...
cscripts/cstsmapmerge.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Merge Test Statistic maps
4 4 #
5   -# Copyright (C) 2015-2021 Michael Mayer
  5 +# Copyright (C) 2015-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -248,14 +248,10 @@ class cstsmapmerge(ctools.cscript):
248 248  
249 249  
250 250 # Public methods
251   - def run(self):
  251 + def process(self):
252 252 """
253   - Run the script.
  253 + Process the script.
254 254 """
255   - # Switch screen logging on in debug mode
256   - if self._logDebug():
257   - self._log.cout(True)
258   -
259 255 # Get parameters
260 256 self._get_parameters()
261 257  
... ...
cscripts/cstsmapsplit.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Create commands to split TS map computation
4 4 #
5   -# Copyright (C) 2016-2021 Michael Mayer
  5 +# Copyright (C) 2016-2022 Michael Mayer
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -121,14 +121,10 @@ class cstsmapsplit(ctools.cslikelihood):
121 121  
122 122  
123 123 # Public methods
124   - def run(self):
  124 + def process(self):
125 125 """
126   - Run the script
  126 + Process the script
127 127 """
128   - # Switch screen logging on in debug mode
129   - if self._logDebug():
130   - self._log.cout(True)
131   -
132 128 # Get parameters
133 129 self._get_parameters()
134 130  
... ...
cscripts/csviscube.py
... ... @@ -631,14 +631,10 @@ class csviscube(ctools.cscript):
631 631  
632 632  
633 633 # Public methods
634   - def run(self):
  634 + def process(self):
635 635 """
636   - Run the script
  636 + Process the script
637 637 """
638   - # Switch screen logging on in debug mode
639   - if self._logDebug():
640   - self._log.cout(True)
641   -
642 638 # Get parameters
643 639 self._get_parameters()
644 640  
... ...
cscripts/csworkflow.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Executes analysis workflow
4 4 #
5   -# Copyright (C) 2016-2017 Juergen Knoedlseder
  5 +# Copyright (C) 2016-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -323,14 +323,10 @@ class csworkflow(ctools.cscript):
323 323  
324 324  
325 325 # Public methods
326   - def run(self):
  326 + def process(self):
327 327 """
328   - Run the script
  328 + Process the script
329 329 """
330   - # Switch screen logging on in debug mode
331   - if self._logDebug():
332   - self._log.cout(True)
333   -
334 330 # Get parameters
335 331 self._get_parameters()
336 332  
... ...
doc/source/admin/release_history/2.0.rst
1 1 .. _2.0:
2 2  
3   -ctools 2.0 release (2 February 2022)
4   -====================================
  3 +ctools 2.0 release (22 February 2022)
  4 +=====================================
5 5  
6 6 Overview
7 7 --------
... ... @@ -24,6 +24,8 @@ Bug fixes
24 24 Improvements
25 25 ------------
26 26  
  27 +* [`3592 <https://cta-redmine.irap.omp.eu/issues/3592>`_] -
  28 + Rename virtual abstract ``ctool::run()`` method to ``ctool::process()`` and add non-abstract ``ctool::run()`` method (#3592)
27 29 * Add methods to access :ref:`ctlike` attributes
28 30 * Add restart of bisection in case of bad convergence in :ref:`ctulimit`
29 31 * [`3662 <https://cta-redmine.irap.omp.eu/issues/3662>`_] -
... ...
modules/comscripts/comlixfit.py
... ... @@ -239,14 +239,10 @@ class comlixfit(ctools.cslikelihood):
239 239 return
240 240  
241 241 # Public methods
242   - def run(self):
  242 + def process(self):
243 243 """
244   - Run the script
  244 + Process the script
245 245 """
246   - # Switch screen logging on in debug mode
247   - if self._logDebug():
248   - self._log.cout(True)
249   -
250 246 # Get parameters
251 247 self._get_parameters()
252 248  
... ...
modules/comscripts/comlixmap.py
... ... @@ -341,14 +341,10 @@ class comlixmap(ctools.cslikelihood):
341 341  
342 342  
343 343 # Public methods
344   - def run(self):
  344 + def process(self):
345 345 """
346   - Run the script
  346 + Process the script
347 347 """
348   - # Switch screen logging on in debug mode
349   - if self._logDebug():
350   - self._log.cout(True)
351   -
352 348 # Get parameters
353 349 self._get_parameters()
354 350  
... ...
modules/comscripts/comobsadd.py
... ... @@ -569,14 +569,10 @@ class comobsadd(ctools.csobservation):
569 569  
570 570  
571 571 # Public methods
572   - def run(self):
  572 + def process(self):
573 573 """
574   - Run the script
  574 + Process the script
575 575 """
576   - # Switch screen logging on in debug mode
577   - if self._logDebug():
578   - self._log.cout(True)
579   -
580 576 # Get parameters
581 577 self._get_parameters()
582 578  
... ...
modules/comscripts/comobsback.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generate background model for COMPTEL observations
4 4 #
5   -# Copyright (C) 2021 Juergen Knoedlseder
  5 +# Copyright (C) 2021-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -718,14 +718,10 @@ class comobsback(ctools.csobservation):
718 718  
719 719  
720 720 # Public methods
721   - def run(self):
  721 + def process(self):
722 722 """
723   - Run the script
  723 + Process the script
724 724 """
725   - # Switch screen logging on in debug mode
726   - if self._logDebug():
727   - self._log.cout(True)
728   -
729 725 # Get parameters
730 726 self._get_parameters()
731 727  
... ...
modules/comscripts/comobsbin.py
... ... @@ -699,14 +699,10 @@ class comobsbin(ctools.csobservation):
699 699  
700 700  
701 701 # Public methods
702   - def run(self):
  702 + def process(self):
703 703 """
704   - Run the script
  704 + Process the script
705 705 """
706   - # Switch screen logging on in debug mode
707   - if self._logDebug():
708   - self._log.cout(True)
709   -
710 706 # Get parameters
711 707 self._get_parameters()
712 708  
... ...
modules/comscripts/comobsmodel.py
... ... @@ -481,14 +481,10 @@ class comobsmodel(ctools.csobservation):
481 481  
482 482  
483 483 # Public methods
484   - def run(self):
  484 + def process(self):
485 485 """
486   - Run the script
  486 + Process the script
487 487 """
488   - # Switch screen logging on in debug mode
489   - if self._logDebug():
490   - self._log.cout(True)
491   -
492 488 # Get parameters
493 489 self._get_parameters()
494 490  
... ...
modules/comscripts/comobsres.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Generate residuals of COMPTEL observations
4 4 #
5   -# Copyright (C) 2019-2021 Juergen Knoedlseder
  5 +# Copyright (C) 2019-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -625,14 +625,10 @@ class comobsres(ctools.csobservation):
625 625  
626 626  
627 627 # Public methods
628   - def run(self):
  628 + def process(self):
629 629 """
630   - Run the script
  630 + Process the script
631 631 """
632   - # Switch screen logging on in debug mode
633   - if self._logDebug():
634   - self._log.cout(True)
635   -
636 632 # Get parameters
637 633 self._get_parameters()
638 634  
... ...
modules/comscripts/comobsselect.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Select observations from COMPTEL database
4 4 #
5   -# Copyright (C) 2019-2021 Juergen Knoedlseder
  5 +# Copyright (C) 2019-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -250,14 +250,10 @@ class comobsselect(ctools.csobservation):
250 250  
251 251  
252 252 # Public methods
253   - def run(self):
  253 + def process(self):
254 254 """
255   - Run the script
  255 + Process the script
256 256 """
257   - # Switch screen logging on in debug mode
258   - if self._logDebug():
259   - self._log.cout(True)
260   -
261 257 # Get parameters
262 258 self._get_parameters()
263 259  
... ...
modules/comscripts/comobssim.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Simulate COMPTEL observations
4 4 #
5   -# Copyright (C) 2021 Juergen Knoedlseder
  5 +# Copyright (C) 2021-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -109,14 +109,10 @@ class comobssim(ctools.csobservation):
109 109  
110 110  
111 111 # Public methods
112   - def run(self):
  112 + def process(self):
113 113 """
114   - Run the script
  114 + Process the script
115 115 """
116   - # Switch screen logging on in debug mode
117   - if self._logDebug():
118   - self._log.cout(True)
119   -
120 116 # Get parameters
121 117 self._get_parameters()
122 118  
... ...
modules/comscripts/compulbin.py
... ... @@ -382,14 +382,10 @@ class compulbin(ctools.csobservation):
382 382  
383 383  
384 384 # Public methods
385   - def run(self):
  385 + def process(self):
386 386 """
387   - Run the script
  387 + Process the script
388 388 """
389   - # Switch screen logging on in debug mode
390   - if self._logDebug():
391   - self._log.cout(True)
392   -
393 389 # Get parameters
394 390 self._get_parameters()
395 391  
... ...
modules/comscripts/comsrcdetect.py
... ... @@ -2,7 +2,7 @@
2 2 # ==========================================================================
3 3 # Detect source in TS map
4 4 #
5   -# Copyright (C) 2021 Juergen Knoedlseder
  5 +# Copyright (C) 2021-2022 Juergen Knoedlseder
6 6 #
7 7 # This program is free software: you can redistribute it and/or modify
8 8 # it under the terms of the GNU General Public License as published by
... ... @@ -245,14 +245,10 @@ class comsrcdetect(ctools.cscript):
245 245  
246 246  
247 247 # Public methods
248   - def run(self):
  248 + def process(self):
249 249 """
250   - Run the script
  250 + Process the script
251 251 """
252   - # Switch screen logging on in debug mode
253   - if self._logDebug():
254   - self._log.cout(True)
255   -
256 252 # Get parameters
257 253 self._get_parameters()
258 254  
... ...
pyext/ctbin.i
1 1 /***************************************************************************
2 2 * ctbin - Event binning tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2018 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 int cubes(void) const;
50 50 const GCTAEventCube& cube(const int& index = 0) const;
51 51 void save(void);
... ...
pyext/ctbkgcube.i
1 1 /***************************************************************************
2 2 * ctbkgcube - Background cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2018 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 void cntcube(const GCTAEventCube& cntcube);
... ...
pyext/ctbutterfly.i
1 1 /***************************************************************************
2 2 * ctbutterfly - butterfly calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2021 by Michael Mayer *
  4 + * copyright (C) 2014-2022 by Michael Mayer *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 const GFits& butterfly(void) const;
51 51 };
... ...
pyext/ctcubemask.i
1 1 /***************************************************************************
2 2 * ctcubemask - Cube filter tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2016 Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 };
... ...
pyext/ctedispcube.i
1 1 /***************************************************************************
2 2 * ctedispcube - Energy dispersion cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016 by Maria Haupt *
  4 + * copyright (C) 2016-2022 by Maria Haupt *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -46,7 +46,7 @@ public:
46 46  
47 47 // Methods
48 48 void clear(void);
49   - void run(void);
  49 + void process(void);
50 50 void save(void);
51 51 const GCTACubeEdisp& edispcube(void) const;
52 52 };
... ...
pyext/cterror.i
1 1 /***************************************************************************
2 2 * cterror - Parameter error calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2015-2016 by Florent Forest *
  4 + * copyright (C) 2015-2022 by Florent Forest *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -47,7 +47,7 @@ public:
47 47  
48 48 // Methods
49 49 void clear(void);
50   - void run(void);
  50 + void process(void);
51 51 void save(void);
52 52 };
53 53  
... ...
pyext/ctexpcube.i
1 1 /***************************************************************************
2 2 * ctexpcube - Exposure cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2016 by Juergen Knoedlseder *
  4 + * copyright (C) 2014-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 const GCTACubeExposure& expcube(void) const;
... ...
pyext/ctfindvar.i
1 1 /***************************************************************************
2 2 * ctfindvar - search time variability tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2018 by Simon Bonnefoy *
  4 + * copyright (C) 2018-2022 by Simon Bonnefoy *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 };
51 51  
... ...
pyext/ctlike.i
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 const int& iter(void) const;
51 51 const double& logL(void) const;
... ...
pyext/ctlikelihood.i
1 1 /***************************************************************************
2 2 * ctlikelihood - Base class for likelihood tools *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016-2021 by Juergen Knoedlseder *
  4 + * copyright (C) 2016-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,7 +63,7 @@ public:
63 63  
64 64 // Dummy methods (implementation makes this class non-abstract)
65 65 virtual void clear(void) {}
66   - virtual void run(void) {}
  66 + virtual void process(void) {}
67 67 virtual void save(void) {}
68 68 };
69 69 %}
... ... @@ -120,7 +120,7 @@ public:
120 120  
121 121 // Pure virtual methods
122 122 virtual void clear(void) = 0;
123   - virtual void run(void) = 0;
  123 + virtual void process(void) = 0;
124 124 virtual void save(void) = 0;
125 125  
126 126 // Methods
... ... @@ -162,7 +162,7 @@ public:
162 162  
163 163 // Methods
164 164 virtual void clear(void);
165   - virtual void run(void);
  165 + virtual void process(void);
166 166 virtual void save(void);
167 167 };
168 168  
... ... @@ -212,10 +212,23 @@ def _init_cslikelihood(self, name, version, argv):
212 212 self._log.date(True)
213 213 cslikelihood._init_cslikelihood = _init_cslikelihood
214 214  
  215 +# Run the script
  216 +def _run(self):
  217 + if self._logDebug():
  218 + self._log.cout(True)
  219 + self._inc_running()
  220 + self.process()
  221 + self._dec_running()
  222 +cslikelihood.run = _run
  223 +
215 224 # Execute the script
216 225 def _execute(self):
  226 + self._inc_running()
217 227 self._read_ahead(True)
218   - self.run()
  228 + if self._logDebug():
  229 + self._log.cout(True)
  230 + self.process()
219 231 self.save()
  232 + self._dec_running()
220 233 cslikelihood.execute = _execute
221 234 %}
... ...
pyext/ctmapcube.i
1 1 /***************************************************************************
2 2 * ctmapcube - Map cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016 by Juergen Knoedlseder *
  4 + * copyright (C) 2016-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 const GModelSpatialDiffuseCube& mapcube(void) const;
... ...
pyext/ctmodel.i
1 1 /***************************************************************************
2 2 * ctmodel - Model cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2016 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 const GCTAEventCube& cube(void) const;
... ...
pyext/ctobservation.i
1 1 /***************************************************************************
2 2 * ctobservation - Base class for observation tools *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016-2019 by Juergen Knoedlseder *
  4 + * copyright (C) 2016-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -63,7 +63,7 @@ public:
63 63  
64 64 // Dummy methods (implementation makes this class non-abstract)
65 65 virtual void clear(void) {}
66   - virtual void run(void) {}
  66 + virtual void process(void) {}
67 67 virtual void save(void) {}
68 68 };
69 69 %}
... ... @@ -99,7 +99,7 @@ public:
99 99  
100 100 // Pure virtual methods
101 101 virtual void clear(void) = 0;
102   - virtual void run(void) = 0;
  102 + virtual void process(void) = 0;
103 103 virtual void save(void) = 0;
104 104  
105 105 // Public methods
... ... @@ -155,7 +155,7 @@ public:
155 155  
156 156 // Methods
157 157 virtual void clear(void);
158   - virtual void run(void);
  158 + virtual void process(void);
159 159 virtual void save(void);
160 160 };
161 161  
... ... @@ -214,10 +214,23 @@ def _unbinned_observations(self):
214 214 ctool._unbinned_observations = _unbinned_observations
215 215 cscript._unbinned_observations = _unbinned_observations
216 216  
  217 +# Run the script
  218 +def _run(self):
  219 + if self._logDebug():
  220 + self._log.cout(True)
  221 + self._inc_running()
  222 + self.process()
  223 + self._dec_running()
  224 +csobservation.run = _run
  225 +
217 226 # Execute the script
218 227 def _execute(self):
  228 + self._inc_running()
219 229 self._read_ahead(True)
220   - self.run()
  230 + if self._logDebug():
  231 + self._log.cout(True)
  232 + self.process()
221 233 self.save()
  234 + self._dec_running()
222 235 csobservation.execute = _execute
223 236 %}
... ...
pyext/ctobssim.i
1 1 /***************************************************************************
2 2 * ctobssim - Observation simulator tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2020 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 const double& max_rate(void) const;
... ...
pyext/ctool.i
1 1 /***************************************************************************
2 2 * ctool - ctool base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2019 by Juergen Knoedlseder *
  4 + * copyright (C) 2014-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -51,7 +51,7 @@ public:
51 51 // Dummy methods (implementation makes this class non-abstract)
52 52 virtual void clear(void) {
53 53 }
54   - virtual void run(void) {
  54 + virtual void process(void) {
55 55 }
56 56 virtual void save(void) {
57 57 }
... ... @@ -88,10 +88,11 @@ public:
88 88  
89 89 // Pure virtual methods
90 90 virtual void clear(void) = 0;
91   - virtual void run(void) = 0;
  91 + virtual void process(void) = 0;
92 92 virtual void save(void) = 0;
93 93  
94 94 // Public methods
  95 + virtual void run(void);
95 96 virtual void execute(void);
96 97  
97 98 // Make methods private in Python by prepending an underscore
... ... @@ -214,7 +215,7 @@ public:
214 215  
215 216 // Methods
216 217 virtual void clear(void);
217   - virtual void run(void);
  218 + virtual void process(void);
218 219 virtual void save(void);
219 220 };
220 221  
... ... @@ -337,10 +338,24 @@ def _pardict(self, *args):
337 338 ctool.pardict = _pardict
338 339 cscript.pardict = _pardict
339 340  
  341 +
  342 +# Run the script
  343 +def _run(self):
  344 + if self._logDebug():
  345 + self._log.cout(True)
  346 + self._inc_running()
  347 + self.process()
  348 + self._dec_running()
  349 +cscript.run = _run
  350 +
340 351 # Execute the script
341 352 def _execute(self):
  353 + self._inc_running()
342 354 self._read_ahead(True)
343   - self.run()
  355 + if self._logDebug():
  356 + self._log.cout(True)
  357 + self.process()
344 358 self.save()
  359 + self._dec_running()
345 360 cscript.execute = _execute
346 361 %}
... ...
pyext/ctphase.i
1 1 /***************************************************************************
2 2 * ctphase - Append phase information to CTA events file *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2017 by Joshua Cardenzana *
  4 + * copyright (C) 2017-2022 by Joshua Cardenzana *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 };
... ...
pyext/ctprob.i
1 1 /***************************************************************************
2 2 * ctprob - Computes probability for a given model *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2016 by Leonardo Di Venere *
  4 + * copyright (C) 2012-2022 by Leonardo Di Venere *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 };
... ...
pyext/ctpsfcube.i
1 1 /***************************************************************************
2 2 * ctpsfcube - PSF cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2015 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -46,7 +46,7 @@ public:
46 46  
47 47 // Methods
48 48 void clear(void);
49   - void run(void);
  49 + void process(void);
50 50 void save(void);
51 51 const GCTACubePsf& psfcube(void) const;
52 52 };
... ...
pyext/ctselect.i
1 1 /***************************************************************************
2 2 * ctselect - Data selection tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2016 by Jurgen Knodlseder *
  4 + * copyright (C) 2010-2022 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 };
... ...
pyext/ctskymap.i
1 1 /***************************************************************************
2 2 * ctskymap - Sky mapping tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2018 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -45,7 +45,7 @@ public:
45 45  
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 void publish(const std::string& name = "");
51 51 const GSkyMap& skymap(void) const;
... ...
pyext/cttsmap.i
1 1 /***************************************************************************
2 2 * cttsmap - TS map calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2016 by Michael Mayer *
  4 + * copyright (C) 2014-2022 by Michael Mayer *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -43,10 +43,10 @@ public:
43 43 cttsmap(int argc, char *argv[]);
44 44 cttsmap(const cttsmap& app);
45 45 virtual ~cttsmap(void);
46   -
  46 +
47 47 // Methods
48 48 void clear(void);
49   - void run(void);
  49 + void process(void);
50 50 void save(void);
51 51 void publish(const std::string& name = "");
52 52 const GSkyMap& tsmap(void) const;
... ...
pyext/ctulimit.i
1 1 /***************************************************************************
2 2 * ctulimit - Upper limit calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2015-2016 by Michael Mayer *
  4 + * copyright (C) 2015-2022 by Michael Mayer *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -42,10 +42,10 @@ public:
42 42 ctulimit(int argc, char *argv[]);
43 43 ctulimit(const ctulimit& app);
44 44 virtual ~ctulimit(void);
45   -
  45 +
46 46 // Methods
47 47 void clear(void);
48   - void run(void);
  48 + void process(void);
49 49 void save(void);
50 50 const double& diff_ulimit(void) const;
51 51 const double& flux_ulimit(void) const;
... ...
src/ctbin/ctbin.cpp
1 1 /***************************************************************************
2 2 * ctbin - Event binning tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2021 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -217,20 +217,15 @@ void ctbin::clear(void)
217 217  
218 218  
219 219 /***********************************************************************//**
220   - * @brief Run the event binning tool
  220 + * @brief Process the event binning tool
221 221 *
222 222 * Gets the user parameters and loops over all CTA observations in the
223 223 * observation container to bin the events into either a single or a set of
224 224 * counts cube. All observations in the observation container that do not
225 225 * contain CTA event lists will be skipped.
226 226 ***************************************************************************/
227   -void ctbin::run(void)
  227 +void ctbin::process(void)
228 228 {
229   - // If we're in debug mode then all output is also dumped on the screen
230   - if (logDebug()) {
231   - log.cout(true);
232   - }
233   -
234 229 // Get task parameters
235 230 get_parameters();
236 231  
... ...
src/ctbin/ctbin.hpp
1 1 /***************************************************************************
2 2 * ctbin - Event binning tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2020 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -80,7 +80,7 @@ public:
80 80  
81 81 // Methods
82 82 void clear(void);
83   - void run(void);
  83 + void process(void);
84 84 int cubes(void) const;
85 85 const GCTAEventCube& cube(const int& index = 0) const;
86 86 void save(void);
... ...
src/ctbkgcube/ctbkgcube.cpp
1 1 /***************************************************************************
2 2 * ctbkgcube - Background cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2021 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -33,7 +33,7 @@
33 33 #include "GTools.hpp"
34 34  
35 35 /* __ Method name definitions ____________________________________________ */
36   -#define G_RUN "ctbkgcube::run()"
  36 +#define G_PROCESS "ctbkgcube::process()"
37 37  
38 38 /* __ Debug definitions __________________________________________________ */
39 39  
... ... @@ -206,13 +206,8 @@ void ctbkgcube::clear(void)
206 206 * observation container, loops over all CTA observations in the container
207 207 * and generates a background cube from the CTA observations.
208 208 ***************************************************************************/
209   -void ctbkgcube::run(void)
  209 +void ctbkgcube::process(void)
210 210 {
211   - // If we're in debug mode then all output is also dumped on the screen
212   - if (logDebug()) {
213   - log.cout(true);
214   - }
215   -
216 211 // Get task parameters
217 212 get_parameters();
218 213  
... ... @@ -281,7 +276,7 @@ void ctbkgcube::run(void)
281 276 std::string msg = "No background model found in model container. "
282 277 "At least one background model is required in the "
283 278 "model container to generate a background cube.";
284   - throw GException::invalid_value(G_RUN, msg);
  279 + throw GException::invalid_value(G_PROCESS, msg);
285 280 }
286 281  
287 282 // Write header
... ...
src/ctbkgcube/ctbkgcube.hpp
1 1 /***************************************************************************
2 2 * ctbkgcube - Background cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2019 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -56,7 +56,7 @@ public:
56 56  
57 57 // Methods
58 58 void clear(void);
59   - void run(void);
  59 + void process(void);
60 60 void save(void);
61 61 void publish(const std::string& name = "");
62 62 void cntcube(const GCTAEventCube& cntcube);
... ...
src/ctbutterfly/ctbutterfly.cpp
1 1 /***************************************************************************
2 2 * ctbutterfly - butterfly calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2021 by Michael Mayer *
  4 + * copyright (C) 2014-2022 by Michael Mayer *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -208,13 +208,8 @@ void ctbutterfly::clear(void)
208 208 * This method takes the spectral fit and its covariance matrix to compute
209 209 * the confidence band via Gaussian error propagation
210 210 ***************************************************************************/
211   -void ctbutterfly::run(void)
  211 +void ctbutterfly::process(void)
212 212 {
213   - // If we're in debug mode then all output is also dumped on the screen
214   - if (logDebug()) {
215   - log.cout(true);
216   - }
217   -
218 213 // Get task parameters
219 214 get_parameters();
220 215  
... ...
src/ctbutterfly/ctbutterfly.hpp
1 1 /***************************************************************************
2 2 * ctbutterfly - butterfly calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2021 by Michael Mayer *
  4 + * copyright (C) 2014-2022 by Michael Mayer *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -67,7 +67,7 @@ public:
67 67  
68 68 // Methods
69 69 void clear(void);
70   - void run(void);
  70 + void process(void);
71 71 void save(void);
72 72 const GFits& butterfly(void) const;
73 73  
... ...
src/ctcubemask/ctcubemask.cpp
1 1 /***************************************************************************
2 2 * ctcubemask - Cube filter tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2021 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -34,7 +34,6 @@
34 34  
35 35  
36 36 /* __ Method name definitions ____________________________________________ */
37   -#define G_RUN "ctcubemask::run()"
38 37 #define G_APPLY_MASK "ctcubemask::apply_mask(GCTAObservation*)"
39 38  
40 39 /* __ Debug definitions __________________________________________________ */
... ... @@ -201,18 +200,13 @@ void ctcubemask::clear(void)
201 200  
202 201  
203 202 /***********************************************************************//**
204   - * @brief mask data cube
  203 + * @brief Mask data cube
205 204 *
206 205 * This method reads in the application parameters and loops over all
207 206 * observations that were found to apply a mask on the event cube.
208 207 ***************************************************************************/
209   -void ctcubemask::run(void)
  208 +void ctcubemask::process(void)
210 209 {
211   - // Switch screen logging on in debug mode
212   - if (logDebug()) {
213   - log.cout(true);
214   - }
215   -
216 210 // Get parameters
217 211 get_parameters();
218 212  
... ...
src/ctcubemask/ctcubemask.hpp
1 1 /***************************************************************************
2 2 * ctcubemask - Cube filter tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2017 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -59,7 +59,7 @@ public:
59 59  
60 60 // Methods
61 61 void clear(void);
62   - void run(void);
  62 + void process(void);
63 63 void save(void);
64 64 void publish(const std::string& name = "");
65 65  
... ...
src/ctedispcube/ctedispcube.cpp
1 1 /***************************************************************************
2 2 * ctedispcube - Energy dispersion cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016-2021 by Maria Haupt *
  4 + * copyright (C) 2016-2022 by Maria Haupt *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -216,13 +216,8 @@ void ctedispcube::clear(void)
216 216 * Generates the energy dispersion cube by looping over all unbinned CTA
217 217 * observations in the observation container.
218 218 ***************************************************************************/
219   -void ctedispcube::run(void)
  219 +void ctedispcube::process(void)
220 220 {
221   - // If we're in debug mode then all output is also dumped on the screen
222   - if (logDebug()) {
223   - log.cout(true);
224   - }
225   -
226 221 // Get task parameters
227 222 get_parameters();
228 223  
... ...
src/ctedispcube/ctedispcube.hpp
1 1 /***************************************************************************
2 2 * ctedispcube - Energy dispersion cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016 by Maria Haupt *
  4 + * copyright (C) 2016-2022 by Maria Haupt *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -56,7 +56,7 @@ public:
56 56  
57 57 // Methods
58 58 void clear(void);
59   - void run(void);
  59 + void process(void);
60 60 void save(void);
61 61 const GCTACubeEdisp& edispcube(void) const;
62 62  
... ...
src/cterror/cterror.cpp
1 1 /***************************************************************************
2 2 * cterror - Parameter error calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2015-2019 by Florent Forest *
  4 + * copyright (C) 2015-2022 by Florent Forest *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -220,13 +220,8 @@ void cterror::clear(void)
220 220 *
221 221 * Computes the parameter errors using a likelihood profile method.
222 222 ***************************************************************************/
223   -void cterror::run(void)
  223 +void cterror::process(void)
224 224 {
225   - // If we're in debug mode then all output is also dumped on the screen
226   - if (logDebug()) {
227   - log.cout(true);
228   - }
229   -
230 225 // Get task parameters
231 226 get_parameters();
232 227  
... ...
src/cterror/cterror.hpp
1 1 /***************************************************************************
2 2 * cterror - Parameter error calculation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2015-2016 by Florent Forest *
  4 + * copyright (C) 2015-2022 by Florent Forest *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -54,7 +54,7 @@ public:
54 54  
55 55 // Methods
56 56 void clear(void);
57   - void run(void);
  57 + void process(void);
58 58 void save(void);
59 59  
60 60 protected:
... ...
src/ctexpcube/ctexpcube.cpp
1 1 /***************************************************************************
2 2 * ctexpcube - Exposure cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2021 by Juergen Knoedlseder *
  4 + * copyright (C) 2014-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -205,13 +205,8 @@ void ctexpcube::clear(void)
205 205 * observation container, loops over all CTA observations in the container
206 206 * and generates an exposure cube from the CTA observations.
207 207 ***************************************************************************/
208   -void ctexpcube::run(void)
  208 +void ctexpcube::process(void)
209 209 {
210   - // If we're in debug mode then all output is also dumped on the screen
211   - if (logDebug()) {
212   - log.cout(true);
213   - }
214   -
215 210 // Get task parameters
216 211 get_parameters();
217 212  
... ...
src/ctexpcube/ctexpcube.hpp
1 1 /***************************************************************************
2 2 * ctexpcube - Exposure cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2016 by Juergen Knoedlseder *
  4 + * copyright (C) 2014-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -56,7 +56,7 @@ public:
56 56  
57 57 // Methods
58 58 void clear(void);
59   - void run(void);
  59 + void process(void);
60 60 void save(void);
61 61 void publish(const std::string& name = "");
62 62 const GCTACubeExposure& expcube(void) const;
... ...
src/ctfindvar/ctfindvar.cpp
1 1 /***************************************************************************
2 2 * ctfindvar - Time variability search tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2018-2021 by Simon Bonnefoy *
  4 + * copyright (C) 2018-2022 by Simon Bonnefoy *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -221,15 +221,10 @@ void ctfindvar::clear(void)
221 221  
222 222  
223 223 /***********************************************************************//**
224   - * @brief Run time variability search tool
  224 + * @brief Process time variability search tool
225 225 ***************************************************************************/
226   -void ctfindvar::run(void)
  226 +void ctfindvar::process(void)
227 227 {
228   - // If we're in debug mode then all output is also dumped on the screen
229   - if (logDebug()) {
230   - log.cout(true);
231   - }
232   -
233 228 // Get task parameters
234 229 get_parameters();
235 230  
... ...
src/ctfindvar/ctfindvar.hpp
1 1 /***************************************************************************
2 2 * ctfindvar - Time variability search tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2018-2019 by Simon Bonnefoy *
  4 + * copyright (C) 2018-2022 by Simon Bonnefoy *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -58,7 +58,7 @@ public:
58 58  
59 59 // Methods
60 60 void clear(void);
61   - void run(void);
  61 + void process(void);
62 62 void save(void);
63 63  
64 64 protected:
... ...
src/ctlike/ctlike.cpp
... ... @@ -205,7 +205,7 @@ void ctlike::clear(void)
205 205  
206 206  
207 207 /***********************************************************************//**
208   - * @brief Run maximum likelihood analysis
  208 + * @brief Process maximum likelihood analysis
209 209 *
210 210 * The following analysis steps are performed:
211 211 * 1. Read the parameters (and write them into logger)
... ... @@ -213,13 +213,8 @@ void ctlike::clear(void)
213 213 * 3. Setup models for optimizing
214 214 * 4. Optimize model (and write result into logger)
215 215 ***************************************************************************/
216   -void ctlike::run(void)
  216 +void ctlike::process(void)
217 217 {
218   - // Switch screen logging on in debug mode
219   - if (logDebug()) {
220   - log.cout(true);
221   - }
222   -
223 218 // Get parameters
224 219 get_parameters();
225 220  
... ...
src/ctlike/ctlike.hpp
... ... @@ -54,7 +54,7 @@ public:
54 54  
55 55 // Methods
56 56 void clear(void);
57   - void run(void);
  57 + void process(void);
58 58 void save(void);
59 59 const int& iter(void) const;
60 60 const double& logL(void) const;
... ...
src/ctmapcube/ctmapcube.cpp
1 1 /***************************************************************************
2 2 * ctmapcube - Map cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016-2021 by Juergen Knoedlseder *
  4 + * copyright (C) 2016-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -182,13 +182,8 @@ void ctmapcube::clear(void)
182 182 * This method reads the task parameters from the parfile and generates the
183 183 * map cube.
184 184 ***************************************************************************/
185   -void ctmapcube::run(void)
  185 +void ctmapcube::process(void)
186 186 {
187   - // If we're in debug mode then all output is also dumped on the screen
188   - if (logDebug()) {
189   - log.cout(true);
190   - }
191   -
192 187 // Get task parameters
193 188 get_parameters();
194 189  
... ...
src/ctmapcube/ctmapcube.hpp
1 1 /***************************************************************************
2 2 * ctmapcube - Map cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2016-2017 by Juergen Knoedlseder *
  4 + * copyright (C) 2016-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -55,7 +55,7 @@ public:
55 55  
56 56 // Methods
57 57 void clear(void);
58   - void run(void);
  58 + void process(void);
59 59 void save(void);
60 60 void publish(const std::string& name = "");
61 61 const GModelSpatialDiffuseCube& mapcube(void) const;
... ...
src/ctmodel/ctmodel.cpp
1 1 /***************************************************************************
2 2 * ctmodel - Model cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2021 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -214,13 +214,8 @@ void ctmodel::clear(void)
214 214 * observation container, loops over all CTA observations in the container
215 215 * and generates a model map for each CTA observation.
216 216 ***************************************************************************/
217   -void ctmodel::run(void)
  217 +void ctmodel::process(void)
218 218 {
219   - // If we're in debug mode then all output is also dumped on the screen
220   - if (logDebug()) {
221   - log.cout(true);
222   - }
223   -
224 219 // Get task parameters
225 220 get_parameters();
226 221  
... ...
src/ctmodel/ctmodel.hpp
1 1 /***************************************************************************
2 2 * ctmodel - Model cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2012-2017 by Juergen Knoedlseder *
  4 + * copyright (C) 2012-2012 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -65,7 +65,7 @@ public:
65 65  
66 66 // Methods
67 67 void clear(void);
68   - void run(void);
  68 + void process(void);
69 69 void save(void);
70 70 void publish(const std::string& name = "");
71 71 const GCTAEventCube& cube(void) const;
... ...
src/ctobssim/ctobssim.cpp
1 1 /***************************************************************************
2 2 * ctobssim - Observation simulator tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2021 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -227,18 +227,13 @@ void ctobssim::clear(void)
227 227  
228 228  
229 229 /***********************************************************************//**
230   - * @brief Run the ctobssim tool.
  230 + * @brief Process the ctobssim tool.
231 231 *
232 232 * Gets the user parameters, loops over all CTA observations in the
233 233 * observation container, and simulate events for each observation.
234 234 ***************************************************************************/
235   -void ctobssim::run(void)
  235 +void ctobssim::process(void)
236 236 {
237   - // Switch screen logging on in debug mode
238   - if (logDebug()) {
239   - log.cout(true);
240   - }
241   -
242 237 // Get parameters
243 238 get_parameters();
244 239  
... ...
src/ctobssim/ctobssim.hpp
1 1 /***************************************************************************
2 2 * ctobssim - Observation simulator tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2020 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2022 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -62,7 +62,7 @@ public:
62 62  
63 63 // Methods
64 64 void clear(void);
65   - void run(void);
  65 + void process(void);
66 66 void save(void);
67 67 void publish(const std::string& name = "");
68 68 const double& max_rate(void) const;
... ...
src/ctphase/ctphase.cpp
1 1 /***************************************************************************
2 2 * ctphase - Append phase information to CTA events file *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2017-2018 by Joshua Cardenzana *
  4 + * copyright (C) 2017-2022 by Joshua Cardenzana *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -200,19 +200,14 @@ void ctphase::clear(void)
200 200  
201 201  
202 202 /***********************************************************************//**
203   - * @brief Runs the ctprob tool
  203 + * @brief Process the ctprob tool
204 204 *
205 205 * This method reads in the application parameters and loops over all
206 206 * unbinned observations to compute the phase information for each event
207 207 * based on an input model.
208 208 ***************************************************************************/
209   -void ctphase::run(void)
  209 +void ctphase::process(void)
210 210 {
211   - // Switch screen logging on in debug mode
212   - if (logDebug()) {
213   - log.cout(true);
214   - }
215   -
216 211 // Get parameters
217 212 get_parameters();
218 213  
... ...
src/ctphase/ctphase.hpp
1 1 /***************************************************************************
2 2 * ctphase - Append phase information to CTA events file *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2017 by Joshua Cardenzana *
  4 + * copyright (C) 2017-2022 by Joshua Cardenzana *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -60,7 +60,7 @@ public:
60 60  
61 61 // Methods
62 62 void clear(void);
63   - void run(void);
  63 + void process(void);
64 64 void save(void);
65 65 void publish(const std::string& name = "");
66 66  
... ...
src/ctprob/ctprob.cpp
1 1 /***************************************************************************
2 2 * ctprob - Computes event probability for a given model *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2017-2018 by Leonardo Di Venere *
  4 + * copyright (C) 2017-2022 by Leonardo Di Venere *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -199,19 +199,14 @@ void ctprob::clear(void)
199 199  
200 200  
201 201 /***********************************************************************//**
202   - * @brief Runs the ctprob tool
  202 + * @brief Process the ctprob tool
203 203 *
204 204 * This method reads in the application parameters and loops over all
205 205 * unbinned observations to compute the probability for each event that it
206 206 * comes from one of the model components.
207 207 ***************************************************************************/
208   -void ctprob::run(void)
  208 +void ctprob::process(void)
209 209 {
210   - // Switch screen logging on in debug mode
211   - if (logDebug()) {
212   - log.cout(true);
213   - }
214   -
215 210 // Get parameters
216 211 get_parameters();
217 212  
... ...
src/ctprob/ctprob.hpp
1 1 /***************************************************************************
2 2 * ctprob - Computes event probability for a given model *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2017 by Leonardo Di Venere *
  4 + * copyright (C) 2017-2022 by Leonardo Di Venere *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -58,7 +58,7 @@ public:
58 58  
59 59 // Methods
60 60 void clear(void);
61   - void run(void);
  61 + void process(void);
62 62 void save(void);
63 63 void publish(const std::string& name = "");
64 64  
... ...
src/ctpsfcube/ctpsfcube.cpp
1 1 /***************************************************************************
2 2 * ctpsfcube - PSF cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2021 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -204,13 +204,8 @@ void ctpsfcube::clear(void)
204 204 * observation container, loops over all CTA observations in the container
205 205 * and generates a PSF cube from the CTA observations.
206 206 ***************************************************************************/
207   -void ctpsfcube::run(void)
  207 +void ctpsfcube::process(void)
208 208 {
209   - // If we're in debug mode then all output is also dumped on the screen
210   - if (logDebug()) {
211   - log.cout(true);
212   - }
213   -
214 209 // Get task parameters
215 210 get_parameters();
216 211  
... ...
src/ctpsfcube/ctpsfcube.hpp
1 1 /***************************************************************************
2 2 * ctpsfcube - PSF cube generation tool *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2014-2016 by Chia-Chun Lu *
  4 + * copyright (C) 2014-2022 by Chia-Chun Lu *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -56,7 +56,7 @@ public:
56 56  
57 57 // Methods
58 58 void clear(void);
59   - void run(void);
  59 + void process(void);
60 60 void save(void);
61 61 const GCTACubePsf& psfcube(void) const;
62 62  
... ...