Cat
Public Member Functions | Private Attributes | List of all members
Options Class Reference

#include <Options.h>

Public Member Functions

 Options ()
 
 ~Options ()
 
void setLogOutputLevel (MsgSvc::MsgLevel logOutputLevel)
 
MsgSvc::MsgLevel logOutputLevel ()
 
void setPrintFreq (unsigned long printFreq)
 
unsigned long printFreq ()
 
void setPlotFreq (unsigned long plotFreq)
 
unsigned long plotFreq ()
 
void setStopOnError (bool stopOnError)
 
bool stopOnError ()
 
void setRunNumber (unsigned long runNumber)
 
unsigned long runNumber ()
 
void setRunNumberManagement (bool runNumberManagement)
 
bool runNumberManagement ()
 
void setCurrentPath (std::string currentPath)
 
std::string currentPath ()
 
void setStoragePath (std::string storagePath)
 
std::string storagePath ()
 
std::string storageFullPath ()
 
void setStorageDir (std::string filename)
 
std::string storageDir ()
 
void setStorageFile (std::string filename=std::string(""))
 
std::string storageFile ()
 
std::string storageFileFullName ()
 
std::string dataFileFullName ()
 
std::string dataFile ()
 
std::string logFile ()
 
void setDataStorage (bool dataStorage)
 
bool dataStorage ()
 
void setLogStorage (bool logStorage)
 
bool logStorage ()
 
void setLogDefFile (std::string defFile)
 
std::string logDefFile ()
 
void setDefFile (std::string def)
 
std::string defFile ()
 
void setNEvt (unsigned long nEvt)
 
unsigned long nEvt ()
 
void setNEvtMax (int nEvtMax)
 
int nEvtMax ()
 
void setTimeMax (unsigned long timeMax)
 
unsigned long timeMax ()
 
void setNErrors (unsigned long nErrors)
 
unsigned long nErrors ()
 
void incRunNumber ()
 
void incNEvt ()
 
void incNErrors ()
 
std::ofstream * stream ()
 
void setStream (std::string file=std::string(""))
 
void print ()
 

Private Attributes

MsgSvc m_log
 
MsgSvc::MsgLevel m_logOutputLevel
 
std::string m_currentPath
 
bool m_dataStorage
 
bool m_logStorage
 
std::string m_storageDir
 
std::string m_storageFile
 
std::string m_storageDefault
 
std::string m_storagePath
 
std::string m_defFile
 
bool m_stopOnError
 
unsigned long m_nEvt
 
unsigned long m_nErrors
 
unsigned long m_printFreq
 
unsigned long m_plotFreq
 
int m_nEvtMax
 
int m_timeMax
 
unsigned long m_runNumber
 
bool m_runNumberManagement
 
bool m_batch
 
std::ofstream * m_stream
 
std::ofstream * m_logStream
 
std::ofstream * m_logDefStream
 
std::string m_logDefFile
 

Detailed Description

Definition at line 25 of file Options.h.

Constructor & Destructor Documentation

◆ Options()

Options::Options ( )

Definition at line 19 of file Options.cpp.

References MsgSvc::INFO, m_logDefStream, m_logStream, m_storageDefault, m_stream, setCurrentPath(), setDataStorage(), setLogDefFile(), setLogOutputLevel(), setLogStorage(), setNErrors(), setNEvt(), setNEvtMax(), setPlotFreq(), setPrintFreq(), setRunNumber(), setRunNumberManagement(), setStorageDir(), setStorageFile(), setStoragePath(), setStream(), and setTimeMax().

