ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4AllDummyInputManager.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4AllDummyInputManager.cc
2 
3 #include "Fun4AllSyncManager.h"
4 
5 #include <phool/recoConsts.h>
6 
7 #include <iostream>
8 
9 using namespace std;
10 
11 Fun4AllDummyInputManager::Fun4AllDummyInputManager(const string &name, const string &nodename)
12  : Fun4AllInputManager(name, nodename)
13 {
14  FileName("NOFILE-0000000000-0000.root");
15  return;
16 }
17 
19 {
20  m_NumEvents = 0;
21  return 0;
22 }
23 
25 {
26  m_NumEvents -= nevt;
27  m_SumEvents -= nevt;
28  return 0;
29 }
30 
32 {
33  // set the runnumber in Fun4All if rc flag is set
34  // so InitRun is triggered.
35  // This setSyncManager is executed during Fun4AllServer::registerInputManager()
36  // normally the runnumber is set in Fun4AllInputManager::fileopen() but since it
37  // would be kind of ridicolous to call this for a dummy input manager
38  // we set the runnumber here
41  int runnumber = rc->get_IntFlag("RUNNUMBER", 0);
42  MySyncManager()->CurrentRun(runnumber);
43  return;
44 }
45 
46 int Fun4AllDummyInputManager::run(const int nevents)
47 {
48  m_NumEvents += nevents;
49  m_SumEvents += nevents;
51  if (Verbosity() > 0)
52  {
53  cout << "Event No: " << m_NumEvents;
54  if (m_SumEvents != m_NumEvents)
55  {
56  cout << ", Event Sum: " << m_SumEvents;
57  }
58  cout << endl;
59  }
61 }