Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fun4AllOscarInputManager.h
Go to the documentation of this file.
1 #ifndef FUN4ALLOSCARINPUTMANAGER_H__
2 #define FUN4ALLOSCARINPUTMANAGER_H__
3 #include "PHHepMCGenHelper.h"
4 
6 
7 #include <string>
8 #include <map>
9 #include <fstream>
10 #include <iostream>
11 
12 // forward declaration of classes in namespace
13 namespace HepMC
14 {
15  class IO_GenEvent;
16  class GenEvent;
17 };
18 
19 class PHCompositeNode;
20 class PHHepMCGenEvent;
21 
22 
24 {
25  public:
26  Fun4AllOscarInputManager(const std::string &name = "DUMMY", const std::string &topnodename = "TOP");
27  virtual ~Fun4AllOscarInputManager();
28  int fileopen(const std::string &filenam);
29  int fileclose();
30  int run(const int nevents = 0);
31  int isOpen() {return isopen;}
32  void Print(const std::string &what = "ALL") const;
33  int ResetEvent();
34  int PushBackEvents(const int i);
35  int skip(const int i){ return PushBackEvents(i);}
36 
37  // Effectivly turn off the synchronization checking
38  //
39  int SyncIt(const SyncObject* /*mastersync*/) {return Fun4AllReturnCodes::SYNC_OK;}
41  int NoSyncPushBackEvents(const int nevt) {return PushBackEvents(nevt);}
42  int ConvertFromOscar();
43 
44 
47  {
49  }
50 
52  void set_vertex_distribution_mean(const double x, const double y, const double z, const double t)
53  {
55  }
56 
58  void set_vertex_distribution_width(const double x, const double y, const double z, const double t)
59  {
61  }
62  //
64  void set_reuse_vertex(int src_embedding_id)
65  {
66  hepmc_helper.set_reuse_vertex(src_embedding_id);
67  }
68 
74  //
80  protected:
81  int OpenNextFile();
82  int isopen;
85  std::string filename;
86  std::string topNodeName;
88  HepMC::GenEvent *evt;
89  //HepMC::GenEvent *tmpEvt;
91 
92  // some pointers for use in decompression handling
93  std::ifstream *filestream; // holds compressed filestream
94  std::istream *unzipstream; // feed into HepMc
95  std::ifstream theOscarFile;
96 
100 };
101 
102 #endif /* __FUN4ALLOSCARINPUTMANAGER_H__ */
void set_reuse_vertex(int src_embedding_id)
reuse vertex from another PHHepMCGenEvent with embedding_id = src_embedding_id Additional smearing an...
int NoSyncPushBackEvents(const int nevt)
int run(const int nevents=0)
int get_embedding_id() const
PHHepMCGenHelper provides service of DST upload of HepMC subevent, vertex assignment and random gener...
void set_vertex_distribution_width(const double x, const double y, const double z, const double t)
set the width of the vertex distribution function about the mean, use PHENIX units of cm...
void set_vertex_distribution_mean(const double x, const double y, const double z, const double t)
set the mean value of the vertex distribution, use PHENIX units of cm, ns
void set_vertex_distribution_function(VTXFUNC x, VTXFUNC y, VTXFUNC z, VTXFUNC t)
toss a new vertex according to a Uniform or Gaus distribution
tuple nevents
Definition: submit_bnl.py:11
void set_vertex_distribution_mean(const double x, const double y, const double z, const double t)
set the mean value of the vertex distribution, use PHENIX units of cm, ns
void set_reuse_vertex(int src_embedding_id)
reuse vertex from another PHHepMCGenEvent with embedding_id = src_embedding_id Additional smearing an...
PHHepMCGenHelper hepmc_helper
helper for insert HepMC event to DST node and add vertex smearing
int SyncIt(const SyncObject *)
int fileopen(const std::string &filenam)
void set_vertex_distribution_function(PHHepMCGenHelper::VTXFUNC x, PHHepMCGenHelper::VTXFUNC y, PHHepMCGenHelper::VTXFUNC z, PHHepMCGenHelper::VTXFUNC t)
toss a new vertex according to a Uniform or Gaus distribution
void Print(const std::string &what="ALL") const
void set_vertex_distribution_width(const double x, const double y, const double z, const double t)
set the width of the vertex distribution function about the mean, use PHENIX units of cm...
VTXFUNC
supported function distributions
Fun4AllOscarInputManager(const std::string &name="DUMMY", const std::string &topnodename="TOP")
void set_embedding_id(int id)