src/IntRank2/IntCSAVec.cc
/* These functions determine specific aspects of a shift anisotropy 
   interactions vector from a specified parameter set. As the various
   interaction parameters tend to interact, the functions MUST be private
   because their misuse could produce an inconsistent interactions vector.

   The goal here is quite simple. We need to determine a series of shift
   anisotropy interactions from parameters found in an input GAMMA parameter
   set. Each interaction will be defined by unique parameters in the set that
   specify the values: { Iqn, PPM, CSA,eta, alpha, beta, gamma } Complexity
   arises because we need find a series of such interactions and because 
   the interactions allow for a variety of parameters for their definition.

   In this case, since shift anisotropy interactions are singly indexed, there
   is a one to one correspondence between the interaction index and the vector
   index. We simply assume that the first interaction has an index of 0 and
   that the rest are a series spanning 0, 1, 2, .... until the first not
   found.
	   Input		ICV	: CSA interaction vector (this)
                                pset    : A parameter set
                                idx     : Parameter prefix index
                                warn    : Flag for warnings
           Output               none    : Shift anisotropy interactions are
                                          set from parameters in pset

   We Use Only Parameters With Prefix [#] (unles idx=-1). As such we off this
   prefix from all parameter names prior to looking for the interactions.
   This is done before any calls to class IntCSA which doesn't use prefixes. */
These functions determine specific aspects of a shift anisotropy
interactions vector from a specified parameter set. As the various
interaction parameters tend to interact, the functions MUST be private
because their misuse could produce an inconsistent interactions vector.

The goal here is quite simple. We need to determine a series of shift
anisotropy interactions from parameters found in an input GAMMA parameter
set. Each interaction will be defined by unique parameters in the set that
specify the values: { Iqn, PPM, CSA,eta, alpha, beta, gamma } Complexity
arises because we need find a series of such interactions and because
the interactions allow for a variety of parameters for their definition.

In this case, since shift anisotropy interactions are singly indexed, there
is a one to one correspondence between the interaction index and the vector
index. We simply assume that the first interaction has an index of 0 and
that the rest are a series spanning 0, 1, 2, .... until the first not
found.

We Use Only Parameters With Prefix [#] (unles idx=-1). As such we off this
prefix from all parameter names prior to looking for the interactions.
This is done before any calls to class IntCSA which doesn't use prefixes.
These functions determine specific aspects of a shift anisotropy interactions vector from a specified parameter set . As the various interaction parameters tend to interact the functions MUST be private because their misuse could produce an inconsistent interactions vector . The goal here is quite simple . We need to determine a series of shift anisotropy interactions from parameters found in an input GAMMA parameter set . Each interaction will be defined by unique parameters in the set that specify the values : { Iqn PPM CSA eta alpha beta gamma } Complexity arises because we need find a series of such interactions and because the interactions allow for a variety of parameters for their definition . In this case since shift anisotropy interactions are singly indexed there is a one to one correspondence between the interaction index and the vector index . We simply assume that the first interaction has an index of 0 and that the rest are a series spanning 0 1 2 .... until the first not found . We Use Only Parameters With Prefix [ # ] ( unles idx = - 1 ) . As such we off this prefix from all parameter names prior to looking for the interactions . This is done before any calls to class IntCSA which doesn ' t use prefixes .
bool IntCSAVec::setCIV(const ParameterSet& pset, int idx, bool warn)
  {
  clear();					
  ParameterSet subpset;                         
  if(idx != -1) subpset = pset.strip(idx);      
  else          subpset = pset;                 
  IntCSA C;					
  int k = 0; 					
  while(C.read(subpset,k, false))		
    {						
    push_back(C);				
    k++;					
    }
  if(size()) return true;
  if(warn) ICVerror(25, 1);
  return false;
  }
bool IntCSAVec :: setCIV ( const ParameterSet & pset , int idx , bool warn ) { clear ( ) ; ParameterSet subpset ; if ( idx != -1 ) subpset = pset . strip ( idx ) ; else subpset = pset ; IntCSA C ; int k = 0 ; while ( C . read ( subpset , k , false ) ) { push_back ( C ) ; k ++ ; } if ( size ( ) ) return true ; if ( warn ) ICVerror ( 25 , 1 ) ; return false ; }
These functions determine specific aspects of a shift anisotropy
interactions vector from a specified parameter set.
These functions determine specific aspects of a shift anisotropy interactions vector from a specified parameter set .
// Remove any existing intacts. // Copy parameter set // to glean out those for // the specified prefix index // Empty CSA interaction //   Start with 0th interaction //   If we are able to read it //   then we keep looking //     Put into the vector //     Index to next interaction