Histogram::Histogram( const VesselOptions& da ): ShortcutVessel(da) { bool norm; parseFlag("NORM",norm); std::string normstr=""; if(norm) normstr=" NORM"; std::vector<std::string> bins; HistogramBead::generateBins( getAllInput(), "", bins ); for(unsigned i=0;i<bins.size();++i) addVessel("BETWEEN",bins[i] + normstr); }
LessThan::LessThan( const VesselOptions& da ) : FunctionVessel(da) { usetol=true; if( getAction()->isPeriodic() ) error("LESS_THAN is not a meaningful option for periodic variables"); std::string errormsg; sf.set( getAllInput(), errormsg ); if( errormsg.size()!=0 ) error( errormsg ); }
Between::Between( const VesselOptions& da ) : FunctionVessel(da) { usetol=true; bool isPeriodic=getAction()->isPeriodic(); double min, max; std::string str_min, str_max; if( isPeriodic ) { getAction()->retrieveDomain( str_min, str_max ); Tools::convert(str_min,min); Tools::convert(str_max,max); } parseFlag("NORM",norm); std::string errormsg; hist.set( getAllInput(),errormsg ); if( !isPeriodic ) hist.isNotPeriodic(); else hist.isPeriodic( min, max ); if( errormsg.size()!=0 ) error( errormsg ); }