19  {
20  m_logStream = 0;
21  m_logDefStream = 0;
22  m_stream = 0;
23 
24  setLogDefFile("session.log");
25  setStream();
26 
28 
29  setNEvtMax ( 100 );
30  setTimeMax ( 100 );
31  setNEvt ( 0 );
32  setNErrors ( 0 );
33  setRunNumber ( 0 );
34  setPrintFreq ( 0 );
35  setPlotFreq ( 0 );
36 
38 
39  setStorageDir("Run");
40 
41  m_storageDefault=std::string("run");
43  setDataStorage ( false );
44  setLogStorage ( false );
45 
46 #ifdef WIN32
47  char buffer[_MAX_PATH];
48  getcwd(buffer,_MAX_PATH);
49  setStoragePath( std::string(buffer) );
50 #else
51  char buffer[256];
52  getcwd(buffer,256);
53  setStoragePath( std::string(buffer)+std::string("/data") );
54 #endif
55 
56  setCurrentPath( std::string(buffer) );
57 
58 }
std::ofstream * m_logStream
Definition: Options.h:459
void setPlotFreq(unsigned long plotFreq)
Definition: Options.h:66
void setStorageDir(std::string filename)
Definition: Options.h:172
void setNEvt(unsigned long nEvt)
Definition: Options.h:309
void setCurrentPath(std::string currentPath)
Definition: Options.h:127
std::ofstream * m_logDefStream
Definition: Options.h:460
void setLogDefFile(std::string defFile)
Definition: Options.h:276
void setLogOutputLevel(MsgSvc::MsgLevel logOutputLevel)
Definition: Options.h:34
void setRunNumberManagement(bool runNumberManagement)
Definition: Options.h:115
void setStoragePath(std::string storagePath)
Definition: Options.h:143
std::string m_storageDefault
Definition: Options.h:443
void setNEvtMax(int nEvtMax)
Definition: Options.h:325
void setLogStorage(bool logStorage)
Definition: Options.h:260
void setPrintFreq(unsigned long printFreq)
Definition: Options.h:50
void setNErrors(unsigned long nErrors)
Definition: Options.h:357
void setStorageFile(std::string filename=std::string(""))
Definition: Options.h:188
void setRunNumber(unsigned long runNumber)
Definition: Options.h:99
void setDataStorage(bool dataStorage)
Definition: Options.h:244
void setStream(std::string file=std::string(""))
Definition: Options.h:400
std::ofstream * m_stream
Definition: Options.h:458
void setTimeMax(unsigned long timeMax)
Definition: Options.h:341

◆ ~Options()

Options::~Options ( )

Definition at line 63 of file Options.cpp.

References m_logDefStream.

63  {
64  if ( 0!=m_logDefStream){
65  m_logDefStream->close();
66  delete m_logDefStream;
68  }
69 }
std::ofstream * m_logDefStream
Definition: Options.h:460

Member Function Documentation

◆ currentPath()

std::string Options::currentPath ( )
inline

Get accessor to member m_currentPath

Returns
the current value of m_currentPath

Definition at line 135 of file Options.h.

References m_currentPath.

Referenced by export_base(), and setCurrentPath().

135  {
136  return m_currentPath;
137  }
std::string m_currentPath
Definition: Options.h:438

◆ dataFile()

std::string Options::dataFile ( )

Get accessor to member m_dataFile

Returns
the current value of m_dataFile

Definition at line 83 of file Options.cpp.

References m_storageFile.

Referenced by dataFileFullName(), and export_base().

83  {
84  std::string id;
85  id.append(std::string(".root"));
86  std::string file = m_storageFile+id;
87  return file;
88 }
std::string m_storageFile
Definition: Options.h:442

◆ dataFileFullName()

std::string Options::dataFileFullName ( )
inline

Get accessor to member m_storageFile

Returns
the current value of m_storageFile

Definition at line 219 of file Options.h.

References dataFile(), logFile(), m_storageFile, and storageFullPath().

Referenced by Processus::closeRootFile(), export_base(), and Processus::openRootFile().

219  {
220  std::string file = storageFullPath();
221  file.append("/");
222  file.append(m_storageFile);
223  file.append(".root");
224  // std::cout << " OPTIONS ->" << file << " " << storageFullPath()<< " " << m_storageFile << std::endl;
225  return file;
226  }
std::string m_storageFile
Definition: Options.h:442
std::string storageFullPath()
Definition: Options.h:159

◆ dataStorage()

bool Options::dataStorage ( )
inline

Get accessor to member m_dataStorage

Returns
the current value of m_dataStorage

Definition at line 252 of file Options.h.

References m_dataStorage.

Referenced by Processus::closeRootFile(), EmulateFE::execute(), export_base(), EmulateFE::initialize(), ADCMeasurement::initialize(), Processus::openRootFile(), Application::prepare(), and setDataStorage().

252  {
253  return m_dataStorage;
254  }
bool m_dataStorage
Definition: Options.h:439

◆ defFile()

std::string Options::defFile ( )
inline

Get accessor to member m_defFile

Returns
the current value of m_defFile

Definition at line 301 of file Options.h.

References m_defFile.

Referenced by export_base(), and setLogDefFile().

301  {
302  return m_defFile;
303  }
std::string m_defFile
Definition: Options.h:445

◆ incNErrors()

void Options::incNErrors ( )
inline

