00001
00002 #include "mEmcRawToLongModule.h"
00003 #include "mEmcRawToLong.h"
00004 #include "PHIODataNode.h"
00005
00006 #include "dEmcRawDataWrapper.h"
00007
00008 typedef PHIODataNode<dEmcRawDataWrapper> dEmcRawDataNode_t;
00009
00010 #include "dEmcDCMLongDataWrapper.h"
00011
00012 typedef PHIODataNode<dEmcDCMLongDataWrapper> dEmcDCMLongDataNode_t;
00013
00014 PHBoolean
00015 mEmcRawToLongModule::callPAM(PHPointerList<PHNode> &nl) {
00016 long result;
00017
00018 TABLE_HEAD_ST t1;
00019 DEMCRAWDATA_ST *d1;
00020 TABLE_HEAD_ST t2;
00021 DEMCDCMLONGDATA_ST *d2;
00022
00023 dEmcRawDataNode_t* n1 = static_cast<dEmcRawDataNode_t*>(nl[0]);
00024 dEmcDCMLongDataNode_t* n2 = static_cast<dEmcDCMLongDataNode_t*>(nl[1]);
00025
00026 t1 = n1->getData()->TableHeader();
00027 d1 = n1->getData()->TableData();
00028 t2 = n2->getData()->TableHeader();
00029 d2 = n2->getData()->TableData();
00030
00031 result = memcrawtolong_(
00032 &t1, d1,
00033 &t2, d2 );
00034
00035 n1->getData()->SetRowCount(t1.nok);
00036 n2->getData()->SetRowCount(t2.nok);
00037
00038 if (result == 1) {
00039 return True;
00040 } else {
00041 return False;
00042 }
00043 }