7 #include "lcdd/util/StringUtil.hh"
10 #include "G4UIcommand.hh"
11 #include "G4UIcmdWithAnInteger.hh"
12 #include "G4UIcmdWithABool.hh"
13 #include "G4UIdirectory.hh"
14 #include "G4UImanager.hh"
33 std::istringstream is((
const char*) newVals);
56 std::vector<std::string> fields;
57 StringUtil::split(newVals,
" ", fields);
71 if (s != std::string(
"")) {
72 flag_set = StringUtil::toBool(s);
88 G4Exception(
"",
"", FatalException,
"LcioHitsCollectionBuilder is null.");
91 G4bool writeCompleteEvent = StringUtil::toBool(s);
96 G4Exception(
"LcioMessenger::setNewValue()",
"", JustWarning,
"Unknown command.");
106 m_lcioDir->SetGuidance(
"LCIO output commands. [SLIC]");
109 m_pathCmd =
new G4UIcommand(
"/lcio/path",
this);
110 m_pathCmd->SetGuidance(
"Set Lcio output path.");
111 p =
new G4UIparameter(
"path",
's',
false);
117 p =
new G4UIparameter(
"filename",
's',
false);
122 m_setLongFlagCmd->SetGuidance(
"Set CHBIT_LONG flag for hit positions in output (default = on).");
123 p =
new G4UIparameter(
"Value",
'b',
true);
129 m_setPDGFlagCmd->SetGuidance(
"Set CHBIT_PDG flag for super-long output with all Mcp contribs (default is aggregated).");
130 p =
new G4UIparameter(
"Value",
'b',
true);
136 m_fileExistsActionCmd->SetGuidance(
"Set action when an Lcio output file exists: fail, overwrite/delete or append.");
137 p =
new G4UIparameter(
"mode",
's',
false);
148 m_autonameCmd->SetGuidance(
"Valid autoname fields: application geometry event eventNumber run binary physics date geant4");
149 p =
new G4UIparameter(
"autoname",
's',
true);
154 m_printEventCmd->SetGuidance(
"Dump information about collections in the event");
static LcioManager * instance()
Builds Lcio hits collections from G4/SLIC event data.
void setPDGFlag(bool pdgFlag=true)
void setLongFlag(bool longFlag=true)
Singleton manager class of LCIO configuration and output file operations.
LcioHitsCollectionBuilder * getHitsCollectionBuilder()
void setFileExistsAction(EFileExistsAction fea)
void enableDumpEvent(bool p=true)
void setRunNumber(int runNumber)
static EFileExistsAction getFileExistsActionFromString(const std::string &fileExists)
void setFilename(const std::string &filename)
void setAutonameFields(const std::vector< std::string > &fields)
void setPath(const std::string &path)
G4UIcommand * m_setPDGFlagCmd
G4UIcmdWithABool * _writeCompleteEventCmd
G4UIdirectory * m_lcioDir
G4UIcommand * m_filenameCmd
G4UIcmdWithABool * m_printEventCmd
LcioMessenger(LcioManager *mgr)
G4UIcommand * m_fileExistsActionCmd
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
G4UIcmdWithAnInteger * m_setRunNumberCmd
G4UIcommand * m_autonameCmd
G4UIcommand * m_setLongFlagCmd