source: Sophya/trunk/ArchTOIPipe/ProcWSophya/genwproc.cc@ 1532

Last change on this file since 1532 was 1532, checked in by aubourg, 24 years ago

flags uint_8

File size: 18.3 KB
Line 
1#include "array.h"
2#include <math.h>
3#include "genwproc.h"
4#include "toimanager.h"
5#include "pexceptions.h"
6#include "ctimer.h"
7
8// -------------------------------------------------------------
9// Class GenWindowTOIProcessor : generic processor with window
10// -------------------------------------------------------------
11
12////////////////////////////////////////////////////////////////
13GenWindowTOIProcessor::GenWindowTOIProcessor(int_4 nbinput,int_4 nboutput
14 ,int_4 wsz, int_4 wstep, int_4 wsztot)
15{
16 if(nbinput<1) throw ParmError("GenWindowTOIProcessor::Creator nbinput<1 !");
17 if(nboutput<0) nboutput=0;
18 if(wsz<2) throw ParmError("GenWindowTOIProcessor::Creator wsz<2 !");
19 if(wsz%2==0) {if(wsztot==wsz) wsztot++; wsz++;}
20 if(wstep<1) wstep=1;
21 if(wsztot<wsz) wsztot = 2*wsz;
22 // cas sans intersection entre 2 samples successifs
23 if(wstep>=wsz) wsztot = wsz;
24
25 NbInput = nbinput;
26 NbOutput = nboutput;
27 WSize = wsz;
28 WStep = wstep;
29 WSizeTot = wsztot;
30
31 CurWtIndex = -1;
32 SNbegin = SNend = StartSample = LastFilledSn = -1;
33 TotNsCount = TotDecalCount = 0;
34
35 SetDbgLevel();
36 SetWSizeLCR();
37 SetDefaultValue();
38
39 TVector<r_8> vr8(1); // CMV+RZ supprimer taille(1) apres correction de
40 TVector<int_8> vi8(1); // constructeur copie de TArray (taille nulle)
41
42 int_4 k;
43 for(k=0;k<NbInput;k++) {
44 WDataIn.push_back(vr8);
45 WFlagIn.push_back(vi8);
46 WInFlg.push_back(false);
47 }
48 if(NbOutput)
49 for(k=0;k<NbOutput;k++) {
50 WDataOut.push_back(vr8);
51 WFlagOut.push_back(vi8);
52 WOutFlg.push_back(false);
53 WPutOutFlg.push_back(false);
54 WPutOutOwnVector.push_back(false);
55 OutSample.push_back(0);
56 }
57}
58
59GenWindowTOIProcessor::~GenWindowTOIProcessor()
60{
61}
62
63////////////////////////////////////////////////////////////////
64void GenWindowTOIProcessor::PrintStatus(ostream & os,int lp)
65{
66os<<"\n ------------------------------------------------------ \n"
67 <<" GenWindowTOIProcessor::PrintStatus() - ["<<NbInput<<","<<NbOutput<<"]"<<endl
68 <<" WSizeTot="<<WSizeTot<<" WSize="<<GetWSize()<<" WStep= "<<GetWStep()<<endl;
69if(lp>0) {
70 os<<" WindowLCR: "
71 <<" L=("<<W0Left<<","<<GetWSize('l')<<")"
72 <<" C=("<<W0Center<<","<<GetWSize('c')<<")"
73 <<" R=("<<W0Right<<","<<GetWSize('r')<<")"
74 <<endl;
75}
76TOIProcessor::PrintStatus(os);
77os<<"ProcessedSampleCount="<<ProcessedSampleCount()<<" NbDecal="<<TotDecalCount<<endl;
78os<<"------------------------------------------------------ "<<endl;
79}
80
81////////////////////////////////////////////////////////////////
82TVector<r_8> GenWindowTOIProcessor::GetWData(int_4 numtoi)
83{
84 if(numtoi<0 || numtoi>=NbInput)
85 throw RangeCheckError("GenWindowTOIProcessor::GetWData : toi out of range !");
86 if(!WInFlg[numtoi])
87 throw ParmError("GenWindowTOIProcessor::GetWData : toi not connected!");
88 return (WDataIn[numtoi])(Range(StartWtIndex(),0,WSize));
89}
90
91TVector<uint_8> GenWindowTOIProcessor::GetWFlag(int_4 numtoi)
92{
93 if(numtoi<0 || numtoi>=NbInput)
94 throw RangeCheckError("GenWindowTOIProcessor::GetWFlag : toi out of range !");
95 if(!WInFlg[numtoi])
96 throw ParmError("GenWindowTOIProcessor::GetWFlag : toi not connected!");
97 return (WFlagIn[numtoi])(Range(StartWtIndex(),0,WSize));
98}
99
100r_8 * GenWindowTOIProcessor::GetWDataPointer(int_4 numtoi)
101{
102 if(numtoi<0 || numtoi>=NbInput)
103 throw RangeCheckError("GenWindowTOIProcessor::GetWDataPointer : toi out of range !");
104 if(!WInFlg[numtoi])
105 throw ParmError("GenWindowTOIProcessor::GetWDataPointer : toi not connected!");
106 return (WDataIn[numtoi].Data()+StartWtIndex());
107
108}
109
110uint_8 * GenWindowTOIProcessor::GetWFlagPointer(int_4 numtoi)
111{
112 if(numtoi<0 || numtoi>=NbInput)
113 throw RangeCheckError("GenWindowTOIProcessor::GetWFlagPointer : toi out of range !");
114 if(!WInFlg[numtoi])
115 throw ParmError("GenWindowTOIProcessor::GetWFlagPointer : toi not connected!");
116 return (WFlagIn[numtoi].Data()+StartWtIndex());
117}
118
119void GenWindowTOIProcessor::GetData(int_4 numtoi, int_8 numsample, r_8 & data, uint_8 & flag)
120{
121 if(numtoi<0 || numtoi>=NbInput)
122 throw RangeCheckError("GenWindowTOIProcessor::GetData : toi out of range !");
123 if(!WInFlg[numtoi])
124 throw ParmError("GenWindowTOIProcessor::GetData : toi not connected!");
125 int_8 k = numsample-GetWStartSample();
126 if ((k<0) || (k >= GetWSize()))
127 throw RangeCheckError("GenWindowTOIProcessor::GetData : numsample out of window!");
128 k += StartWtIndex();
129 data = (WDataIn[numtoi])(k);
130 flag = (WFlagIn[numtoi])(k);
131}
132
133////////////////////////////////////////////////////////////////
134void GenWindowTOIProcessor::PutWData(int numtoi,int_8 numsample
135 ,TVector<r_8>& data,TVector<uint_8>& flag)
136{
137 if(numtoi<0 || numtoi>=NbOutput || NbOutput<=0)
138 throw RangeCheckError("GenWindowTOIProcessor::PutWFlag : toi out of range !");
139 if(!WOutFlg[numtoi])
140 throw ParmError("GenWindowTOIProcessor::PutWFlag : toi not connected!");
141 if(data.Size()!=flag.Size())
142 throw ParmError("GenWindowTOIProcessor::PutWFlag : data.Size()!=flag.Size()!");
143 if(data.Size() == 0)
144 throw ParmError("GenWindowTOIProcessor::PutWFlag : data.Size()==0 !");
145 WDataOut[numtoi].Share(data);
146 WFlagOut[numtoi].Share(flag);
147 OutSample[numtoi] = numsample;
148 WPutOutFlg[numtoi] = true;
149 WPutOutOwnVector[numtoi] = false;
150}
151
152void GenWindowTOIProcessor::PutWData(int numtoi,int_8 numsample
153 , r_8 data, uint_8 flag)
154{
155 if(numtoi<0 || numtoi>=NbOutput || NbOutput<=0)
156 throw RangeCheckError("GenWindowTOIProcessor::PutWFlag : toi out of range !");
157 if(!WOutFlg[numtoi])
158 throw ParmError("GenWindowTOIProcessor::PutWFlag : toi not connected!");
159 if (!WPutOutOwnVector[numtoi]) {
160 WDataOut[numtoi].Realloc(1,BaseArray::SameVectorType,true);
161 WFlagOut[numtoi].Realloc(1,BaseArray::SameVectorType,true);
162 WPutOutOwnVector[numtoi] = true;
163 }
164 (WDataOut[numtoi])(0) = data;
165 (WFlagOut[numtoi])(0) = flag;
166 OutSample[numtoi] = numsample;
167 WPutOutFlg[numtoi] = true;
168}
169
170/******* cmv routines
171void GenWindowTOIProcessor::PutWData(int_4 numtoi,int_8 numsample
172 ,TVector<r_8>& data,TVector<uint_8>& flag)
173{
174 if(numtoi<0 || numtoi>=NbOutput || NbOutput<=0)
175 throw RangeCheckError("GenWindowTOIProcessor::PutWData : toi out of range !");
176 if(!WOutFlg[numtoi])
177 throw ParmError("GenWindowTOIProcessor::PutWData : toi not connected!");
178 if(data.Size()!=flag.Size())
179 throw ParmError("GenWindowTOIProcessor::PutWData : data.Size()!=flag.Size()!");
180 if(data.Size() == 0)
181 throw ParmError("GenWindowTOIProcessor::PutWData : data.Size()==0 !");
182
183 for(int_4 k=0;k<data.Size(); k++)
184 putData(numtoi,numsample+k,data(k),flag(k));
185}
186
187void GenWindowTOIProcessor::PutWData(int_4 numtoi,int_8 numsample
188 ,r_8 data, uint_8 flag)
189{
190 if(numtoi<0 || numtoi>=NbOutput || NbOutput<=0)
191 throw RangeCheckError("GenWindowTOIProcessor::PutWData : toi out of range !");
192 if(!WOutFlg[numtoi])
193 throw ParmError("GenWindowTOIProcessor::PutWData : toi not connected!");
194
195 putData(numtoi,numsample,data,flag);
196}
197*********/
198
199////////////////////////////////////////////////////////////////
200void GenWindowTOIProcessor::SetWSizeLCR(int_4 wszl,int_4 wszc,int_4 wszr)
201// Fenetre a gauche, au centre et a droite du pixel central
202// Selon la logique:
203//-----------------------------------------------
204// | pixel central
205// |
206// |
207// | wszl | wszc | wszr |
208// |
209// | WSize |
210//-----------------------------------------------
211// wszc toujours impair SVP.
212// Default: 0,0,0 : WSize/2,1,WSize/2
213{
214 int_4 wsz2 = WSize/2;
215 // Default
216 if(wszl<=0 && wszc<=0 && wszr<=0) {
217 WSizeLeft = WSizeRight = wsz2; WSizeCenter = 1;
218 W0Left = 0; W0Center = wsz2; W0Right = wsz2+1;
219 return;
220 }
221
222 // Fenetre centrale
223 if(wszc<=0) wszc = 1;
224 if(wszc%2==0) wszc++;
225 if(wszc>WSize) wszc = WSize;
226 WSizeCenter = wszc;
227 W0Center = wsz2 - WSizeCenter/2;
228
229 // Fenetre de gauche
230 if(wszl<=0) wszl = WSize;
231 W0Left = W0Center - wszl;
232 if(W0Left<0) W0Left = 0;
233 WSizeLeft = W0Center - W0Left;
234 if(WSizeLeft<=0) WSizeLeft = 1;
235
236 // Fenetre de droite
237 if(wszr<=0) wszr = WSize;
238 W0Right = W0Center + WSizeCenter;
239 if(W0Right>=WSize) W0Right = WSize - 1;
240 int_4 dum = W0Right + wszr; if(dum>WSize) dum = WSize;
241 WSizeRight = dum - W0Right;
242 if(WSizeRight<=0) WSizeRight = 1;
243}
244
245TVector<r_8> GenWindowTOIProcessor::GetWData(char cw,int_4 numtoi)
246// cr='l' fenetre de gauche, 'c' du centre, 'r' de droite, autre = tout
247{
248 if(numtoi<0 || numtoi>=NbInput)
249 throw RangeCheckError("GenWindowTOIProcessor::GetWData(lcr) : toi out of range !");
250 if(!WInFlg[numtoi])
251 throw ParmError("GenWindowTOIProcessor::GetWData(lcr) : toi not connected!");
252 return (WDataIn[numtoi])(Range(StartWtIndex(cw),0,GetWSize(cw)));
253}
254
255TVector<uint_8> GenWindowTOIProcessor::GetWFlag(char cw,int_4 numtoi)
256// cr='l' fenetre de gauche, 'c' du centre, 'r' de droite, autre = tout
257{
258 if(numtoi<0 || numtoi>=NbInput)
259 throw RangeCheckError("GenWindowTOIProcessor::GetWFlag(lcr) : toi out of range !");
260 if(!WInFlg[numtoi])
261 throw ParmError("GenWindowTOIProcessor::GetWFlag(lcr) : toi not connected!");
262 return (WFlagIn[numtoi])(Range(StartWtIndex(cw),0,GetWSize(cw)));
263}
264
265r_8 * GenWindowTOIProcessor::GetWDataPointer(char cw,int_4 numtoi,int_4& n)
266// cr='l' fenetre de gauche, 'c' du centre, 'r' de droite, autre = tout
267{
268 if(numtoi<0 || numtoi>=NbInput)
269 throw RangeCheckError("GenWindowTOIProcessor::GetWDataPointe(lcr)r : toi out of range !");
270 if(!WInFlg[numtoi])
271 throw ParmError("GenWindowTOIProcessor::GetWDataPointer(lcr) : toi not connected!");
272 n = GetWSize(cw);
273 return (WDataIn[numtoi].Data()+StartWtIndex(cw));
274
275}
276
277uint_8 * GenWindowTOIProcessor::GetWFlagPointer(char cw,int_4 numtoi,int_4& n)
278// cr='l' fenetre de gauche, 'c' du centre, 'r' de droite, autre = tout
279{
280 if(numtoi<0 || numtoi>=NbInput)
281 throw RangeCheckError("GenWindowTOIProcessor::GetWFlagPointer(lcr) : toi out of range !");
282 if(!WInFlg[numtoi])
283 throw ParmError("GenWindowTOIProcessor::GetWFlagPointer(lcr) : toi not connected!");
284 n = GetWSize(cw);
285 return (WFlagIn[numtoi].Data()+StartWtIndex(cw));
286}
287
288////////////////////////////////////////////////////////////////
289void GenWindowTOIProcessor::UserInit(int_8 kstart)
290{
291 cout<<"GenWindowTOIProcessor::UserInit() Default implementation does nothing"<<endl;
292}
293
294void GenWindowTOIProcessor::UserProc(int_8 ks)
295{
296 cout<<"GenWindowTOIProcessor:UserProc() Default implementation does nothing"<<endl;
297}
298
299void GenWindowTOIProcessor::UserEnd(int_8 kend)
300{
301 cout<<"GenWindowTOIProcessor::UserEnd() Default implementation does nothing"<<endl;
302}
303
304////////////////////////////////////////////////////////////////
305void GenWindowTOIProcessor::init()
306{
307 cout << "GenWindowTOIProcessor::init" << endl;
308 char buff[64];
309 int_4 k;
310 for(k=0; k<NbInput; k++) {
311 sprintf(buff,"in%d", k);
312 declareInput(buff);
313 }
314 if(NbOutput)
315 for(k=0; k<NbOutput; k++) {
316 sprintf(buff,"out%d",k);
317 declareOutput(buff);
318 }
319 name = "GenWindowTOIProcessor";
320 // upExtra = 1; $CHECK a quoi ca sert EA?
321}
322
323void GenWindowTOIProcessor::run()
324{
325 // TOIManager* mgr = TOIManager::getManager();
326 SNbegin = getMinIn();
327 SNend = getMaxIn();
328
329 if(SNend-SNbegin<WSize)
330 throw ParmError("GenWindowTOIProcessor::run : sne-snb<WSize !");
331
332 // Allocation des tailles pour les vecteurs
333 int_4 kc, nc=0;
334 for(kc=0;kc<NbInput;kc++) {
335 if( !(WInFlg[kc]=checkInputTOIIndex(kc)) ) continue;
336 WDataIn[kc].ReSize(WSizeTot);
337 WFlagIn[kc].ReSize(WSizeTot);
338 nc++;
339 }
340 if(nc==0) {
341 cerr<<" GenWindowTOIProcessor::run() - No input TOI connected!"<<endl;
342 throw ParmError("GenWindowTOIProcessor::run() No input TOI connected!");
343 }
344 if(NbOutput)
345 for(kc=0;kc<NbOutput;kc++) WOutFlg[kc] = checkOutputTOIIndex(kc);
346
347 // Lecture des samples et remplissage des vecteurs
348 cout<<"GenWindowTOIProcessor::run() SNRange="<<SNbegin<<" - "<<SNend<<endl;
349 try {
350 Timer tm("GenWindowTOIProcessor::run()");
351 int_4 wsz2=WSize/2;
352 int_8 ksend = SNbegin;
353 for(int_8 ks=SNbegin; ks<=SNend; ks+=WStep) {
354
355 Remplissage(ks);
356 if(DbgLevel) test_avec_print(ks);
357
358 if(ks == SNbegin) {UserInit(ks); Ecriture();}
359
360 UserProc(ks);
361 Ecriture();
362
363 ksend = ks;
364 TotNsCount++;
365 }
366 UserEnd(ksend); Ecriture();
367 cout << " GenWindowTOIProcessor::run() - End of processing " << endl;
368
369 } catch(PException & exc) {
370 cerr<<"GenWindowTOIProcessor::run Catched Exception "<<(string)typeid(exc).name()
371 <<"\n .... Msg= "<<exc.Msg()<<endl;
372 }
373}
374
375////////////////////////////////////////////////////////////////
376void GenWindowTOIProcessor::Remplissage(int_8 ks)
377// INPUT:
378// ks : numero du sample CENTRAL
379// samples : sn-ws/2 sn sn+ws/2
380// fenetre : 0 ws/2+1 ws-1
381// Cette routine doit etre utilisee dans une boucle:
382// for(int k=???; k<???; k+=WStep) .....
383// Dans le grand buffer WSizeTot il doit y avoir WSize samples
384// entre ks1=ks-wsz2 et ks2=ks-wsz2 (ks1<=k<=ks2)
385// En ENTREE de cette routine :
386// - CurWtIndex = c'est l'index du tableau WSizeTot qui doit etre rempli
387// (le dernier index qui a ete rempli par l'appel precedent
388// est donc CurWtIndex-1)
389// - LastFilledSn = c'est le dernier numero de sample qui a ete rempli
390// dans le tableau WSizeTot par l'appel precedent
391{
392int_4 wsz2=WSize/2;
393
394// Numero de sample du premier element du tableau WSize
395// (peut etre < SNbegin au debut)
396StartSample = ks - wsz2;
397
398// on doit avoir les samples [ks1,ks2] dans le buffer
399// (mais selon le step, certain peuvent etre deja remplis)
400int_8 ks1 = ks-wsz2, ks2 = ks+wsz2;
401
402if(DbgLevel>1)
403 cout<<"DBG-GenWindowTOIProcessor::Remplissage("<<ks
404 <<") ["<<ks1<<","<<ks2<<"]"
405 <<" CurWtIndex="<<CurWtIndex<<" LastFilledSn="<<LastFilledSn<<endl;
406
407//--------------------------------------------------------
408// Premier remplissage ????
409// Gestion de la borne inferieure pour le permier sample
410//--------------------------------------------------------
411if(CurWtIndex<0) {
412 if(DbgLevel>1)
413 cout<<"DBG-GenWindowTOIProcessor::Remplissage 1ere fois"<<endl;
414 for(int_4 ntoi=0; ntoi<NbInput; ntoi++) {
415 if(!WInFlg[ntoi]) continue;
416 for(int_8 k=ks1, j=0; k<=ks2; k++, j++) {
417 if(k>=SNbegin && k<=SNend) {
418 getData(ntoi,k,(WDataIn[ntoi])(j),(WFlagIn[ntoi])(j));
419 } else {
420 (WDataIn[ntoi])(j) = R8DefVal; (WFlagIn[ntoi])(j) = I8DefVal;
421 }
422 }
423 }
424 CurWtIndex = ks2 - ks1 + 1;
425 LastFilledSn = ks2;
426 return;
427}
428
429//--------------------------------------------------------
430// Faut-il decaler ????
431//--------------------------------------------------------
432if(WStep>=WSize) {
433 // On ne decale pas puisque entre 2 appels a la routine
434 // il faut TOUT recharger (aucun sample deja charge n'est utile)
435 CurWtIndex = 0;
436} else {
437 // Certains samples deja charges sont utiles
438 int_8 ifin = ks2 - LastFilledSn + CurWtIndex-1;
439 if(ifin >= WSizeTot) { // On decale
440 int_8 ideb = CurWtIndex-1 - LastFilledSn + ks1;
441 if(DbgLevel>1)
442 cout<<"DBG-GenWindowTOIProcessor::Remplissage ... Decalage ideb="<<ideb
443 <<" ifin="<<ifin<< endl;
444 for(int_4 ntoi=0; ntoi<NbInput; ntoi++) {
445 if(!WInFlg[ntoi]) continue;
446 for(int_4 i=ideb, j=0; i<CurWtIndex; i++, j++) {
447 (WDataIn[ntoi])(j) = (WDataIn[ntoi])(i);
448 (WFlagIn[ntoi])(j) = (WFlagIn[ntoi])(i);
449 }
450 }
451 CurWtIndex = CurWtIndex-ideb;
452 TotDecalCount++;
453 }
454}
455
456// Remplissage des samples utiles pour ks
457if(ks1<=LastFilledSn) ks1 = LastFilledSn+1;
458if(DbgLevel>1)
459 cout<<"DBG-GenWindowTOIProcessor::Normal fill de ["<<ks1<<","<<ks2<<"]"<<endl;
460for(int_4 ntoi=0; ntoi<NbInput; ntoi++) {
461 if(!WInFlg[ntoi]) continue;
462 for(int_4 k=ks1, j=CurWtIndex; k<=ks2; k++, j++) {
463 if(k>=SNbegin && k<=SNend) {
464 getData(ntoi,k,(WDataIn[ntoi])(j),(WFlagIn[ntoi])(j));
465 } else {
466 (WDataIn[ntoi])(j) = R8DefVal; (WFlagIn[ntoi])(j) = I8DefVal;
467 }
468 }
469}
470CurWtIndex += ks2 - ks1 + 1;
471LastFilledSn = ks2;
472
473return;
474}
475
476void GenWindowTOIProcessor::Ecriture()
477{
478 int_8 maxlenout = 0;
479 int kc;
480 for(kc=0; kc<NbOutput; kc++)
481 if(WOutFlg[kc] && WPutOutFlg[kc] && (WDataOut[kc].Size() > maxlenout) )
482 maxlenout = WDataOut[kc].Size();
483
484 for(int_8 k=0; k<maxlenout; k++) {
485 for(int kc=0; kc<NbOutput; kc++) {
486 if(!WOutFlg[kc]) continue;
487 if(!WPutOutFlg[kc]) continue;
488 if(k>=WDataOut[kc].Size()) continue;
489 putData(kc, k+OutSample[kc], (WDataOut[kc])(k), (WFlagOut[kc])(k));
490 }
491 }
492 for(kc=0; kc<NbOutput; kc++) WPutOutFlg[kc] = false;
493}
494
495////////////////////////////////////////////////////////////////
496void GenWindowTOIProcessor::test_avec_print(int_8 ks)
497{
498if(DbgLevel<=0) return;
499
500int i,ii=0;
501r_8 * datatot = WDataIn[0].Data();
502uint_8 * flagtot = WFlagIn[0].Data();
503r_8 * data = GetWDataPointer();
504uint_8 * flag = GetWFlagPointer();
505int_4 nl,nc,nr;
506r_8 * datal = GetWDataPointer('l',nl);
507uint_8 * flagl = GetWFlagPointer('l',nl);
508r_8 * datac = GetWDataPointer('c',nc);
509uint_8 * flagc = GetWFlagPointer('c',nc);
510r_8 * datar = GetWDataPointer('r',nr);
511uint_8 * flagr = GetWFlagPointer('r',nr);
512
513cout<<"-------- ks = "<<ks<<endl;
514
515if(DbgLevel>2) {
516 cout<<"datatot = ";
517 for(i=0;i<WSizeTot;i++) {ii=0; cout<<" "<<datatot[i]; if(i%10==9) {cout<<endl; ii=1;}}
518 if(ii==0) cout<<endl;
519 cout<<"flagtot = ";
520 for(i=0;i<WSizeTot;i++) {ii=0; cout<<" "<<flagtot[i]; if(i%10==9) {cout<<endl; ii=1;}}
521 if(ii==0) cout<<endl;
522}
523
524cout<<"data = ";
525for(i=0;i<GetWSize();i++) {ii=0; cout<<" "<<data[i]; if(i%10==9) {cout<<endl; ii=1;}}
526 if(ii==0) cout<<endl;
527cout<<"flag = ";
528for(i=0;i<GetWSize();i++) {ii=0; cout<<" "<<flag[i]; if(i%10==9) {cout<<endl; ii=1;}}
529 if(ii==0) cout<<endl;
530
531if(DbgLevel>2) {
532 cout<<"datal = ";
533 for(i=0;i<nl;i++) {ii=0; cout<<" "<<datal[i]; if(i%10==9) {cout<<endl; ii=1;}}
534 if(ii==0) cout<<endl;
535 cout<<"flagl = ";
536 for(i=0;i<nl;i++) {ii=0; cout<<" "<<flagl[i]; if(i%10==9) {cout<<endl; ii=1;}}
537 if(ii==0) cout<<endl;
538 cout<<"datac = ";
539 for(i=0;i<nc;i++) {ii=0; cout<<" "<<datac[i]; if(i%10==9) {cout<<endl; ii=1;}}
540 if(ii==0) cout<<endl;
541 cout<<"flagc = ";
542 for(i=0;i<nc;i++) {ii=0; cout<<" "<<flagc[i]; if(i%10==9) {cout<<endl; ii=1;}}
543 if(ii==0) cout<<endl;
544 cout<<"datar = ";
545 for(i=0;i<nr;i++) {ii=0; cout<<" "<<datar[i]; if(i%10==9) {cout<<endl; ii=1;}}
546 if(ii==0) cout<<endl;
547 cout<<"flagr = ";
548 for(i=0;i<nr;i++) {ii=0; cout<<" "<<flagr[i]; if(i%10==9) {cout<<endl; ii=1;}}
549 if(ii==0) cout<<endl;
550}
551}
Note: See TracBrowser for help on using the repository browser.