13 static auto m =
new std::map<std::string, const ISyst*>;
23 std::cout <<
"SystRegistry: Warning: systematic '" << name
24 <<
"' registered multiple times." << std::endl
25 <<
"Check you declared it with 'extern' in the .h and "
26 <<
"instantiated it in the .cxx and check for other ISysts "
27 <<
"that happen to have the same name." << std::endl;
42 if(it ==
Map().end()){
43 std::cout <<
"SystRegistry: Error: unregistering ISyst '"
44 << s->
ShortName() <<
"' that was never registered!"
50 if(it->second)
Map().erase(it);
57 auto it =
Map().find(s);
59 if(allowFail)
return 0;
60 std::cout <<
"SystRegistry: Error: Syst '" << s <<
"' not found. "
61 <<
"Pass allowFail=true to return NULL in this case."
66 const ISyst* ret = it->second;
69 std::cout <<
"SystRegistry: Error: Syst '" << s
70 <<
"' was registered multiple times. Refusing to return a"
71 <<
" random instance. Go fix the syst registration."
87 std::cout << abi::__cxa_demangle(
typeid(*it.second).name(), 0, 0, 0)
88 <<
" at " << it.second << std::endl;
91 std::cout <<
"MULTIPLY REGISTERED!" << std::endl;
process_name opflashCryoW ana
Encapsulate code to systematically shift a caf::StandardRecord.
virtual std::string ShortName() const final
The name printed out to the screen.
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...
static void UnRegister(const ISyst *s)
static std::map< std::string, const ISyst * > & Map()
static void Register(const ISyst *s)
auto end(FixedBins< T, C > const &) noexcept
static const ISyst * ShortNameToSyst(const std::string &s, bool allowFail=false)
then echo File list $list not found else cat $list while read file do echo $file sed s
std::size_t count(Cont const &cont)
BEGIN_PROLOG could also be cout