OMSim
Geant4 for IceCube optical module studies
OMSimCommandArgsTable.hh File Reference

Definition of the OMSimCommandArgsTable singleton class, which controls user args. More...

Include dependency graph for OMSimCommandArgsTable.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OMSimCommandArgsTable
 A class used to hold OMSim command arguments with global instance access. More...
 

Macros

#define WRITE_TO_JSON_IF_TYPE_MATCHES(VARIANT, TYPE)
 Writes a key-value pair to a JSON file if the value type matches TYPE. More...
 

Variables

OMSimCommandArgsTableg_commandArgsTable = nullptr
 

Macro Definition Documentation

◆ WRITE_TO_JSON_IF_TYPE_MATCHES

#define WRITE_TO_JSON_IF_TYPE_MATCHES (   VARIANT,
  TYPE 
)
Value:
if (type == typeid(TYPE)) \
{ \
outputFile << "\t\"" << kv.first << "\": "; \
if (typeid(TYPE) == typeid(std::string)) \
{ \
outputFile << "\"" << boost::any_cast<TYPE>(VARIANT) << "\""; \
} \
else \
{ \
outputFile << boost::any_cast<TYPE>(VARIANT); \
} \
}
Note
This macro is used inside the OMSimCommandArgsTable::writeToJson() method.