00001
00002
00003
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
00013
00014 namespace
00015 {
00016
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
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
00050 void
00051 BaryonSeqSourceBase::setBC(const multi1d<ForwardProp_t>& forward_headers)
00052 {
00053 getBC() = barSeqSourceGetBC(forward_headers);
00054 }
00055
00056 }