Show
Ignore:
Timestamp:
10/22/09 01:13:47 (15 years ago)
Author:
smidl
Message:

logger refactoring

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/pmsm/pmsm_estim.cpp

    r666 r676  
    3030        F.lookupValue ( "experiment.ndat",Ndat ); 
    3131                 
    32         pDS->log_add ( *L ); 
    33         string nic=""; 
     32        pDS->log_register ( *L, "true" ); 
     33        string Ename; 
    3434        for (int i=0; i<nE; i++){ 
    35                 Es(i)->log_add(*L,nic); // estimate 
     35                try { 
     36                        UI::get ( Ename, F.getRoot()["estimators"][i], "name",UI::optional ); 
     37                } catch ( ...) { 
     38                        Ename="Est"+num2str ( i ); 
     39                } 
     40                Es(i)->log_register(*L,Ename); // estimate 
    3641        } 
    3742        L->init(); 
     
    4853                pDS->step();                                                    // simulator step 
    4954                pDS->getdata ( dt );                                    // read data 
    50                 pDS->logit ( *L ); 
     55                pDS->log_write (); 
    5156                 
    5257                // Estimators 
     
    5459                        Es(i)->bayes ( Dls(i)->pushdown ( dt ) );               // update estimates 
    5560 
    56                         Es(i)->logit (*L); 
     61                        Es(i)->log_write (); 
    5762                } 
    5863                // Regulators