17 #include "GENIE/Utils/StringUtils.h" 19 #include "GENIE/Framework/Utils/StringUtils.h" 22 #include "cetlib_except/exception.h" 28 : fRndmGen(new TRandom3), fIsOwned(true), fIsSeeded(false)
35 size_t nstrs = strs.size();
36 for (
size_t i=0; i<nstrs; ++i) {
37 if ( strs[i] ==
"seed" ) {
40 <<
"EvtTimeShiftI sorry too few values for '" << strs[i] <<
"'";
43 const char* arg = strs[i+1].c_str();
44 UInt_t
seed = atoi(arg);
46 <<
"EvtTimeShiftI set seed to " <<
seed;
72 std::vector<std::string> strs;
73 if ( config ==
"" )
return strs;
75 std::string configLocal = config;
79 std::transform(configLocal.begin(),configLocal.end(),
80 configLocal.begin(),::tolower);
83 strs = genie::utils::str::Split(configLocal,
"\t\n ,;=(){}[]");
86 strs.erase(std::remove_if(strs.begin(), strs.end(),
87 [](
const std::string&
x) {
92 std::ostringstream msgx;
93 msgx <<
"Config elements:" << std::endl;
94 for (
size_t j=0; j<strs.size(); ++j) {
95 msgx <<
" [" << std::setw(3) << j <<
"] -->" << strs[j] <<
"<--\n";
void SetRandomGenerator(TRandom *gen, bool isOwned)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::vector< std::string > GetConfigTokens(const std::string &config)
EvtTimeShiftI(const std::string &config)
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
Physics generators for neutrinos, cosmic rays, and others.