26 #include <gsl/gsl_randist.h>
38 m_rng.reset( gsl_rng_alloc(gsl_rng_mt19937) );
53 std::cout <<
"Closing currently open file "
55 <<
" and opening " << filenam << std::endl;
79 auto runheader = findNode::getClass<RunHeader>(
m_runNode,
"RunHeader");
135 std::cout <<
PHWHERE <<
": " <<
Name() <<
" Could not open file " <<
FileName() << std::endl;
150 if (
Verbosity() > 0) std::cout <<
Name() <<
": No Input file open" << std::endl;
157 std::cout <<
Name() <<
": No Input file from filelist opened" << std::endl;
165 std::cout <<
"Getting Event from " <<
Name() << std::endl;
176 if (nevents > 0 && ncount >= nevents)
break;
196 <<
" inconsistent event counters between inputmanager and ionode manager: "
198 <<
" m_IManager->getEventNumber(): " <<
m_IManager->getEventNumber()
206 std::cout <<
"Fun4AllSingleDstPileupInputManager::run - skipped event " <<
m_ievent_thisfile - 1 << std::endl;
213 std::cout <<
"Fun4AllSingleDstPileupInputManager::run - loaded event " <<
m_ievent_thisfile - 1 << std::endl;
225 int neventsbackground = 0;
226 for(
int icrossing = min_crossing; icrossing <= max_crossing; ++icrossing )
229 const int ncollisions = gsl_ran_poisson(
m_rng.get(),
mu);
230 for (
int icollision = 0; icollision < ncollisions; ++icollision)
240 std::cout <<
"Fun4AllSingleDstPileupInputManager::run - merged background event " << ievent_thisfile <<
" time: " << crossing_time << std::endl;
259 std::cout <<
Name() <<
": fileclose: No Input file open" << std::endl;
279 std::map<const std::string, int>::iterator branchiter;
292 std::cout <<
"Setting Root Tree Branch: " << branch <<
" to read" << std::endl;
300 std::cout <<
"Setting Root Tree Branch: " << branch <<
" to NOT read" << std::endl;
314 std::map<const std::string, int>::const_iterator branchiter;
317 m_IManager->selectObjectToRead(branchiter->first.c_str(), branchiter->second);
324 std::cout << branchiter->first <<
" set to " << branchiter->second << std::endl;
331 std::cout <<
PHWHERE <<
" " <<
Name() <<
": You can only call this function after a file has been opened" << std::endl;
332 std::cout <<
"Do not worry, the branches will be set as soon as you open a file" << std::endl;
341 if (what ==
"ALL" || what ==
"BRANCH")
344 std::cout <<
"--------------------------------------" << std::endl
346 std::cout <<
"List of selected branches in Fun4AllSingleDstPileupInputManager " <<
Name() <<
":" << std::endl;
348 std::map<const std::string, int>::const_iterator iter;
351 std::cout << iter->first <<
" is switched ";
360 std::cout << std::endl;
363 if ((what ==
"ALL" || what ==
"PHOOL") &&
m_IManager)
366 std::cout <<
"--------------------------------------" << std::endl
368 std::cout <<
"PHNodeIOManager print in Fun4AllSingleDstPileupInputManager " <<
Name() <<
":" << std::endl;
380 unsigned EventOnDst =
m_IManager->getEventNumber();
381 EventOnDst -=
static_cast<unsigned>(
i);
387 std::cout <<
PHWHERE <<
Name() <<
": could not push back events, Imanager is NULL"
388 <<
" probably the dst is not open yet (you need to call fileopen or run 1 event for lists)" << std::endl;