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