Incrementation of the current number of errors

Definition at line 384 of file Options.h.

References nErrors(), and setNErrors().

Referenced by export_base(), and Application::loop().

384  {
385  setNErrors ( nErrors() + 1 );
386  }
unsigned long nErrors()
Definition: Options.h:365
void setNErrors(unsigned long nErrors)
Definition: Options.h:357

◆ incNEvt()

void Options::incNEvt ( )
inline

Incrementation of the current evt number

Definition at line 377 of file Options.h.

References nEvt(), and setNEvt().

Referenced by export_base(), and Application::loop().

377  {
378  setNEvt ( nEvt() + 1 );
379  }
unsigned long nEvt()
Definition: Options.h:317
void setNEvt(unsigned long nEvt)
Definition: Options.h:309

◆ incRunNumber()

void Options::incRunNumber ( )

Incrementation of the current Run number

Definition at line 74 of file Options.cpp.

References runNumber(), and setRunNumber().

Referenced by export_base(), nErrors(), and Application::terminate().

74  {
75  setRunNumber( runNumber()+1 );
76 }
unsigned long runNumber()
Definition: Options.h:107
void setRunNumber(unsigned long runNumber)
Definition: Options.h:99

◆ logDefFile()

std::string Options::logDefFile ( )
inline

Get accessor to member m_logDefStorage

Returns
the current value of m_logDefStorage

Definition at line 285 of file Options.h.

References m_logDefFile.

Referenced by export_base().

285  {
286  return m_logDefFile;
287  }
std::string m_logDefFile
Definition: Options.h:461

◆ logFile()

std::string Options::logFile ( )

Get accessor to member m_logFile

Returns
the current value of m_logFile

Definition at line 95 of file Options.cpp.

References m_storageFile.

Referenced by dataFileFullName(), and export_base().

95  {
96  std::string id;
97  id.append(std::string(".log"));
98  std::string file = m_storageFile+id;
99  return file;
100 }
std::string m_storageFile
Definition: Options.h:442

◆ logOutputLevel()

MsgSvc::MsgLevel Options::logOutputLevel ( )
inline

Get accessor to member m_logOutputLevel

Returns
the current value of m_logOutputLevel

Definition at line 42 of file Options.h.

References m_logOutputLevel.

Referenced by export_base(), and setLogOutputLevel().

42  {
43  return m_logOutputLevel;
44  }
MsgSvc::MsgLevel m_logOutputLevel
Definition: Options.h:436

◆ logStorage()

bool Options::logStorage ( )
inline

Get accessor to member m_logStorage

Returns
the current value of m_logStorage

Definition at line 268 of file Options.h.

References m_logStorage.

Referenced by export_base(), Application::prepare(), setLogStorage(), setStream(), and Application::terminate().

268  {
269  return m_logStorage;
270  }
bool m_logStorage
Definition: Options.h:440

◆ nErrors()

unsigned long Options::nErrors ( )
inline

Get accessor to member m_nErrors

Returns
the current value of m_nErrors

Definition at line 365 of file Options.h.

References incRunNumber(), and m_nErrors.

Referenced by Processus::endProcessing(), export_base(), incNErrors(), Application::loop(), setNErrors(), Application::setState(), and Processus::setState().

365  {
366  return m_nErrors;
367  }
unsigned long m_nErrors
Definition: Options.h:448

◆ nEvt()

unsigned long Options::nEvt ( )
inline

Get accessor to member m_nEvt

Returns
the current value of m_nEvt

Definition at line 317 of file Options.h.

References m_nEvt.

Referenced by Processus::endProcessing(), Acquisition::execute(), ADCMeasurement::execute(), CurrentMeasurement::execute(), export_base(), incNEvt(), Application::loop(), setNEvt(), Application::setState(), Processus::setState(), Application::svcRunning(), and Application::terminate().

317  {
318  return m_nEvt;
319  }
unsigned long m_nEvt
Definition: Options.h:447

◆ nEvtMax()

int Options::nEvtMax ( )
inline

Get accessor to member m_nEvtMax

Returns
the current value of m_nEvtMax

Definition at line 333 of file Options.h.

References m_nEvtMax.

Referenced by export_base(), setNEvtMax(), Application::setState(), and Application::svcRunning().

333  {
334  return m_nEvtMax;
335  }
int m_nEvtMax
Definition: Options.h:451

◆ plotFreq()

unsigned long Options::plotFreq ( )
inline

Get accessor to member m_plotFreq

