source: Sophya/trunk/Poubelle/archTOI.old/toilldiluproducer.cc@ 626

Last change on this file since 626 was 534, checked in by ansari, 26 years ago

V2

File size: 6.6 KB
Line 
1// toilldiluproducer.cc
2// Eric Aubourg CEA/DAPNIA/SPP octobre 1999
3
4#include "toilldiluproducer.h"
5#include "archfileset.h"
6#include "toimanager.h"
7#include "requesthandler.h"
8
9#define dilDAC "dilDAC"
10#define dilSwitch "dilSwitch"
11#define voyantEVO "voyantEVO"
12#define voyantEVF "voyantEVF"
13#define commandeEV0 "commandeEV0"
14#define commandeEVF "commandeEVF"
15#define commandeEVB "commandeEVB"
16#define commandeEVV "commandeEVV"
17#define pressEnt3He "pressEnt3He"
18#define debit3He "debit3He"
19#define pressSor3He "pressSor3He"
20#define pressEnt4He "pressEnt4He"
21#define debit4He "debit4He"
22#define pressSor4He "pressSor4He"
23#define pressAirVanne "pressAirVanne"
24#define pressPompChar "pressPompChar"
25#define pressMembrane "pressMembrane"
26#define pressExterne "pressExterne"
27#define tensPile10T "tensPile10T"
28#define tensPileP18D "tensPileP18D"
29#define tensPileM18D "tensPileM18D"
30#define tensPile10B "tensPile10B"
31#define tensPileP18B "tensPileP18B"
32#define tensPileM18B "tensPileM18B"
33#define tensPileCh "tensPileCh"
34#define swPile5 "swPile5"
35#define swPile15 "swPile15"
36#define tempCaissH1 "tempCaissH1"
37#define tempCaissH2 "tempCaissH2"
38#define tempCaissB1 "tempCaissB1"
39#define tempCaissB2 "tempCaissB2"
40#define tempCaissTHe "tempCaissTHe"
41#define tempCaissPiles "tempCaissPiles"
42#define tempCaissDrv "tempCaissDrv"
43#define pressHeBain "pressHeBain"
44#define pressPirani "pressPirani"
45
46
47TOILLDiluProducer::TOILLDiluProducer()
48{
49 possibleTOIs.insert(TOI(dilDAC, TOI::all, "", "ADU"));
50 possibleTOIs.insert(TOI(dilSwitch, TOI::unspec, "", "LONGWORD"));
51
52 possibleTOIs.insert(TOI(voyantEVO, TOI::unspec, "", "BOOLEAN"));
53 possibleTOIs.insert(TOI(voyantEVF, TOI::unspec, "", "BOOLEAN"));
54 possibleTOIs.insert(TOI(commandeEV0, TOI::unspec, "", "BOOLEAN"));
55 possibleTOIs.insert(TOI(commandeEVF, TOI::unspec, "", "BOOLEAN"));
56 possibleTOIs.insert(TOI(commandeEVB, TOI::unspec, "", "BOOLEAN"));
57 possibleTOIs.insert(TOI(commandeEVV, TOI::unspec, "", "BOOLEAN"));
58
59 possibleTOIs.insert(TOI(pressEnt3He, TOI::unspec, "", "bars"));
60 possibleTOIs.insert(TOI(debit3He, TOI::unspec, "", "microMoles"));
61 possibleTOIs.insert(TOI(pressSor3He, TOI::unspec, "", "bars"));
62
63 possibleTOIs.insert(TOI(pressEnt4He, TOI::unspec, "", "bars"));
64 possibleTOIs.insert(TOI(debit4He, TOI::unspec, "", "microMoles"));
65 possibleTOIs.insert(TOI(pressSor4He, TOI::unspec, "", "bars"));
66
67 possibleTOIs.insert(TOI(pressAirVanne, TOI::unspec, "", "bars"));
68 possibleTOIs.insert(TOI(pressPompChar, TOI::unspec, "", "bars"));
69 possibleTOIs.insert(TOI(pressMembrane, TOI::unspec, "", "bars"));
70 possibleTOIs.insert(TOI(pressExterne, TOI::unspec, "", "bars"));
71
72 possibleTOIs.insert(TOI(tensPile10T, TOI::unspec, "", "Volts"));
73 possibleTOIs.insert(TOI(tensPileP18D, TOI::unspec, "", "Volts"));
74 possibleTOIs.insert(TOI(tensPileM18D, TOI::unspec, "", "Volts"));
75 possibleTOIs.insert(TOI(tensPile10B, TOI::unspec, "", "Volts"));
76 possibleTOIs.insert(TOI(tensPileP18B, TOI::unspec, "", "Volts"));
77 possibleTOIs.insert(TOI(tensPileM18B, TOI::unspec, "", "Volts"));
78 possibleTOIs.insert(TOI(tensPileCh, TOI::unspec, "", "Volts"));
79
80 possibleTOIs.insert(TOI(swPile5, TOI::unspec, "", "BOOLEAN"));
81 possibleTOIs.insert(TOI(swPile15, TOI::unspec, "", "BOOLEAN"));
82
83 possibleTOIs.insert(TOI(tempCaissH1, TOI::unspec, "", "Kelvin"));
84 possibleTOIs.insert(TOI(tempCaissH2, TOI::unspec, "", "Kelvin"));
85 possibleTOIs.insert(TOI(tempCaissB1, TOI::unspec, "", "Kelvin"));
86 possibleTOIs.insert(TOI(tempCaissB2, TOI::unspec, "", "Kelvin"));
87 possibleTOIs.insert(TOI(tempCaissTHe, TOI::unspec, "", "Kelvin"));
88 possibleTOIs.insert(TOI(tempCaissPiles,TOI::unspec, "", "Kelvin"));
89 possibleTOIs.insert(TOI(tempCaissDrv, TOI::unspec, "", "Kelvin"));
90
91 possibleTOIs.insert(TOI(pressHeBain, TOI::unspec, "", "bars"));
92 possibleTOIs.insert(TOI(pressPirani, TOI::unspec, "", "bars"));
93}
94
95string TOILLDiluProducer::getName() {
96 return("TOILLDiluProducer 1.0");
97}
98
99#define COMPTOI(_toi_, _func_) \
100 if ((*i).name == _toi_) { \
101 computedValue((*i),sample0, _func_(blk)); \
102 }
103
104void TOILLDiluProducer::handleBlock(ArchFileSet* fs)
105{
106 block_type_dilution* blk = fs->lastDilution();
107 long sample0 = numero_block(blk)*72;
108 for (set<TOI>::iterator i = producedTOIs.begin(); i != producedTOIs.end(); i++) {
109 COMPTOI(voyantEVO, voyant_EVO) else
110 COMPTOI(voyantEVF, voyant_EVF) else
111 COMPTOI(commandeEV0, commande_EVO) else
112 COMPTOI(commandeEVF, commande_EVF) else
113 COMPTOI(commandeEVB, commande_EVB) else
114 COMPTOI(commandeEVV, commande_EVV) else
115 COMPTOI(pressEnt3He, pression_entree_3He) else
116 COMPTOI(debit3He, debit_3He) else
117 COMPTOI(pressSor3He, pression_sortie_3He) else
118 COMPTOI(pressEnt4He, pression_entree_4He) else
119 COMPTOI(debit4He, debit_4He) else
120 COMPTOI(pressSor4He, pression_sortie_4He) else
121 COMPTOI(pressAirVanne, pression_air_vanne) else
122 COMPTOI(pressPompChar, pression_pompe_charbon) else
123 COMPTOI(pressMembrane, pression_membranne) else
124 COMPTOI(pressExterne, pression_externe) else
125 COMPTOI(tensPile10T, tension_pile_10T) else
126 COMPTOI(tensPileP18D, tension_pile_p18D) else
127 COMPTOI(tensPileM18D, tension_pile_m18D) else
128 COMPTOI(tensPile10B, tension_pile_10B) else
129 COMPTOI(tensPileP18B, tension_pile_p18B) else
130 COMPTOI(tensPileM18B, tension_pile_m18B) else
131 COMPTOI(tensPileCh, tension_pile_Ch) else
132 COMPTOI(swPile5, switch_pile_5) else
133 COMPTOI(swPile15, switch_pile_15) else
134 COMPTOI(tempCaissH1, temperature_caisson_haut1) else
135 COMPTOI(tempCaissH2, temperature_caisson_haut2) else
136 COMPTOI(tempCaissB1, temperature_caisson_bas1) else
137 COMPTOI(tempCaissB2, temperature_caisson_bas2) else
138 COMPTOI(tempCaissTHe, temperature_caisson_tube_helium) else
139 COMPTOI(tempCaissPiles, temperature_caisson_piles) else
140 COMPTOI(tempCaissDrv, temperature_caisson_driver_moteur) else
141 COMPTOI(pressHeBain, pression_helium_bain) else
142 COMPTOI(pressPirani, pression_pirani)
143 if ((*i).name == dilDAC) {
144 int k = (*i).index;
145 computedValue((*i), sample0, blk->ADC_dil[k]);
146 } else
147 if ((*i).name == dilSwitch) {
148 computedValue((*i), sample0, blk->switch_dil);
149 }
150 }
151}
152
153
154
Note: See TracBrowser for help on using the repository browser.