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
Fun4AllPrdfInputPoolManager.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4AllPrdfInputPoolManager.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef FUN4ALLRAW_FUN4ALLPRDFINPUTPOOLMANAGER_H
4
#define FUN4ALLRAW_FUN4ALLPRDFINPUTPOOLMANAGER_H
5
6
#include <
fun4all/Fun4AllInputManager.h
>
7
8
#include <Event/phenixTypes.h>
9
10
#include <map>
11
#include <string>
12
#include <utility>
13
#include <vector>
14
15
class
Event
;
16
class
SinglePrdfInput
;
17
class
oEvent
;
18
class
Packet
;
19
class
PHCompositeNode
;
20
class
SyncObject
;
21
22
class
Fun4AllPrdfInputPoolManager
:
public
Fun4AllInputManager
23
{
24
public
:
25
Fun4AllPrdfInputPoolManager
(
const
std::string
&
name
=
"DUMMY"
,
const
std::string
&prdfnodename =
"PRDF"
,
const
std::string
&topnodename =
"TOP"
);
26
~Fun4AllPrdfInputPoolManager
()
override
;
27
int
fileopen
(
const
std::string
&
/* filenam */
)
override
{
return
0; }
28
// cppcheck-suppress virtualCallInConstructor
29
int
fileclose
()
override
;
30
int
run
(
const
int
nevents
= 0)
override
;
31
32
void
Print
(
const
std::string
&what =
"ALL"
)
const override
;
33
int
ResetEvent
()
override
;
34
int
PushBackEvents
(
const
int
i
)
override
;
35
int
GetSyncObject
(
SyncObject
**mastersync)
override
;
36
int
SyncIt
(
const
SyncObject
*mastersync)
override
;
37
int
HasSyncObject
()
const override
{
return
1; }
38
std::string
GetString
(
const
std::string
&what)
const override
;
39
SinglePrdfInput
*
AddPrdfInputList
(
const
std::string
&
listfile
);
40
SinglePrdfInput
*
AddPrdfInputFile
(
const
std::string
&
filename
);
41
SinglePrdfInput
*
registerPrdfInput
(
SinglePrdfInput
*prdfin);
42
void
AddPacket
(
const
int
evtno,
Packet
*
p
);
43
void
UpdateEventFoundCounter
(
const
int
evtno);
44
void
UpdateDroppedPacket
(
const
int
packetid
);
45
void
AddBeamClock
(
const
int
evtno,
const
int
bclk,
SinglePrdfInput
*prdfin);
46
void
SetReferenceClock
(
const
int
evtno,
const
int
bclk);
47
void
SetReferenceInputMgr
(
SinglePrdfInput
*inp) {
m_RefPrdfInput
= inp; }
48
void
CreateBclkOffsets
();
49
int
CalcDiffBclk
(
const
int
bclk1,
const
int
bclk2);
50
void
DitchEvent
(
const
int
eventno);
51
void
Resynchronize
();
52
void
ClearAllEvents
();
53
void
SetPoolDepth
(
unsigned
int
d) {
m_PoolDepth
= d; }
54
55
private
:
56
struct
PacketInfo
57
{
58
std::vector<Packet *>
PacketVector
;
59
unsigned
int
EventFoundCounter
= 0;
60
};
61
62
struct
SinglePrdfInputInfo
63
{
64
int
bclkoffset
= 0;
65
};
66
67
bool
m_StartUpFlag
=
true
;
68
int
m_RunNumber
= 0;
69
unsigned
int
m_PoolDepth
= 100;
70
unsigned
int
m_InitialPoolDepth
= 20;
71
std::vector<SinglePrdfInput *>
m_PrdfInputVector
;
72
SyncObject
*
m_SyncObject
=
nullptr
;
73
PHCompositeNode
*
m_topNode
=
nullptr
;
74
Event
*
m_Event
=
nullptr
;
75
PHDWORD
workmem
[4 * 1024 * 1024] = {};
76
oEvent
*
oph
=
nullptr
;
77
SinglePrdfInput
*
m_RefPrdfInput
=
nullptr
;
78
std::map<int, PacketInfo>
m_PacketMap
;
79
std::string
m_PrdfNodeName
;
80
std::map<int, int>
m_DroppedPacketMap
;
81
std::map<int, std::vector<std::pair<int, SinglePrdfInput *>>>
m_ClockCounters
;
82
std::map<int, int>
m_RefClockCounters
;
83
std::map<SinglePrdfInput *, SinglePrdfInputInfo>
m_SinglePrdfInputInfo
;
84
};
85
86
#endif
/* FUN4ALL_FUN4ALLPRDFINPUTPOOLMANAGER_H */
coresoftware
blob
master
offline
framework
fun4allraw
Fun4AllPrdfInputPoolManager.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration