00001 // mdcWrapWire.h -- utility routine to handle wrap-around wire numbers 00002 00003 #ifndef MDCWRAPWIRE_H 00004 #define MDCWRAPWIRE_H 00005 00006 inline int mdcWrapWire(int wireIn, int nCell) { 00007 00008 int mdcWrapWire = wireIn % nCell; 00009 if (mdcWrapWire < 0) mdcWrapWire += nCell; 00010 return mdcWrapWire; 00011 } 00012 00013 #endif 00014 00015 00016 00017 00018 00019 00020