Ignore:
Timestamp:
05/23/17 16:32:26 (7 years ago)
Author:
mhnguyen
Message:

Cleaning up some redundant codes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/node/context.cpp

    r1139 r1144  
    526526   void CContext::postProcessingGlobalAttributes() 
    527527   { 
    528      if (allProcessed) return; 
     528     if (allProcessed) return;   
    529529      
    530      // if (hasClient) 
    531      // { 
    532        // After xml is parsed, there are some more works with post processing 
    533        postProcessing(); 
    534  
    535        // Check grid and calculate its distribution 
    536        checkGridEnabledFields(); 
    537  
    538      //} 
    539  
    540  
     530     // After xml is parsed, there are some more works with post processing 
     531     postProcessing(); 
     532 
     533     // Check grid and calculate its distribution 
     534     checkGridEnabledFields();     
    541535 
    542536     setClientServerBuffer(); 
     
    565559       // We have a xml tree on the server side and now, it should be also processed 
    566560       sendPostProcessing(); 
     561 
    567562       sendGridEnabledFields();        
    568563     } 
     
    605600 
    606601   void CContext::recvPostProcessingGlobalAttributes(CBufferIn& buffer) 
    607    { 
    608       // CCalendarWrapper::get(CCalendarWrapper::GetDefName())->createCalendar(); 
     602   {       
    609603      postProcessingGlobalAttributes(); 
    610604   } 
     
    632626      buildFilterGraphOfFieldsWithReadAccess(); 
    633627    } 
    634  
    635     // if (hasClient) this->solveAllRefOfEnabledFields(true);     
    636     checkGridEnabledFields(); 
    637     // sendGridEnabledFields(); 
     628     
     629    checkGridEnabledFields();     
    638630 
    639631    if (hasClient) this->sendProcessingGridOfEnabledFields(); 
     
    666658      for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i) 
    667659        (void)this->enabledReadModeFiles[i]->readAttributesOfEnabledFieldsInReadMode(); 
    668    } 
    669  
    670    void CContext::solveAllEnabledFields() 
    671    { 
    672      int size = this->enabledFiles.size(); 
    673      for (int i = 0; i < size; ++i) 
    674      { 
    675        this->enabledFiles[i]->solveOnlyRefOfEnabledFields(false); 
    676      } 
    677  
    678      for (int i = 0; i < size; ++i) 
    679      { 
    680        this->enabledFiles[i]->generateNewTransformationGridDest(); 
    681      } 
    682660   } 
    683661 
     
    10621040      CBufferIn* buffer=event.subEvents.begin()->buffer; 
    10631041      string id; 
    1064       *buffer>>id; 
    1065       //get(id)->solveOnlyRefOfEnabledFields(false); 
     1042      *buffer>>id;       
    10661043   } 
    10671044 
     
    11561133 
    11571134      // Check if some automatic time series should be generated 
    1158       // Warning: This must be done after solving the inheritance and before the rest of post-processing 
    1159       // prepareTimeseries(); 
     1135      // Warning: This must be done after solving the inheritance and before the rest of post-processing       
    11601136 
    11611137      // The timeseries should only be prepared in client 
     
    11641140      //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers à sortir. 
    11651141      this->findEnabledFiles(); 
    1166       // this->findEnabledReadModeFiles(); 
     1142       
    11671143      // For now, only read files with client and only one level server 
    11681144      if (hasClient && !hasServer) this->findEnabledReadModeFiles(); 
    1169  
    11701145 
    11711146      // Find all enabled fields of each file 
     
    11741149      if (hasClient && !hasServer) this->findAllEnabledFieldsInReadModeFiles(); 
    11751150 
    1176 //     if (hasClient) 
    1177      if (hasClient && !hasServer) 
    1178      { 
    1179       // Try to read attributes of fields in file then fill in corresponding grid (or domain, axis) 
    1180       this->readAttributesOfEnabledFieldsInReadModeFiles(); 
    1181      } 
     1151 
     1152      if (hasClient && !hasServer) 
     1153      { 
     1154       // Try to read attributes of fields in file then fill in corresponding grid (or domain, axis) 
     1155       this->readAttributesOfEnabledFieldsInReadModeFiles(); 
     1156      } 
    11821157 
    11831158      // Only search and rebuild all reference objects of enable fields, don't transform 
Note: See TracChangeset for help on using the changeset viewer.