Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
blob
master
calibrations
generators
offline
database
framework
ffamodules
CDBInterface.cc
CDBInterface.h
FlagHandler.cc
FlagHandler.h
HeadReco.cc
HeadReco.h
SyncReco.cc
SyncReco.h
ffaobjects
ffarawmodules
ffarawobjects
frog
fun4all
fun4allraw
fun4allutils
phool
phoolraw
packages
QA
simulation
validation
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SyncReco.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SyncReco.cc
1
#include "
SyncReco.h
"
2
3
#include <
ffaobjects/SyncDefs.h
>
4
#include <
ffaobjects/SyncObject.h
>
5
#include <
ffaobjects/SyncObjectv1.h
>
6
7
#include <
fun4all/Fun4AllReturnCodes.h
>
8
#include <
fun4all/Fun4AllServer.h
>
9
#include <
fun4all/SubsysReco.h
>
// for SubsysReco
10
11
#include <
phool/PHCompositeNode.h
>
12
#include <
phool/PHIODataNode.h
>
13
#include <
phool/PHNode.h
>
// for PHNode
14
#include <
phool/PHNodeIterator.h
>
// for PHNodeIterator
15
#include <
phool/PHObject.h
>
// for PHObject
16
#include <
phool/getClass.h
>
17
#include <
phool/phool.h
>
// for PHWHERE
18
#include <
phool/recoConsts.h
>
19
20
#include <iostream>
21
22
SyncReco::SyncReco
(
const
std::string
&
name
)
23
:
SubsysReco
(name)
24
{
25
return
;
26
}
27
28
int
SyncReco::Init
(
PHCompositeNode
*topNode)
29
{
30
int
iret =
CreateNodeTree
(topNode);
31
return
iret;
32
}
33
34
int
SyncReco::InitRun
(
PHCompositeNode
*topNode)
35
{
36
SyncObject
*syncobject = findNode::getClass<SyncObject>(topNode, syncdefs::SYNCNODENAME);
37
recoConsts
*rc =
recoConsts::instance
();
38
syncobject->
RunNumber
(rc->get_IntFlag(
"RUNNUMBER"
));
39
return
Fun4AllReturnCodes::EVENT_OK
;
40
}
41
42
int
SyncReco::CreateNodeTree
(
PHCompositeNode
*topNode)
43
{
44
PHNodeIterator
iter(topNode);
45
PHCompositeNode
*dstNode;
46
dstNode =
dynamic_cast<
PHCompositeNode
*
>
(iter.
findFirst
(
"PHCompositeNode"
,
"DST"
));
47
if
(!dstNode)
48
{
49
std::cout <<
PHWHERE
<<
" DST Node is missing doing nothing"
<< std::endl;
50
return
Fun4AllReturnCodes::ABORTRUN
;
51
}
52
53
SyncObject
*syncobject = findNode::getClass<SyncObject>(topNode, syncdefs::SYNCNODENAME);
54
if
(!syncobject)
55
{
56
syncobject =
new
SyncObjectv1
();
57
PHIODataNode<PHObject>
*SyncObjectNode =
new
PHIODataNode<PHObject>
(syncobject, syncdefs::SYNCNODENAME,
"PHObject"
);
// contains PHObject
58
dstNode->
addNode
(SyncObjectNode);
59
}
60
61
return
Fun4AllReturnCodes::EVENT_OK
;
62
}
63
64
int
SyncReco::process_event
(
PHCompositeNode
*topNode)
65
{
66
Fun4AllServer
*se =
Fun4AllServer::instance
();
67
SyncObject
*syncobject = findNode::getClass<SyncObject>(topNode, syncdefs::SYNCNODENAME);
68
if
(!syncobject)
69
{
70
std::cout <<
PHWHERE
<<
" No Synchronisation Object, no parallel reading of multiple inputs"
<< std::endl;
71
return
Fun4AllReturnCodes::ABORTEVENT
;
72
}
73
74
syncobject->
EventCounter
(se->
EventCounter
());
75
syncobject->
EventNumber
(se->
EventNumber
());
76
syncobject->
RunNumber
(se->
RunNumber
());
77
if
(
forced_segment
>= 0)
78
{
79
syncobject->
SegmentNumber
(
forced_segment
);
80
}
81
else
82
{
83
syncobject->
SegmentNumber
(se->
SegmentNumber
());
84
}
85
86
if
(
Verbosity
() > 0)
87
{
88
syncobject->
identify
();
89
}
90
return
Fun4AllReturnCodes::EVENT_OK
;
91
}
coresoftware
blob
master
offline
framework
ffamodules
SyncReco.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration