Changeset 1331 for XIOS/dev/branch_openmp/src/node/context.cpp
- Timestamp:
- 11/16/17 16:20:41 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/node/context.cpp
r1328 r1331 23 23 namespace xios { 24 24 25 shared_ptr<CContextGroup> CContext::root;26 27 /// ////////////////////// D éfinitions ////////////////////// ///25 shared_ptr<CContextGroup> * CContext::root_ptr = 0; 26 27 /// ////////////////////// Dfinitions ////////////////////// /// 28 28 29 29 CContext::CContext(void) … … 59 59 CContextGroup* CContext::getRoot(void) 60 60 { 61 if (root.get()==NULL) root=shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 62 return root.get(); 61 //std::cout<<omp_get_thread_num()<<" get root name = "<<xml::CXMLNode::GetRootName()<<std::endl; 62 if (root_ptr==0) root_ptr = new shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 63 return root_ptr->get(); 63 64 } 64 65 … … 182 183 if (!this->hasChild()) 183 184 { 184 //oss << "<!-- No definition -->" << std::endl; // fait planter l'incr émentation185 //oss << "<!-- No definition -->" << std::endl; // fait planter l'incrmentation 185 186 } 186 187 else … … 555 556 void CContext::solveAllInheritance(bool apply) // default : apply = true 556 557 { 557 // R ésolution des héritages descendants (cà d des héritages de groupes)558 // Rsolution des hritages descendants (cd des hritages de groupes) 558 559 // pour chacun des contextes. 559 560 solveDescInheritance(apply); 560 561 561 // R ésolution des héritages par référence au niveau des fichiers.562 // Rsolution des hritages par rfrence au niveau des fichiers. 562 563 const vector<CFile*> allFiles=CFile::getAll(); 563 564 const vector<CGrid*> allGrids= CGrid::getAll(); … … 583 584 584 585 for (unsigned int i = 0; i < allFiles.size(); i++) 585 if (!allFiles[i]->enabled.isEmpty()) // Si l'attribut 'enabled' est d éfini.586 if (!allFiles[i]->enabled.isEmpty()) // Si l'attribut 'enabled' est dfini. 586 587 { 587 if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fix é Ãvrai.588 if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fix vrai. 588 589 { 589 590 if ((initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) … … 610 611 611 612 if (enabledFiles.size() == 0) 612 DEBUG(<<"Aucun fichier ne va être sorti dans le contexte nommé\""613 DEBUG(<<"Aucun fichier ne va tre sorti dans le contexte nomm \"" 613 614 << getId() << "\" !"); 614 615 } … … 847 848 prepareTimeseries(); 848 849 849 //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers Ãsortir.850 //Initialisation du vecteur 'enabledFiles' contenant la liste des fichiers sortir. 850 851 this->findEnabledFiles(); 851 852 this->findEnabledReadModeFiles(); … … 1257 1258 CContext* context = CObjectFactory::CreateObject<CContext>(id).get(); 1258 1259 getRoot(); 1259 if (!hasctxt) CGroupFactory::AddChild( root, context->getShared());1260 if (!hasctxt) CGroupFactory::AddChild(*root_ptr, context->getShared()); 1260 1261 1261 1262 #define DECLARE_NODE(Name_, name_) \
Note: See TracChangeset
for help on using the changeset viewer.