45 if (inman->Name() == InputManager->
Name())
47 std::cout <<
"InputManager " << InputManager->
Name() <<
" allready in list" << std::endl;
54 std::cout <<
"Registering InputManager " << InputManager->
Name() << std::endl;
56 m_InManager.push_back(InputManager);
67 if (name == inman->Name())
72 std::cout <<
Name() <<
": Could not find InputManager" << name << std::endl;
82 int resetnodetree = 0;
104 if (!hassync && iter->HasSyncObject())
106 hassync = iter->HasSyncObject();
110 if (iter->HasSyncObject())
112 if (hassync != iter->HasSyncObject())
119 else if (hassync < 0)
149 if (iret || iretsync)
160 unsigned inputmgr_cnt = 0;
161 std::vector<Fun4AllInputManager *>::const_iterator InIter;
167 for (InIter = m_InManager.begin(); InIter != m_InManager.end(); ++InIter)
171 (*InIter)->PushBackEvents(1);
175 if ((*InIter)->IsOpen())
177 (*InIter)->fileclose();
179 int ireset = (*InIter)->ResetFileList();
182 std::cout <<
"Resetting input manager " << (*InIter)->Name() <<
" failed during Repeat" << std::endl;
196 InIter = m_InManager.begin();
201 std::cout << (*InIter)->Name() <<
": return code: " << iter << std::endl;
205 (*InIter)->PushBackEvents(1);
208 std::cout << (*InIter)->Name() <<
": push evts: " << iter << std::endl;
220 for (
unsigned nman = 0; nman < iman; nman++)
222 m_InManager[nman]->NoSyncPushBackEvents(1);
233 if (nevnts > 0 && ++icnt >= nevnts)
247 int runno = iter->RunNumber();
250 std::cout <<
Name() <<
" input mgr " << iter->Name() <<
" run: " << runno << std::endl;
263 std::cout <<
PHWHERE <<
"Mixing run numbers (except runnumber=0 which means no valid runnumber) is not supported" << std::endl;
264 std::cout <<
"Here are the list of input managers and runnumbers:" << std::endl;
267 std::cout << inman->Name() <<
" runno: " << inman->RunNumber() << std::endl;
269 std::cout <<
"Exiting now" << std::endl;
276 return resetnodetree;
286 int Npushback = -nevnts;
291 int iret =
m_InManager[0]->PushBackEvents(Npushback);
302 std::cout <<
PHWHERE <<
" Error during skipping events" << std::endl;
306 std::cout <<
PHWHERE <<
" Cannot skip events: No Input Managers registered?" << std::endl;
307 Print(
"INPUTMANAGER");
308 std::cout <<
"If there are Input Managers in this list, send mail with this" << std::endl;
309 std::cout <<
"error message to off-l" << std::endl;
310 std::cout <<
"and include the macro you used" << std::endl;
319 if (managername == inman->Name())
321 int iret = inman->fileopen(filename);
325 std::cout <<
"No Input Manager " << managername <<
" registered" << std::endl;
333 if (managername == inman->Name())
335 int iret = inman->BranchSelect(branch, iflag);
339 std::cout <<
"No Input Manager " << managername <<
" registered" << std::endl;
348 iret += inman->BranchSelect(branch, iflag);
357 if (managername == inman->Name())
359 int iret = inman->setBranches();
363 std::cout <<
"No Input Manager " << managername <<
" registered" << std::endl;
372 iret += inman->setBranches();
382 if (managername == inman->Name() || managername.empty())
392 std::cout <<
"No Input Manager " << managername <<
" registered" << std::endl;
398 if (what ==
"ALL" || what ==
"INPUTMANAGER")
401 std::cout <<
"--------------------------------------" << std::endl
403 std::cout <<
"List of InputManagers in Fun4AllSyncManager "
404 <<
Name() <<
":" << std::endl;
408 std::cout << inman->Name() << std::endl;
410 std::cout << std::endl;
426 std::pair<std::list<std::string>::const_iterator, std::list<std::string>::const_iterator> beginend = InMan->FileOpenListBeginEnd();
427 for (
auto iter = beginend.first; iter != beginend.second; ++iter)
429 fnames.push_back(*iter);
439 inman->PushBackEvents(i);
451 std::cout <<
"Resetting Event for Input Manager " << inman->Name() << std::endl;
453 iret += inman->ResetEvent();
468 std::cout <<
"Bad use of Fun4AllDstInputManager for file(s) which do not have a synchronization object" << std::endl;
469 std::cout <<
"This works for single streams but if you run with multiple input streams this might lead to event mixing" << std::endl;
470 std::cout <<
"If you insist to run this (you take full responsibility), change the following in your macro: " << std::endl;
473 if (iter->HasSyncObject() < 0)
475 std::cout <<
"File " << iter->FileName() <<
" does not contain a sync object" << std::endl;
476 std::cout <<
"Change its Fun4AllDstInputManager with name " << iter->Name() <<
" from Fun4AllDstInputManager to Fun4AllNoSyncDstInputManager" << std::endl;