| 1 | // Classe d'initialisation du module HiStats
|
|---|
| 2 | // (Histogram and Statistics)
|
|---|
| 3 |
|
|---|
| 4 | #include "sopnamsp.h"
|
|---|
| 5 | #include "machdefs.h"
|
|---|
| 6 | #include "histinit.h"
|
|---|
| 7 |
|
|---|
| 8 | #include "histos.h"
|
|---|
| 9 | #include "histos2.h"
|
|---|
| 10 | #include "hisprof.h"
|
|---|
| 11 | #include "histerr.h"
|
|---|
| 12 | #include "hist2err.h"
|
|---|
| 13 | #include "ntuple.h"
|
|---|
| 14 | #include "xntuple.h"
|
|---|
| 15 | #include "datatable.h"
|
|---|
| 16 | #include "swppfdtable.h"
|
|---|
| 17 |
|
|---|
| 18 | /*!
|
|---|
| 19 | \defgroup HiStats HiStats module
|
|---|
| 20 | This module contains histograms (1D, 2D) and
|
|---|
| 21 | classes for management of data sets as tables (NTuple, DataTable ...)
|
|---|
| 22 | */
|
|---|
| 23 |
|
|---|
| 24 | int HiStatsInitiator::FgInit = 0;
|
|---|
| 25 |
|
|---|
| 26 | // Module version number - 2.0 , Jul 2006
|
|---|
| 27 | // Module version number - 2.1 , Jan 2007 (Nouvelle version de HistoErr + 2DErr)
|
|---|
| 28 | #define MOD_VERS 2.1
|
|---|
| 29 |
|
|---|
| 30 | /*!
|
|---|
| 31 | \class SOPHYA::HiStatsInitiator
|
|---|
| 32 | \ingroup HiStats
|
|---|
| 33 | This class performs the initialisation for HiStats module.
|
|---|
| 34 | More specifically, it registers PPF handlers for the following classes :
|
|---|
| 35 | - Histo
|
|---|
| 36 | - HProf
|
|---|
| 37 | - Histo2D
|
|---|
| 38 | - HistoErr
|
|---|
| 39 | - Histo2DErr
|
|---|
| 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.
|
|---|
| 48 | */
|
|---|
| 49 |
|
|---|
| 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>);
|
|---|
| 59 | DObjRegister(ObjFileIO<Histo>, Histo);
|
|---|
| 60 | PPRegister(ObjFileIO<Histo2D>);
|
|---|
| 61 | DObjRegister(ObjFileIO<Histo2D>, Histo2D);
|
|---|
| 62 | PPRegister(ObjFileIO<HProf>);
|
|---|
| 63 | DObjRegister(ObjFileIO<HProf>, HProf);
|
|---|
| 64 |
|
|---|
| 65 | PPRegister(ObjFileIO<HistoErr>);
|
|---|
| 66 | DObjRegister(ObjFileIO<HistoErr>, HistoErr);
|
|---|
| 67 | PPRegister(ObjFileIO<Histo2DErr>);
|
|---|
| 68 | DObjRegister(ObjFileIO<Histo2DErr>, Histo2DErr);
|
|---|
| 69 |
|
|---|
| 70 | PPRegister(ObjFileIO<NTuple>);
|
|---|
| 71 | DObjRegister(ObjFileIO<NTuple>, NTuple);
|
|---|
| 72 | PPRegister(ObjFileIO<XNTuple>);
|
|---|
| 73 | DObjRegister(ObjFileIO<XNTuple>, XNTuple);
|
|---|
| 74 |
|
|---|
| 75 | PPRegister(ObjFileIO<BaseDataTable>);
|
|---|
| 76 | DObjRegister(ObjFileIO<BaseDataTable>, DataTable);
|
|---|
| 77 | DObjRegister(ObjFileIO<BaseDataTable>, SwPPFDataTable);
|
|---|
| 78 |
|
|---|
| 79 | SophyaInitiator::RegisterModule("HiStats", MOD_VERS); // Module name and version number registration
|
|---|
| 80 |
|
|---|
| 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 |
|
|---|