Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/wroot/mpi_basket_add is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_wroot_mpi_basket_add
0005 #define tools_wroot_mpi_basket_add
0006 
0007 #include "mpi_send_basket"
0008 #include "branch"
0009 
0010 namespace tools {
0011 namespace wroot {
0012 
0013 class mpi_basket_add : public virtual branch::iadd_basket {
0014   typedef branch::iadd_basket parent;
0015 public:
0016   virtual bool add_basket(basket* a_basket) {
0017     bool status = mpi_send_basket(m_mpi,m_dest,m_tag,m_id,m_icol,*a_basket);
0018     delete a_basket;
0019     return status;
0020   }
0021 public:
0022   mpi_basket_add(impi& a_mpi,int a_dest,int a_tag,uint32 a_id,uint32 a_icol)
0023   :m_mpi(a_mpi),m_dest(a_dest),m_tag(a_tag),m_id(a_id),m_icol(a_icol)
0024   {}
0025 protected:
0026   mpi_basket_add(const mpi_basket_add& a_from):parent()
0027   ,m_mpi(a_from.m_mpi),m_dest(a_from.m_dest),m_tag(a_from.m_tag)
0028   ,m_id(a_from.m_id),m_icol(a_from.m_icol)
0029   {}
0030   mpi_basket_add& operator=(const mpi_basket_add& a_from){
0031     m_dest = a_from.m_dest;
0032     m_tag = a_from.m_tag;
0033     m_id = a_from.m_id;
0034     m_icol = a_from.m_icol;
0035     return *this;
0036   }
0037 protected:
0038   impi& m_mpi;
0039   int m_dest;
0040   int m_tag;
0041   uint32 m_id;
0042   uint32 m_icol;
0043 };
0044 
0045 }}
0046 
0047 #endif