40 if ( m_optMgr.
evtMax() == 0 ) {
41 std::cout <<
"[DistBossServer] EvtMax = 0, exit now!" << std::endl;
45 std::cout <<
"[DistBossServer] Starting server: " << m_serverName << std::endl;
49 m_readerRpc = new ReaderRpc<RawFileReader>(m_svc[0], m_optMgr.inputFiles(), m_optMgr.evtMax());
52 std::cout <<
"[DistBossServer] Simulation is not supported by DistBoss yet!" << std::endl;
57 std::cout <<
"[DistBossServer] Root input files are not supported by DistBoss yet!" << std::endl;
63 const std::vector<int>& outputs = m_optMgr.
outputTypes();
64 for ( std::vector<int>::const_iterator it = outputs.begin(); it != outputs.end(); ++it ) {
67 m_writerRpcs.push_back(new WriterRpc<RootFileWriter>(m_svc[3], m_optMgr.dstFile()));
70 m_writerRpcs.push_back(new WriterRpc<RootFileWriter>(m_svc[4], m_optMgr.recFile()));
83 m_optMgr.clientOptsTemplate( m_serverName );
104 DimServer::addExitHandler( m_exitHandler );
105 DimServer::addErrorHandler( m_errorHandler );
107 DimServer::start(m_serverName.c_str());
112 for (
unsigned int i = 0; i < m_writerRpcs.size(); ++i ) {
113 nClients = m_writerRpcs[i]->wait_to_end();