| 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 "datatable.h"
 | 
|---|
| 15 | #include "swppfdtable.h"
 | 
|---|
| 16 | 
 | 
|---|
| 17 | /*!
 | 
|---|
| 18 |    \defgroup HiStats HiStats module
 | 
|---|
| 19 |    This module contains histograms (1D, 2D) and 
 | 
|---|
| 20 |    classes for management of data sets as tables (NTuple, DataTable ...)
 | 
|---|
| 21 | */
 | 
|---|
| 22 |  
 | 
|---|
| 23 | int HiStatsInitiator::FgInit = 0;
 | 
|---|
| 24 | 
 | 
|---|
| 25 | // Module version number - 2.0 , Jul 2006
 | 
|---|
| 26 | // Module version number - 2.1 , Jan 2007  (Nouvelle version de HistoErr + 2DErr)
 | 
|---|
| 27 | #define MOD_VERS   2.1 
 | 
|---|
| 28 | 
 | 
|---|
| 29 | /*!
 | 
|---|
| 30 |   \class SOPHYA::HiStatsInitiator
 | 
|---|
| 31 |   \ingroup HiStats
 | 
|---|
| 32 |   This class performs the initialisation for HiStats module.
 | 
|---|
| 33 |   More specifically, it registers PPF handlers for the following classes :
 | 
|---|
| 34 |   - Histo
 | 
|---|
| 35 |   - HProf
 | 
|---|
| 36 |   - Histo2D
 | 
|---|
| 37 |   - HistoErr
 | 
|---|
| 38 |   - Histo2DErr
 | 
|---|
| 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. 
 | 
|---|
| 46 | */
 | 
|---|
| 47 | 
 | 
|---|
| 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>);
 | 
|---|
| 57 |   DObjRegister(ObjFileIO<Histo>, Histo);
 | 
|---|
| 58 |   PPRegister(ObjFileIO<Histo2D>);
 | 
|---|
| 59 |   DObjRegister(ObjFileIO<Histo2D>, Histo2D);
 | 
|---|
| 60 |   PPRegister(ObjFileIO<HProf>);
 | 
|---|
| 61 |   DObjRegister(ObjFileIO<HProf>, HProf);
 | 
|---|
| 62 | 
 | 
|---|
| 63 |   PPRegister(ObjFileIO<HistoErr>);
 | 
|---|
| 64 |   DObjRegister(ObjFileIO<HistoErr>, HistoErr);
 | 
|---|
| 65 |   PPRegister(ObjFileIO<Histo2DErr>);
 | 
|---|
| 66 |   DObjRegister(ObjFileIO<Histo2DErr>, Histo2DErr);
 | 
|---|
| 67 | 
 | 
|---|
| 68 |   PPRegister(ObjFileIO<NTuple>);
 | 
|---|
| 69 |   DObjRegister(ObjFileIO<NTuple>, NTuple);
 | 
|---|
| 70 | 
 | 
|---|
| 71 |   PPRegister(ObjFileIO<BaseDataTable>);
 | 
|---|
| 72 |   DObjRegister(ObjFileIO<BaseDataTable>, DataTable);
 | 
|---|
| 73 |   DObjRegister(ObjFileIO<BaseDataTable>, SwPPFDataTable);
 | 
|---|
| 74 | 
 | 
|---|
| 75 |   SophyaInitiator::RegisterModule("HiStats", MOD_VERS);  // Module name and version number registration
 | 
|---|
| 76 | 
 | 
|---|
| 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 | 
 | 
|---|