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
Fun4AllSyncManager.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4AllSyncManager.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
// This Master manages the reading of the Input.
4
// In principle all of this could be done in the Fun4AllServer
5
// but this is simpler to develop and test while Fun4All is allready in use.
6
7
#ifndef FUN4ALL_FUN4ALLSYNCMANAGER_H
8
#define FUN4ALL_FUN4ALLSYNCMANAGER_H
9
10
#include "
Fun4AllBase.h
"
11
12
#include <string>
// for string
13
#include <vector>
14
15
class
Fun4AllInputManager
;
16
class
SyncObject
;
17
18
class
Fun4AllSyncManager
:
public
Fun4AllBase
19
{
20
public
:
21
Fun4AllSyncManager
(
const
std::string
&
name
=
"SYNCMANAGERNONAME"
);
22
~Fun4AllSyncManager
()
override
;
23
int
registerInputManager
(
Fun4AllInputManager
*InManager);
24
Fun4AllInputManager
*
getInputManager
(
const
std::string
&
name
);
25
27
int
run
(
const
int
nevnts = 0);
28
33
int
skip
(
const
int
nevnts = 0);
34
35
int
fileopen
(
const
std::string
&managername,
const
std::string
&
filename
);
36
int
fileclose
(
const
std::string
&managername =
"NONE"
);
37
int
CurrentRun
() {
return
m_CurrentRun
; }
38
void
CurrentRun
(
const
int
ival) {
m_CurrentRun
= ival; }
39
void
CurrentEvent
(
const
int
evt);
40
void
Print
(
const
std::string
&what =
"ALL"
)
const override
;
41
void
SegmentNumber
(
const
int
iseg) {
m_PrdfSegment
= iseg; }
42
int
SegmentNumber
()
const
{
return
m_PrdfSegment
; }
43
int
BranchSelect
(
const
std::string
&managername,
const
std::string
&branch,
int
iflag);
44
int
BranchSelect
(
const
std::string
&branch,
const
int
iflag);
45
int
setBranches
(
const
std::string
&managername);
46
int
setBranches
();
47
void
TotalEvents
(
const
int
i
) {
m_EventsTotal
=
i
; }
48
int
TotalEvents
()
const
{
return
m_EventsTotal
; }
49
void
PrdfEvents
(
const
int
i
) {
m_PrdfEvents
=
i
; }
50
int
PrdfEvents
()
const
{
return
m_PrdfEvents
; }
51
void
GetInputFullFileList
(std::vector<std::string> &fnames)
const
;
52
void
Repeat
(
const
int
i
= -1) {
m_Repeat
=
i
; }
53
void
PushBackInputMgrsEvents
(
const
int
i
);
54
int
ResetEvent
();
55
const
std::vector<Fun4AllInputManager *>
GetInputManagers
()
const
{
return
m_InManager
; }
56
bool
MixRunsOk
()
const
{
return
m_MixRunsOkFlag
; }
57
void
MixRunsOk
(
bool
b
) {
m_MixRunsOkFlag
=
b
; }
58
59
private
:
60
void
PrintSyncProblem
()
const
;
61
int
CheckSync
(
unsigned
i
);
62
int
m_PrdfSegment
= 0;
63
int
m_PrdfEvents
= 0;
64
int
m_EventsTotal
= 0;
65
int
m_CurrentRun
= 0;
66
int
m_CurrentEvent
= 0;
67
int
m_Repeat
= 0;
68
bool
m_MixRunsOkFlag
=
false
;
69
SyncObject
*
m_MasterSync
=
nullptr
;
70
std::vector<Fun4AllInputManager *>
m_InManager
;
71
std::vector<int>
m_iretInManager
;
72
};
73
74
#endif
coresoftware
blob
master
offline
framework
fun4all
Fun4AllSyncManager.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration