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
Fun4AllOscarInputManager.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4AllOscarInputManager.h
1
#ifndef PHHEPMC_FUN4ALLOSCARINPUTMANAGER_H
2
#define PHHEPMC_FUN4ALLOSCARINPUTMANAGER_H
3
4
#include "
PHHepMCGenHelper.h
"
5
6
#include <
fun4all/Fun4AllInputManager.h
>
7
#include <
fun4all/Fun4AllReturnCodes.h
>
// for SYNC_NOOBJECT, SYNC_OK
8
9
#include <fstream>
10
#include <string>
11
12
// forward declaration of classes in namespace
13
namespace
HepMC
14
{
15
class
GenEvent;
16
}
// namespace HepMC
17
18
class
PHCompositeNode
;
19
class
SyncObject
;
20
21
class
Fun4AllOscarInputManager
:
public
Fun4AllInputManager
,
public
PHHepMCGenHelper
22
{
23
public
:
24
Fun4AllOscarInputManager
(
const
std::string
&
name
=
"DUMMY"
,
const
std::string
&topnodename =
"TOP"
);
25
~Fun4AllOscarInputManager
()
override
;
26
int
fileopen
(
const
std::string
&filenam)
override
;
27
// cppcheck-suppress virtualCallInConstructor
28
int
fileclose
()
override
;
29
int
run
(
const
int
nevents
= 0)
override
;
30
void
Print
(
const
std::string
&what =
"ALL"
)
const override
;
31
int
ResetEvent
()
override
;
32
int
PushBackEvents
(
const
int
i
)
override
;
33
int
skip
(
const
int
i)
override
{
return
PushBackEvents
(i); }
34
35
// Effectivly turn off the synchronization checking
36
//
37
int
SyncIt
(
const
SyncObject
*
/*mastersync*/
)
override
{
return
Fun4AllReturnCodes::SYNC_OK
; }
38
int
GetSyncObject
(
SyncObject
**
/*mastersync*/
)
override
{
return
Fun4AllReturnCodes::SYNC_NOOBJECT
; }
39
int
NoSyncPushBackEvents
(
const
int
nevt)
override
{
return
PushBackEvents
(nevt); }
40
int
ConvertFromOscar
();
41
42
protected
:
43
int
events_total
;
44
int
events_thisfile
;
45
std::string
filename
;
46
std::string
topNodeName
;
47
PHCompositeNode
*
topNode
;
48
HepMC::GenEvent *
evt
;
49
//HepMC::GenEvent *tmpEvt;
50
int
skipEvents
,
skippedEvents
;
51
52
// some pointers for use in decompression handling
53
std::ifstream *
filestream
;
// holds compressed filestream
54
std::istream *
unzipstream
;
// feed into HepMc
55
std::ifstream
theOscarFile
;
56
57
bool
isCompressed
;
58
};
59
60
#endif
/* PHHEPMC_FUN4ALLOSCARINPUTMANAGER_H */
coresoftware
blob
master
generators
phhepmc
Fun4AllOscarInputManager.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:03
using
1.8.2 with
sPHENIX GitHub integration