Returns
the current value of m_plotFreq

Definition at line 74 of file Options.h.

References m_plotFreq.

Referenced by export_base(), and setPlotFreq().

74  {
75  return m_plotFreq;
76  }
unsigned long m_plotFreq
Definition: Options.h:450

◆ print()

void Options::print ( )

Definition at line 107 of file Options.cpp.

References MsgSvc::INFO, m_batch, m_currentPath, m_dataStorage, m_defFile, m_log, m_logDefFile, m_logStorage, m_nErrors, m_nEvt, m_nEvtMax, m_plotFreq, m_printFreq, m_runNumber, m_runNumberManagement, m_stopOnError, m_storageDefault, m_storageDir, m_storageFile, m_storagePath, and MsgSvc::msgSvc().

Referenced by export_base(), and setStream().

107  {
108  char output[250];
109  sprintf(output,"Events to process : %ld",m_nEvtMax); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< number of events to process
110  sprintf(output,"Current run number : %ld",m_runNumber); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< Current Run Number
111  sprintf(output,"Events processed : %ld",m_nEvt); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< number of events processed
112  sprintf(output,"Number of errors : %ld",m_nErrors); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< number of errors in present process
113  sprintf(output,"Stop on error flag : %i",m_stopOnError); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");
114  sprintf(output,"Printout frequency : %ld",m_printFreq); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< Evt Number Output Frequency
115  sprintf(output,"Plot update frequency : %ld",m_plotFreq); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< Evt Number plot Frequency
116  sprintf(output,"Automatic run number flag : %i",m_runNumberManagement); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< Run Number Automatically Managed
117  sprintf(output,"Storage flag : %i",m_dataStorage); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");
118  sprintf(output,"Storage filename : %s",m_storageFile.c_str()); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< data & log file name for storage
119  sprintf(output,"Storage directory : %s",m_storageDir.c_str()); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< data & log directory name for storage
120  sprintf(output,"Storage default filename : %s",m_storageDefault.c_str()); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< data & log default file name for storage
121  sprintf(output,"Storage path : %s",m_storagePath.c_str()); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< data & log file path for storage
122  sprintf(output,"Log Storage flag : %i",m_logStorage); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< Log Storage boolean
123  sprintf(output,"Log default filename : %s",m_logDefFile.c_str()); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< default log file name for storage
124  sprintf(output,"Application current path : %s",m_currentPath.c_str()); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");
125  sprintf(output,"Current definition filename : %s",m_defFile.c_str()); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< Definition file
126  sprintf(output,"Batch run flag : %i",m_batch); m_log.msgSvc(MsgSvc::INFO,output,"Options::help");//< batch mode
127 }
bool m_runNumberManagement
Definition: Options.h:455
bool m_dataStorage
Definition: Options.h:439
std::string m_storageDir
Definition: Options.h:441
bool m_logStorage
Definition: Options.h:440
unsigned long m_nEvt
Definition: Options.h:447
std::string m_storagePath
Definition: Options.h:444
unsigned long m_plotFreq
Definition: Options.h:450
std::string m_defFile
Definition: Options.h:445
unsigned long m_runNumber
Definition: Options.h:453
std::string m_logDefFile
Definition: Options.h:461
int m_nEvtMax
Definition: Options.h:451
std::string m_currentPath
Definition: Options.h:438
std::string m_storageDefault
Definition: Options.h:443
std::string m_storageFile
Definition: Options.h:442
bool m_batch
Definition: Options.h:456
unsigned long m_printFreq
Definition: Options.h:449
MsgSvc m_log
Definition: Options.h:435
unsigned long m_nErrors
Definition: Options.h:448
void msgSvc(MsgSvc::MsgLevel, std::string, std::string call=std::string(""))
Definition: MsgSvc.cpp:42
bool m_stopOnError
Definition: Options.h:446

◆ printFreq()

unsigned long Options::printFreq ( )
inline

Get accessor to member m_printFreq

Returns
the current value of m_printFreq

Definition at line 58 of file Options.h.

References m_printFreq.

Referenced by export_base(), Application::loop(), and setPrintFreq().

58  {
59  return m_printFreq;
60  }
unsigned long m_printFreq
Definition: Options.h:449

◆ runNumber()

unsigned long Options::runNumber ( )
inline

Get accessor to member m_runNumber

Returns
the current value of m_runNumber

Definition at line 107 of file Options.h.

References m_runNumber.

