source: Sophya/trunk/Poubelle/archTOI.old/tsidproducer.cc@ 555

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

portage cxx en cours

File size: 979 bytes
RevLine 
[534]1// tsidproducer.cc
2// Eric Aubourg CEA/DAPNIA/SPP octobre 1999
3
4#include "tsidproducer.h"
5#include "archexc.h"
6#include "requesthandler.h"
7#include "tsid.h"
8#include "archparam.h"
9
10#define tsid "tsid"
11
12static TSid myTS;
13
14TSidProducer::TSidProducer() {
15 possibleTOIs.insert(TOI(tsid, TOI::unspec, "", "seconds"));
16}
17
18string TSidProducer::getName() {
19 return("TSidProducer 1.0");
20}
21
22
23double TSidProducer::getValue(long sampleNum, TOI const& toi) {
[555]24 map<TOI, TOIProducer*> & m = neededTOIs[toi];
[534]25 // Seulement longitude...
[555]26 TOI const& longTOI = (*m.begin()).first;
[534]27 TOIProducer* longProd = (*m.begin()).second;
28 myTS.setLongitude(longProd->getValue(sampleNum, longTOI));
29 return myTS.getLST(archParam.acq.SN2MJD(sampleNum));
30
31}
32
33
34set<TOI> TSidProducer::reqTOIFor(TOI const& toi) {
35 set<TOI> t;
36 if (toi.name == tsid) {
37 t.insert(TOI("longitude", TOI::unspec, "interp"));
38 } else {
39 throw ArchExc("Cannot produce "+toi.name);
40 }
41 return t;
42}
43
44
45
46
47
Note: See TracBrowser for help on using the repository browser.