[763] | 1 | // Classe d'initialisation du module HiStats
|
---|
| 2 | // (Histogram and Statistics)
|
---|
| 3 |
|
---|
[2615] | 4 | #include "sopnamsp.h"
|
---|
[763] | 5 | #include "machdefs.h"
|
---|
| 6 | #include "histinit.h"
|
---|
| 7 |
|
---|
| 8 | #include "histos.h"
|
---|
| 9 | #include "histos2.h"
|
---|
| 10 | #include "hisprof.h"
|
---|
[2603] | 11 | #include "histerr.h"
|
---|
[3121] | 12 | #include "hist2err.h"
|
---|
[763] | 13 | #include "ntuple.h"
|
---|
[2688] | 14 | #include "datatable.h"
|
---|
[2699] | 15 | #include "swppfdtable.h"
|
---|
[763] | 16 |
|
---|
[920] | 17 | /*!
|
---|
| 18 | \defgroup HiStats HiStats module
|
---|
[2808] | 19 | This module contains histograms (1D, 2D) and
|
---|
| 20 | classes for management of data sets as tables (NTuple, DataTable ...)
|
---|
[920] | 21 | */
|
---|
| 22 |
|
---|
[763] | 23 | int HiStatsInitiator::FgInit = 0;
|
---|
| 24 |
|
---|
[3169] | 25 | // Module version number - 2.0 , Jul 2006
|
---|
| 26 | // Module version number - 2.1 , Jan 2007 (Nouvelle version de HistoErr + 2DErr)
|
---|
[3127] | 27 | #define MOD_VERS 2.1
|
---|
[3019] | 28 |
|
---|
[920] | 29 | /*!
|
---|
| 30 | \class SOPHYA::HiStatsInitiator
|
---|
| 31 | \ingroup HiStats
|
---|
[2808] | 32 | This class performs the initialisation for HiStats module.
|
---|
| 33 | More specifically, it registers PPF handlers for the following classes :
|
---|
| 34 | - Histo
|
---|
| 35 | - HProf
|
---|
[3121] | 36 | - Histo2D
|
---|
[2808] | 37 | - HistoErr
|
---|
[3121] | 38 | - Histo2DErr
|
---|
[2808] | 39 | - NTuple
|
---|
| 40 | - DataTable
|
---|
| 41 | - SwPPFDataTable
|
---|
| 42 |
|
---|
| 43 | If the system linker/loader handles correctly static object initialisation, there
|
---|
| 44 | is no action required when writing programs. If not, an instance of the class must
|
---|
| 45 | be present before any other operation on the libray classes.
|
---|
[920] | 46 | */
|
---|
[2808] | 47 |
|
---|
[763] | 48 | HiStatsInitiator::HiStatsInitiator()
|
---|
| 49 | : NToolsInitiator()
|
---|
| 50 | {
|
---|
| 51 | FgInit++;
|
---|
| 52 | if (FgInit > 1) return;
|
---|
| 53 |
|
---|
| 54 | // Enregistrement des classes PPersist du modules HiStats
|
---|
| 55 |
|
---|
| 56 | PPRegister(ObjFileIO<Histo>);
|
---|
[809] | 57 | DObjRegister(ObjFileIO<Histo>, Histo);
|
---|
[763] | 58 | PPRegister(ObjFileIO<Histo2D>);
|
---|
[809] | 59 | DObjRegister(ObjFileIO<Histo2D>, Histo2D);
|
---|
[763] | 60 | PPRegister(ObjFileIO<HProf>);
|
---|
[809] | 61 | DObjRegister(ObjFileIO<HProf>, HProf);
|
---|
[3121] | 62 |
|
---|
[2603] | 63 | PPRegister(ObjFileIO<HistoErr>);
|
---|
| 64 | DObjRegister(ObjFileIO<HistoErr>, HistoErr);
|
---|
[3121] | 65 | PPRegister(ObjFileIO<Histo2DErr>);
|
---|
| 66 | DObjRegister(ObjFileIO<Histo2DErr>, Histo2DErr);
|
---|
[763] | 67 |
|
---|
| 68 | PPRegister(ObjFileIO<NTuple>);
|
---|
[809] | 69 | DObjRegister(ObjFileIO<NTuple>, NTuple);
|
---|
[763] | 70 |
|
---|
[2699] | 71 | PPRegister(ObjFileIO<BaseDataTable>);
|
---|
| 72 | DObjRegister(ObjFileIO<BaseDataTable>, DataTable);
|
---|
| 73 | DObjRegister(ObjFileIO<BaseDataTable>, SwPPFDataTable);
|
---|
[2688] | 74 |
|
---|
[3019] | 75 | SophyaInitiator::RegisterModule("HiStats", MOD_VERS); // Module name and version number registration
|
---|
| 76 |
|
---|
[763] | 77 | }
|
---|
| 78 |
|
---|
| 79 | HiStatsInitiator::~HiStatsInitiator()
|
---|
| 80 | {
|
---|
| 81 | FgInit--;
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 |
|
---|
| 85 | // On met un objet initiator en statique, pour les loaders qui savent
|
---|
| 86 | // appeler le constructeur des objets statiques Reza 08/98
|
---|
| 87 | static HiStatsInitiator histatsinit;
|
---|
| 88 |
|
---|