EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
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
int
fileclose
()
override
;
28
int
run
(
const
int
nevents
= 0)
override
;
29
void
Print
(
const
std::string &what =
"ALL"
)
const override
;
30
int
ResetEvent
()
override
;
31
int
PushBackEvents
(
const
int
i)
override
;
32
int
skip
(
const
int
i)
override
{
return
PushBackEvents
(i); }
33
34
// Effectivly turn off the synchronization checking
35
//
36
int
SyncIt
(
const
SyncObject
*
/*mastersync*/
)
override
{
return
Fun4AllReturnCodes::SYNC_OK
; }
37
int
GetSyncObject
(
SyncObject
**
/*mastersync*/
)
override
{
return
Fun4AllReturnCodes::SYNC_NOOBJECT
; }
38
int
NoSyncPushBackEvents
(
const
int
nevt)
override
{
return
PushBackEvents
(nevt); }
39
int
ConvertFromOscar
();
40
41
protected
:
42
int
events_total
;
43
int
events_thisfile
;
44
std::string
filename
;
45
std::string
topNodeName
;
46
PHCompositeNode
*
topNode
;
47
HepMC::GenEvent *
evt
;
48
//HepMC::GenEvent *tmpEvt;
49
int
skipEvents
,
skippedEvents
;
50
51
// some pointers for use in decompression handling
52
std::ifstream *
filestream
;
// holds compressed filestream
53
std::istream *
unzipstream
;
// feed into HepMc
54
std::ifstream
theOscarFile
;
55
56
bool
isCompressed
;
57
};
58
59
#endif
/* PHHEPMC_FUN4ALLOSCARINPUTMANAGER_H */
fun4all_coresoftware
blob
master
generators
phhepmc
Fun4AllOscarInputManager.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:42
using
1.8.2 with
EIC GitHub integration