20 config = std::make_shared<ConfigTool>(c);
22 timer = std::make_shared<Timer>(
msg);
23 msg->StartTitle(
"Analysis");
33 timer = std::make_shared<Timer>(
msg);
34 msg->StartTitle(
"Analysis");
41 config = std::make_shared<ConfigTool>();
43 timer = std::make_shared<Timer>(
msg);
44 msg->StartTitle(
"Analysis");
68 msg->MSG(
MSGLevel::WARNING,
"Nthread in ConfigTool is not set, please call Analysis::SetThreadNumber to set thread number");
76 msg->MSG_WARNING(
"Threads are not finished during the destruction of Analysis, you should manually call Analysis::Join in the end");
87 msg->MSG(
MSGLevel::WARNING,
"Thread pool has been defined, the size of thread pool won't be changed");
99 if (
pool !=
nullptr &&
vf.size() > 0)
101 for (
size_t i = 0;
i <
vf.size();
i++)
115 TimerUser()->PrintCurrent(
"Finished Time : ");
std::shared_ptr< Timer > TimerUser()
return the Timer
std::vector< std::shared_ptr< ResultGroup > > ResultsToSave
~Analysis()
destructor of the Analysis class.
Analysis()
Default constructor of the Analysis class.
void ConfigThreadPool()
Config the thread pool using the info from ConfigTool.
std::vector< int > SubmittedJobCount
std::shared_ptr< ResultGroup > SubmitEventLoop(const char *filelist, bool dosave=true)
Submit the user defined event loop. This function will not automatically call Join() after submit the...
void Join()
Join the threads in the thread pool.
std::shared_ptr< ConfigTool > config
void SetThreadNumber(int num)
Set the thread number of the thread pool. Can only be set once.
std::vector< std::future< StatusCode > > vf
std::shared_ptr< Timer > timer
std::shared_ptr< ThreadPool > pool
std::shared_ptr< MSGTool > msg