Referenced by Application::bookkeeping(), Processus::endProcessing(), export_base(), incRunNumber(), Acquisition::initialize(), CurrentMeasurement::initialize(), ADCMeasurement::initialize(), setRunNumber(), and Application::setState().

107  {
108  return m_runNumber;
109  }
unsigned long m_runNumber
Definition: Options.h:453

◆ runNumberManagement()

bool Options::runNumberManagement ( )
inline

Get accessor to member m_runNumberManagement

Returns
the current value of m_runNumberManagement

Definition at line 123 of file Options.h.

References m_runNumberManagement.

Referenced by export_base(), setRunNumberManagement(), and Application::terminate().

123  {
124  return m_runNumberManagement;
125  }
bool m_runNumberManagement
Definition: Options.h:455

◆ setCurrentPath()

void Options::setCurrentPath ( std::string  currentPath)
inline

Definition at line 127 of file Options.h.

References currentPath(), and m_currentPath.

Referenced by export_base(), and Options().

127  {
129  }
std::string currentPath()
Definition: Options.h:135
std::string m_currentPath
Definition: Options.h:438

◆ setDataStorage()

void Options::setDataStorage ( bool  dataStorage)
inline

Set accessor to member m_dataStorage

Parameters
dataStoragethe new value for m_dataStorage

Definition at line 244 of file Options.h.

References dataStorage(), and m_dataStorage.

Referenced by export_base(), and Options().

244  {
246  }
bool m_dataStorage
Definition: Options.h:439
bool dataStorage()
Definition: Options.h:252

◆ setDefFile()

void Options::setDefFile ( std::string  def)
inline

Set accessor to member m_defFile

Parameters
defFilethe new value for m_defFile

Definition at line 293 of file Options.h.

References m_defFile.

Referenced by export_base().

293  {
294  m_defFile = def;
295  }
std::string m_defFile
Definition: Options.h:445

◆ setLogDefFile()

void Options::setLogDefFile ( std::string  defFile)
inline

Set accessor to member m_logDefFile

Parameters
logDefStoragethe new value for m_logDefFile

Definition at line 276 of file Options.h.

References defFile(), m_logDefFile, and m_logDefStream.

Referenced by export_base(), and Options().

276  {
278  m_logDefStream = new std::ofstream( defFile.c_str() );
279  }
std::ofstream * m_logDefStream
Definition: Options.h:460
std::string m_logDefFile
Definition: Options.h:461
std::string defFile()
Definition: Options.h:301

◆ setLogOutputLevel()

void Options::setLogOutputLevel ( MsgSvc::MsgLevel  logOutputLevel)
inline

Set accessor to member m_logOutputLevel

Parameters
logOutputLevelthe new value for m_logOutputLevel

Definition at line 34 of file Options.h.

References logOutputLevel(), and m_logOutputLevel.

Referenced by export_base(), and Options().

34  {
36  }
MsgSvc::MsgLevel m_logOutputLevel
Definition: Options.h:436
MsgSvc::MsgLevel logOutputLevel()
Definition: Options.h:42

◆ setLogStorage()

void Options::setLogStorage ( bool  logStorage)
inline

Set accessor to member m_logStorage

Parameters
logStoragethe new value for m_logStorage

Definition at line 260 of file Options.h.

References logStorage(), and m_logStorage.

Referenced by export_base(), and Options().

260  {
262  }
bool m_logStorage
Definition: Options.h:440
bool logStorage()
Definition: Options.h:268

◆ setNErrors()

void Options::setNErrors ( unsigned long  nErrors)
inline

Set accessor to member m_nErrors

Parameters
nErrorsthe new value for m_nErrors

Definition at line 357 of file Options.h.

References m_nErrors, and nErrors().

Referenced by export_base(), incNErrors(), Options(), Application::prepare(), and Processus::startProcessing().

357  {
358  m_nErrors = nErrors;
359  }
unsigned long nErrors()
Definition: Options.h:365
unsigned long m_nErrors
Definition: Options.h:448

◆ setNEvt()

void Options::setNEvt ( unsigned long  nEvt)
inline

Set accessor to member m_nEvt

Parameters
nEvtthe new value for m_nEvt

Definition at line 309 of file Options.h.

References m_nEvt, and nEvt().

Referenced by export_base(), incNEvt(), Options(), Application::prepare(), and Application::terminate().

309  {
310  m_nEvt = nEvt;
311  }
unsigned long nEvt()
Definition: Options.h:317
unsigned long m_nEvt
Definition: Options.h:447

