35 : outputName_m(outfn),
42 singlemode_m(singlemode),
53 double radius = std::hypot(R(0), R(1));
70 bool globFinished =
false;
120 double globPeakRadius = 0.0;
121 int globRegister = 0;
132 if (globRegister > 0)
133 peaks_m.push_back(globPeakRadius /
double(globRegister));
147 int bin =
static_cast<int>(std::abs(*it -
min_m) * invBinWidth);
148 if (bin < 0 || (
unsigned int)bin >=
nBins_m)
157 reduce(locHist.data(),
globHist_m.data(), locHist.size(), std::plus<double>());
183 hos_m <<
"# Histogram bin counts (min, max, nbins, binsize) " <<
min_m <<
" mm " <<
max_m
Inform & level2(Inform &inf)
Inform & endl(Inform &inf)
std::string::iterator iterator
KOKKOS_INLINE_FUNCTION Vector< T, Dim > max(const Vector< T, Dim > &a, const Vector< T, Dim > &b)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > min(const Vector< T, Dim > &a, const Vector< T, Dim > &b)
std::unique_ptr< mpi::Communicator > Comm
void checkAndAddOutputFileName(const std::string &outfn)
checks the output file names of all items to avoid duplicates
static OpalData * getInstance()
void addParticle(const Vector_t< double, 3 > &R)
std::vector< double > container_t
void open_m()
Open output file.
std::list< double > peaks_m
std::ofstream hos_m
used to write out the histrogram
std::ofstream os_m
used to write out the data
double binWidth_m
Bin width in mm.
container_t globHist_m
global histogram values
double min_m
histogram size
unsigned int nBins_m
Number of bins.
std::string outputName_m
Element/probe name, for name output file.
void append_m()
Open output file in append mode.
std::string hist_m
histogram filename with extension (.hist)
std::string fileName_m
filename with extension (.peaks)
void evaluate(const int &turn)
void saveASCII_m()
Write to output file.
void close_m()
Close output file.