40 template<
class ...Args,
class JContainer_t>
42 const JContainer_t& container,
45 return getIndex(args...) * container.getSize() + index;
53 int main(
const int argc,
const char **argv)
58 typedef JGrid<double> JGrid_t;
61 JOscParametersGrid parameterGrids;
73 =
"oscillation_parameters.%.txt";
74 zap[
'w'] =
make_field(wildcard,
"wildcard character")
76 zap[
'@'] =
make_field(parameterGrids,
"oscillation parameter grids")
77 = JOscParametersGrid(
true);
83 catch(
const exception& error) {
84 FATAL(error.what() << endl);
90 if (pos == std::string::npos) {
91 FATAL(
"Given output file name must contain the given wildcard character " << wildcard);
94 const JGrid_t& sinsqTh12 = parameterGrids.sinsqTh12;
95 const JGrid_t& sinsqTh13 = parameterGrids.sinsqTh13;
96 const JGrid_t& sinsqTh23 = parameterGrids.sinsqTh23;
97 const JGrid_t& deltaCP = parameterGrids.deltaCP;
98 const JGrid_t& dM21sq = parameterGrids.dM21sq;
99 const JGrid_t& dM31sq = parameterGrids.dM31sq;
101 const int N = (sinsqTh12.getSize() *
102 sinsqTh13.getSize() *
103 sinsqTh23.getSize() *
110 NOTICE(
"Writing " <<
N <<
" oscillation parameters files" << endl);
114 for (
int i1 = 0; i1 != dM21sq.getSize(); ++i1) {
118 for (
int i2 = 0; i2 != dM31sq.getSize(); ++i2) {
122 for (
int i3 = 0; i3 != deltaCP.getSize(); ++i3) {
126 for (
int i4 = 0; i4 != sinsqTh12.getSize(); ++i4) {
130 for (
int i5 = 0; i5 != sinsqTh13.getSize(); ++i5) {
134 for (
int i6 = 0; i6 != sinsqTh23.getSize(); ++i6) {
138 const int index = (
getIndex(i6, sinsqTh23,
147 ofstream out(filename.c_str());
Utility class to parse command line options.
int main(int argc, char *argv[])
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
#define MAKE_STRING(A)
Make string.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getIndex()
Get index for user I/O manipulation.
General purpose messaging.
Auxiliary data structure for sequence of same character.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Utility class to parse command line options.
std::string to_string(const T &value)
Convert value to string.