◆ setNEvtMax()

void Options::setNEvtMax ( int  nEvtMax)
inline

Set accessor to member m_nEvtMax

Parameters
nEvtMaxthe new value for m_nEvtMax

Definition at line 325 of file Options.h.

References m_nEvtMax, and nEvtMax().

Referenced by export_base(), Options(), and Application::prepare().

325  {
326  m_nEvtMax = nEvtMax;
327  }
int nEvtMax()
Definition: Options.h:333
int m_nEvtMax
Definition: Options.h:451

◆ setPlotFreq()

void Options::setPlotFreq ( unsigned long  plotFreq)
inline

Set accessor to member m_plotFreq

Parameters
plotFreqthe new value for m_plotFreq

Definition at line 66 of file Options.h.

References m_plotFreq, and plotFreq().

Referenced by export_base(), and Options().

66  {
68  }
unsigned long m_plotFreq
Definition: Options.h:450
unsigned long plotFreq()
Definition: Options.h:74

◆ setPrintFreq()

void Options::setPrintFreq ( unsigned long  printFreq)
inline

Set accessor to member m_printFreq

Parameters
PrintFreqthe new value for m_PrintFreq

Definition at line 50 of file Options.h.

References m_printFreq, and printFreq().

Referenced by export_base(), and Options().

50  {
52  }
unsigned long printFreq()
Definition: Options.h:58
unsigned long m_printFreq
Definition: Options.h:449

◆ setRunNumber()

void Options::setRunNumber ( unsigned long  runNumber)
inline

Set accessor to member m_runNumber

Parameters
runNumberthe new value for m_runNumber

Definition at line 99 of file Options.h.

References m_runNumber, and runNumber().

Referenced by export_base(), incRunNumber(), Application::loadHistoryFile(), and Options().

99  {
101  }
unsigned long runNumber()
Definition: Options.h:107
unsigned long m_runNumber
Definition: Options.h:453

◆ setRunNumberManagement()

void Options::setRunNumberManagement ( bool  runNumberManagement)
inline

Set accessor to member m_runNumberManagement

Parameters
runNumberManagementthe new value for m_runNumberManagement

Definition at line 115 of file Options.h.

References m_runNumberManagement, and runNumberManagement().

Referenced by export_base(), and Options().

115  {
117  }
bool m_runNumberManagement
Definition: Options.h:455
bool runNumberManagement()
Definition: Options.h:123

◆ setStopOnError()

void Options::setStopOnError ( bool  stopOnError)
inline

Set accessor to member m_stopOnError

Parameters
stopOnErrorthe new value for m_stopOnError

Definition at line 83 of file Options.h.

References m_stopOnError, and stopOnError().

Referenced by export_base().

83  {
85  }
bool stopOnError()
Definition: Options.h:91
bool m_stopOnError
Definition: Options.h:446

◆ setStorageDir()

void Options::setStorageDir ( std::string  filename)
inline

Set accessor to member m_storageDir

Parameters
StorageDirthe new value for m_storageDir

Definition at line 172 of file Options.h.

References m_storageDir.

Referenced by export_base(), and Options().

172  {
173  m_storageDir = filename;
174  }
std::string m_storageDir
Definition: Options.h:441

◆ setStorageFile()

void Options::setStorageFile ( std::string  filename = std::string(""))
inline

Set accessor to member m_StorageFile

Parameters
StorageFilethe new value for m_StorageFile

Definition at line 188 of file Options.h.

References m_storageDefault, and m_storageFile.

Referenced by export_base(), Options(), Application::prepare(), and setStream().

188  {
189  if (std::string("")==filename) {
191  return;
192  }
193  m_storageFile = filename;
194  }
std::string m_storageDefault
Definition: Options.h:443
std::string m_storageFile
Definition: Options.h:442

◆ setStoragePath()

void Options::setStoragePath ( std::string  storagePath)
inline

Set accessor to member m_storagePath

Parameters
storagePaththe new value for m_storagePath

Definition at line 143 of file Options.h.

References m_storagePath, and storagePath().

Referenced by export_base(), and Options().

143  {
145  }
std::string m_storagePath
Definition: Options.h:444
std::string storagePath()
Definition: Options.h:151

◆ setStream()

void Options::setStream ( std::string  file = std::string(""))
inline

Set accessor to member m_nEvt

Parameters
nEvtthe new value for m_nEvt

Definition at line 400 of file Options.h.

