Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
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
1
#include "
Fun4AllDummyInputManager.h
"
2
3
#include "
Fun4AllSyncManager.h
"
4
5
#include <
phool/recoConsts.h
>
6
7
#include <iostream>
8
9
Fun4AllDummyInputManager::Fun4AllDummyInputManager
(
const
std::string
&
name
,
const
std::string
&nodename)
10
:
Fun4AllInputManager
(name, nodename)
11
{
12
FileName
(
"NOFILE-0000000000-0000.root"
);
13
return
;
14
}
15
16
int
Fun4AllDummyInputManager::ResetFileList
()
17
{
18
m_NumEvents
= 0;
19
return
0;
20
}
21
22
int
Fun4AllDummyInputManager::PushBackEvents
(
const
int
nevt)
23
{
24
m_NumEvents
-= nevt;
25
m_SumEvents
-= nevt;
26
return
0;
27
}
28
29
void
Fun4AllDummyInputManager::setSyncManager
(
Fun4AllSyncManager
*master)
30
{
31
// set the runnumber in Fun4All if rc flag is set
32
// so InitRun is triggered.
33
// This setSyncManager is executed during Fun4AllServer::registerInputManager()
34
// normally the runnumber is set in Fun4AllInputManager::fileopen() but since it
35
// would be kind of ridicolous to call this for a dummy input manager
36
// we set the runnumber here
37
Fun4AllInputManager::setSyncManager
(master);
38
recoConsts
*rc =
recoConsts::instance
();
39
int
runnumber
= rc->
get_IntFlag
(
"RUNNUMBER"
, 0);
40
MySyncManager
()->
CurrentRun
(runnumber);
41
return
;
42
}
43
44
int
Fun4AllDummyInputManager::run
(
const
int
nevents
)
45
{
46
m_NumEvents
+=
nevents
;
47
m_SumEvents
+=
nevents
;
48
MySyncManager
()->
CurrentEvent
(
m_NumEvents
);
49
if
(
Verbosity
() > 0)
50
{
51
std::cout <<
"Event No: "
<<
m_NumEvents
;
52
if
(
m_SumEvents
!= m_NumEvents)
53
{
54
std::cout <<
", Event Sum: "
<<
m_SumEvents
;
55
}
56
std::cout << std::endl;
57
}
58
return
Fun4AllReturnCodes::EVENT_OK
;
59
}
coresoftware
blob
master
offline
framework
fun4all
Fun4AllDummyInputManager.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration