47 if (inman->Name() == InputManager->
Name())
49 cout <<
"InputManager " << InputManager->
Name() <<
" allready in list" << endl;
56 cout <<
"Registering InputManager " << InputManager->
Name() << endl;
58 m_InManager.push_back(InputManager);
69 if (name == inman->Name())
74 cout <<
Name() <<
": Could not find InputManager" << name << endl;
84 int resetnodetree = 0;
99 for (vector<Fun4AllInputManager *>::iterator iter =
m_InManager.begin(); iter !=
m_InManager.end(); ++iter)
106 if (!hassync && (*iter)->HasSyncObject())
108 hassync = (*iter)->HasSyncObject();
112 if ((*iter)->HasSyncObject())
114 if (hassync != (*iter)->HasSyncObject())
119 else if (hassync < 0)
148 if (iret || iretsync)
159 unsigned inputmgr_cnt = 0;
160 vector<Fun4AllInputManager *>::const_iterator InIter;
170 (*InIter)->PushBackEvents(1);
174 if ((*InIter)->IsOpen())
176 (*InIter)->fileclose();
178 int ireset = (*InIter)->ResetFileList();
181 cout <<
"Resetting input manager " << (*InIter)->Name() <<
" failed during Repeat" << endl;
200 cout << (*InIter)->Name() <<
": return code: " << *iter << endl;
204 (*InIter)->PushBackEvents(1);
207 cout << (*InIter)->Name() <<
": push evts: " << *iter << endl;
218 for (
unsigned nman = 0; nman < iman; nman++)
231 if (nevnts > 0 && ++icnt >= nevnts)
243 for (vector<Fun4AllInputManager *>::iterator iter =
m_InManager.begin(); iter !=
m_InManager.end(); ++iter)
245 int runno = (*iter)->RunNumber();
248 cout <<
Name() <<
" input mgr " << (*iter)->Name() <<
" run: " << runno << endl;
261 cout <<
"Mixing run numbers (except runnumber=0 which means no valid runnumber) is not supported" << endl;
262 cout <<
"Here are the list of input managers and runnumbers:" << endl;
265 cout << inman->Name() <<
" runno: " << inman->RunNumber() << endl;
267 cout <<
"Exiting now" << endl;
274 return resetnodetree;
284 int Npushback = -nevnts;
289 int iret =
m_InManager[0]->PushBackEvents(Npushback);
290 for (
unsigned int i = 1; i <
m_InManager.size(); ++i)
292 iret +=
m_InManager[i]->SkipForThisManager(nevnts);
300 cout <<
PHWHERE <<
" Error during skipping events" << endl;
304 cout <<
PHWHERE <<
" Cannot skip events: No Input Managers registered?" << endl;
305 Print(
"INPUTMANAGER");
306 cout <<
"If there are Input Managers in this list, send mail with this" << endl;
307 cout <<
"error message to off-l" << endl;
308 cout <<
"and include the macro you used" << endl;
317 if (managername == inman->Name())
319 int iret = inman->fileopen(filename);
323 cout <<
"No Input Manager " << managername <<
" registered" << endl;
331 if (managername == inman->Name())
333 int iret = inman->BranchSelect(branch, iflag);
337 cout <<
"No Input Manager " << managername <<
" registered" << endl;
346 iret += inman->BranchSelect(branch, iflag);
355 if (managername == inman->Name())
357 int iret = inman->setBranches();
361 cout <<
"No Input Manager " << managername <<
" registered" << endl;
370 iret += inman->setBranches();
380 if (managername == inman->Name() || managername.empty())
390 cout <<
"No Input Manager " << managername <<
" registered" << endl;
396 if (what ==
"ALL" || what ==
"INPUTMANAGER")
399 cout <<
"--------------------------------------" << endl
401 cout <<
"List of InputManagers in Fun4AllSyncManager "
402 <<
Name() <<
":" << endl;
406 cout << inman->Name() << endl;
424 std::pair<std::list<std::string>::const_iterator, std::list<std::string>::const_iterator> beginend = InMan->FileOpenListBeginEnd();
425 for (
auto iter = beginend.first; iter != beginend.second; ++iter)
427 fnames.push_back(*iter);
437 inman->PushBackEvents(i);
449 cout <<
"Resetting Event for Input Manager " << inman->Name() << endl;
451 iret += inman->ResetEvent();
466 cout <<
"Bad use of Fun4AllDstInputManager for file(s) which do not have a synchronization object" << endl;
467 cout <<
"This works for single streams but if you run with multiple input streams this might lead to event mixing" << endl;
468 cout <<
"If you insist to run this (you take full responsibility), change the following in your macro: " << endl;
471 if ((*iter)->HasSyncObject() < 0)
473 cout <<
"File " << (*iter)->FileName() <<
" does not contain a sync object" << endl;
474 cout <<
"Change its Fun4AllDstInputManager with name " << (*iter)->Name() <<
" from Fun4AllDstInputManager to Fun4AllNoSyncDstInputManager" << endl;