References logStorage(), m_logDefStream, m_logStream, m_stream, print(), setStorageFile(), and storageFileFullName().

Referenced by export_base(), Options(), Application::prepare(), and Application::terminate().

400  {
401  if (file.compare("")==0 ) {
402  if (m_stream == m_logStream && 0!=m_logStream ) {
403  m_logStream->close();
404  delete m_logStream;
405  m_logStream = 0;
406  }
408  }
409  else {
410  if ( !logStorage () ) {
411  setStorageFile ( file );
412  }
413  else {
414  if ( 0!=m_logStream) {
415  m_logStream->close();
416  delete m_logStream;
417  m_logStream=0;
418  }
419  setStorageFile(file);
420  std::string name = storageFileFullName();
421  name.append(".log");
422  m_logStream = new std::ofstream( name.c_str() );
424  }
425  }
426  }
std::ofstream * m_logStream
Definition: Options.h:459
std::ofstream * m_logDefStream
Definition: Options.h:460
bool logStorage()
Definition: Options.h:268
void setStorageFile(std::string filename=std::string(""))
Definition: Options.h:188
std::ofstream * m_stream
Definition: Options.h:458
std::string storageFileFullName()
Definition: Options.h:208

◆ setTimeMax()

void Options::setTimeMax ( unsigned long  timeMax)
inline

Set accessor to member m_timeMax

Parameters
timeMaxthe new value for m_timeMax

Definition at line 341 of file Options.h.

References m_timeMax, and timeMax().

Referenced by Options(), and Application::prepare().

341  {
342  m_timeMax = timeMax;
343  }
unsigned long timeMax()
Definition: Options.h:349
int m_timeMax
Definition: Options.h:452

◆ stopOnError()

bool Options::stopOnError ( )
inline

Get accessor to member m_stopOnError

Returns
the current value of m_stopOnError

Definition at line 91 of file Options.h.

References m_stopOnError.

Referenced by export_base(), Application::loop(), and setStopOnError().

91  {
92  return m_stopOnError;
93  }
bool m_stopOnError
Definition: Options.h:446

◆ storageDir()

std::string Options::storageDir ( )
inline

Get accessor to member m_storageDir

Returns
the current value of m_storageDir

Definition at line 180 of file Options.h.

References m_storageDir.

Referenced by export_base().

180  {
181  return m_storageDir;
182  }
std::string m_storageDir
Definition: Options.h:441

◆ storageFile()

std::string Options::storageFile ( )
inline

Get accessor to member m_storageFile

Returns
the current value of m_storageFile

Definition at line 200 of file Options.h.

References m_storageFile.

Referenced by export_base(), and Application::prepare().

200  {
201  return m_storageFile;
202  }
std::string m_storageFile
Definition: Options.h:442

◆ storageFileFullName()

std::string Options::storageFileFullName ( )
inline

Get accessor to member m_storageFile

Returns
the current value of m_storageFile

Definition at line 208 of file Options.h.

References m_storageFile, and storageFullPath().

Referenced by export_base(), and setStream().

208  {
209  std::string file = storageFullPath();
210  file.append("/");
211  file.append(m_storageFile);
212  return file;
213  }
std::string m_storageFile
Definition: Options.h:442
std::string storageFullPath()
Definition: Options.h:159

◆ storageFullPath()

std::string Options::storageFullPath ( )
inline

Get accessor to member m_storagePath

Returns
the current value of m_storagePath

Definition at line 159 of file Options.h.

References itos(), m_runNumber, m_storageDir, and m_storagePath.

Referenced by dataFileFullName(), export_base(), EmulateFE::generateFile(), Application::prepare(), and storageFileFullName().

159  {
160  std::string path = m_storagePath;
161  path.append("/");
162  path.append(m_storageDir);
163  path.append("_");
164  path.append(itos(m_runNumber));
165  return path;
166  }
std::string itos(int)
Definition: Tools.cpp:46
std::string m_storageDir
Definition: Options.h:441
std::string m_storagePath
Definition: Options.h:444
unsigned long m_runNumber
Definition: Options.h:453

◆ storagePath()

std::string Options::storagePath ( )
inline

Get accessor to member m_storagePath

Returns
the current value of m_storagePath

Definition at line 151 of file Options.h.

References m_storagePath.

Referenced by export_base(), and setStoragePath().

151  {
152  return m_storagePath;
153  }
std::string m_storagePath
Definition: Options.h:444

◆ stream()

std::ofstream* Options::stream ( )
inline

Get accessor to member m_logStream

