コード例 #1
0
void CShellStep<T>::Serialize( stepArchive &ar)
{
  try{
    if (!isSerialized()){
      setSerialized();
      
      char out[128] = "(53%) ";
      strcat(out, this->name);
#if     NOTIFICATION 
  if (CRepresentationStep::m_pStep->m_bWriteFile)
      CRepresentationStep::m_pStep->m_pScribView->Notify( out);
#else //NOTIFICATION 
#endif//NOTIFICATION 

#ifdef  SHOWPROGRESS
  if (CRepresentationStep::m_pStep->m_bWriteFile)
      CRepresentationStep::m_pStep->m_pScribView->progressBarUpdate( 53);
#endif//SHOWPROGRESS

      writePre(ar);
      ar << "'', " ;
      writeNtuple(ar, m_pCFS_faces, m_pCFS_faces->GetSize());
      writePost(ar);

#ifdef   WRITEEULER
      CBaseStep* pBaseStep=NULL;
      backPtr( pBaseStep);
      if (NULL!=pBaseStep){
        CManifold_solid_brepStep* pManifold_solid_brepStep=(CManifold_solid_brepStep*) pBaseStep;
        pManifold_solid_brepStep->eulerCnt.m_numOpenShells++;
      }
#endif//WRITEEULER

      int is = m_pCFS_faces->GetSize();
      for ( int i = 0; i< is; i++){
        CFaceStep* pS = (CFaceStep*)m_pCFS_faces->GetAt(i);
        if (NULL != pS){
          pS->m_pBack = this;
          pS->Serialize(ar);
        }
      }
    }

  }
  catch(...){
    ar << "\n/*Errors detected in CShellStep::Serialize #\n";
//  ar << getNum();
    ar <<   ", but continuing*/\n" ;    
  }
#if     NOTIFICATION 
  if (CRepresentationStep::m_pStep->m_bWriteFile)
  CRepresentationStep::m_pStep->m_pScribView->Notify("(65%) CShellStep::Serialize");
#else //NOTIFICATION 
#endif//NOTIFICATION 

#ifdef  SHOWPROGRESS
  if (CRepresentationStep::m_pStep->m_bWriteFile)
  CRepresentationStep::m_pStep->m_pScribView->progressBarUpdate( 65);
#endif//SHOWPROGRESS
}
コード例 #2
0
void CConnected_face_setStep::Serialize( stepArchive &ar)
{
  char out[128] = "(55%) ";
  strcat(out, this->m_szTheClass);

#if     NOTIFICATION 
  if (CRepresentationStep::m_pStep->m_bWriteFile){
    CRepresentationStep::m_pStep->m_pScribView->Notify( out);}
#else //NOTIFICATION 
#endif//NOTIFICATION 

#ifdef  SHOWPROGRESS
  if (CRepresentationStep::m_pStep->m_bWriteFile){
    CRepresentationStep::m_pStep->m_pScribView->progressBarUpdate( 55);}
#endif//SHOWPROGRESS

  try{
    if (!isSerialized()){
      setSerialized();
      if (NULL != m_pCFS_faces){
       writeNtuple( ar, m_pCFS_faces);
       int is = m_pCFS_faces->GetSize();
       for ( int i = 0; i< is; i++){
          CFaceStep* pS = (CFaceStep*)m_pCFS_faces->GetAt(i);
          pS->Serialize(ar);
       }
      }
      else {
        writeChild(ar, m_pRepresentation_itemStep->getNum());
        m_pRepresentation_itemStep->Serialize(ar);
      }
    }
  }
  catch(...){
    ar << "\n/*Errors detected in CConnected_face_setStep::Serialize #\n";
    ar << getNum();
    ar <<   ", but continuing*/\n" ;    
  }
}
コード例 #3
0
bool NtuWriteInterface<T>::analyzeEDM( const edm::EventBase& ev,
                                       int ientry, int event_file ) {
  bool select = T::analyzeEDM( ev, ientry, event_file );
  if ( select ) writeNtuple();
  return select;
}