baryon_2pt_w.cc

Go to the documentation of this file.
00001 // $Id: baryon_2pt_w.cc,v 1.1 2007/05/09 17:19:44 edwards Exp $
00002 /*! \file
00003  *  \brief Construct baryon 2pt correlators.
00004  */
00005 
00006 #include "meas/hadron/baryon_2pt_w.h"
00007 #include "meas/hadron/hadron_2pt_factory_w.h"
00008 
00009 namespace Chroma 
00010 {
00011 
00012   //! Anonymous namespace
00013   /*! @ingroup hadron */
00014   namespace
00015   {
00016     //! Get fermion bc
00017     multi1d<int>
00018     barSeqSourceGetBC(const multi1d<ForwardProp_t>& forward_headers)
00019     {
00020       multi1d<int> bc = getFermActBoundary(forward_headers[0].prop_header.fermact);
00021 
00022       for(int loop=1; loop < forward_headers.size(); ++loop)
00023       {
00024         multi1d<int> bc_b = getFermActBoundary(forward_headers[loop].prop_header.fermact);
00025     
00026         // Bummer, I wish qdp++ had a multi1d.operator!=()
00027         bool same = true;
00028         for(int i=0; i < bc.size(); ++i)
00029         {
00030           if (bc_b[i] != bc[i]) 
00031             same = false;
00032         }
00033       
00034         if (! same)
00035         {
00036           QDPIO::cerr << __func__ << ": the bc in the forward props are not all equal"
00037                       << endl;
00038           QDP_abort(1);
00039         }
00040       }
00041 
00042       return bc;
00043     }
00044 
00045   }
00046 
00047 
00048 
00049   // Default versions
00050   void
00051   BaryonSeqSourceBase::setBC(const multi1d<ForwardProp_t>& forward_headers)
00052   {
00053     getBC() = barSeqSourceGetBC(forward_headers);
00054   }
00055 
00056 }  // end namespace Chroma

Generated on Sun Mar 14 04:28:57 2010 for CHROMA by  doxygen 1.4.7