Returns
the current value of m_logStream

Definition at line 392 of file Options.h.

References m_stream.

392  {
393  return m_stream;
394  }
std::ofstream * m_stream
Definition: Options.h:458

◆ timeMax()

unsigned long Options::timeMax ( )
inline

Get accessor to member m_timeMax

Returns
the current value of m_timeMax

Definition at line 349 of file Options.h.

References m_timeMax.

Referenced by setTimeMax().

349  {
350  return m_timeMax;
351  }
int m_timeMax
Definition: Options.h:452

Member Data Documentation

◆ m_batch

bool Options::m_batch
private

Definition at line 456 of file Options.h.

Referenced by print().

◆ m_currentPath

std::string Options::m_currentPath
private

Definition at line 438 of file Options.h.

Referenced by currentPath(), print(), and setCurrentPath().

◆ m_dataStorage

bool Options::m_dataStorage
private

Definition at line 439 of file Options.h.

Referenced by dataStorage(), print(), and setDataStorage().

◆ m_defFile

std::string Options::m_defFile
private

Definition at line 445 of file Options.h.

Referenced by defFile(), print(), and setDefFile().

◆ m_log

MsgSvc Options::m_log
private

Definition at line 435 of file Options.h.

Referenced by print().

◆ m_logDefFile

std::string Options::m_logDefFile
private

Definition at line 461 of file Options.h.

Referenced by logDefFile(), print(), and setLogDefFile().

◆ m_logDefStream

std::ofstream* Options::m_logDefStream
private

Definition at line 460 of file Options.h.

Referenced by Options(), setLogDefFile(), setStream(), and ~Options().

◆ m_logOutputLevel

MsgSvc::MsgLevel Options::m_logOutputLevel
private

Definition at line 436 of file Options.h.

Referenced by logOutputLevel(), and setLogOutputLevel().

◆ m_logStorage

bool Options::m_logStorage
private

Definition at line 440 of file Options.h.

Referenced by logStorage(), print(), and setLogStorage().

◆ m_logStream

std::ofstream* Options::m_logStream
private

Definition at line 459 of file Options.h.

Referenced by Options(), and setStream().

◆ m_nErrors

unsigned long Options::m_nErrors
private

Definition at line 448 of file Options.h.

Referenced by nErrors(), print(), and setNErrors().

◆ m_nEvt

unsigned long Options::m_nEvt
private

Definition at line 447 of file Options.h.

Referenced by nEvt(), print(), and setNEvt().

◆ m_nEvtMax

int Options::m_nEvtMax
private

Definition at line 451 of file Options.h.

Referenced by nEvtMax(), print(), and setNEvtMax().

◆ m_plotFreq

unsigned long Options::m_plotFreq
private

Definition at line 450 of file Options.h.

Referenced by plotFreq(), print(), and setPlotFreq().

◆ m_printFreq

unsigned long Options::m_printFreq
private

Definition at line 449 of file Options.h.

Referenced by print(), printFreq(), and setPrintFreq().

◆ m_runNumber

unsigned long Options::m_runNumber
private

Definition at line 453 of file Options.h.

Referenced by print(), runNumber(), setRunNumber(), and storageFullPath().

◆ m_runNumberManagement

bool Options::m_runNumberManagement
private

Definition at line 455 of file Options.h.

Referenced by print(), runNumberManagement(), and setRunNumberManagement().

◆ m_stopOnError

bool Options::m_stopOnError
private

Definition at line 446 of file Options.h.

Referenced by print(), setStopOnError(), and stopOnError().

◆ m_storageDefault

std::string Options::m_storageDefault
private

Definition at line 443 of file Options.h.

Referenced by Options(), print(), and setStorageFile().

◆ m_storageDir

std::string Options::m_storageDir
private

Definition at line 441 of file Options.h.

Referenced by print(), setStorageDir(), storageDir(), and storageFullPath().

◆ m_storageFile

std::string Options::m_storageFile
private

◆ m_storagePath

std::string Options::m_storagePath
private

Definition at line 444 of file Options.h.

Referenced by print(), setStoragePath(), storageFullPath(), and storagePath().

◆ m_stream

std::ofstream* Options::m_stream
private

Definition at line 458 of file Options.h.

Referenced by Options(), setStream(), and stream().

◆ m_timeMax

int Options::m_timeMax
private

Definition at line 452 of file Options.h.

Referenced by setTimeMax(), and timeMax().


The documentation for this class was generated from the following files: