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 | #define MOD_VERS 2.0
|
---|
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 | - XNTuple
|
---|
41 | - DataTable
|
---|
42 | - SwPPFDataTable
|
---|
43 |
|
---|
44 | If the system linker/loader handles correctly static object initialisation, there
|
---|
45 | is no action required when writing programs. If not, an instance of the class must
|
---|
46 | be present before any other operation on the libray classes.
|
---|
47 | */
|
---|
48 |
|
---|
49 | HiStatsInitiator::HiStatsInitiator()
|
---|
50 | : NToolsInitiator()
|
---|
51 | {
|
---|
52 | FgInit++;
|
---|
53 | if (FgInit > 1) return;
|
---|
54 |
|
---|
55 | // Enregistrement des classes PPersist du modules HiStats
|
---|
56 |
|
---|
57 | PPRegister(ObjFileIO<Histo>);
|
---|
58 | DObjRegister(ObjFileIO<Histo>, Histo);
|
---|
59 | PPRegister(ObjFileIO<Histo2D>);
|
---|
60 | DObjRegister(ObjFileIO<Histo2D>, Histo2D);
|
---|
61 | PPRegister(ObjFileIO<HProf>);
|
---|
62 | DObjRegister(ObjFileIO<HProf>, HProf);
|
---|
63 |
|
---|
64 | PPRegister(ObjFileIO<HistoErr>);
|
---|
65 | DObjRegister(ObjFileIO<HistoErr>, HistoErr);
|
---|
66 | PPRegister(ObjFileIO<Histo2DErr>);
|
---|
67 | DObjRegister(ObjFileIO<Histo2DErr>, Histo2DErr);
|
---|
68 |
|
---|
69 | PPRegister(ObjFileIO<NTuple>);
|
---|
70 | DObjRegister(ObjFileIO<NTuple>, NTuple);
|
---|
71 | PPRegister(ObjFileIO<XNTuple>);
|
---|
72 | DObjRegister(ObjFileIO<XNTuple>, XNTuple);
|
---|
73 |
|
---|
74 | PPRegister(ObjFileIO<BaseDataTable>);
|
---|
75 | DObjRegister(ObjFileIO<BaseDataTable>, DataTable);
|
---|
76 | DObjRegister(ObjFileIO<BaseDataTable>, SwPPFDataTable);
|
---|
77 |
|
---|
78 | SophyaInitiator::RegisterModule("HiStats", MOD_VERS); // Module name and version number registration
|
---|
79 |
|
---|
80 | }
|
---|
81 |
|
---|
82 | HiStatsInitiator::~HiStatsInitiator()
|
---|
83 | {
|
---|
84 | FgInit--;
|
---|
85 | }
|
---|
86 |
|
---|
87 |
|
---|
88 | // On met un objet initiator en statique, pour les loaders qui savent
|
---|
89 | // appeler le constructeur des objets statiques Reza 08/98
|
---|
90 | static HiStatsInitiator histatsinit;
|
---|
91 |
|
---|