ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4AllHepMCOutputManager.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4AllHepMCOutputManager.h
1 #ifndef PHHEPMC_FUN4ALLHEPMCOUTPUTMANAGER_H
2 #define PHHEPMC_FUN4ALLHEPMCOUTPUTMANAGER_H
3 
5 
6 #include <fstream>
7 #include <string>
8 
9 namespace HepMC
10 {
11  class IO_GenEvent;
12 }
13 
14 class PHCompositeNode;
15 
17 {
18  public:
19  Fun4AllHepMCOutputManager(const std::string &myname = "HEPMCOUT",
20  const std::string &filename = "hepmcout.txt");
21 
22  ~Fun4AllHepMCOutputManager() override;
23 
24  int outfileopen(const std::string & /*fname*/) override { return 0; }
25 
26  void Print(const std::string &what = "ALL") const override;
27 
28  int Write(PHCompositeNode *startNode) override;
29 
30  int AddComment(const std::string &text);
31 
36  int get_embedding_id() const { return _embedding_id; }
37  //
42  void set_embedding_id(int id) { _embedding_id = id; }
43 
44  protected:
45  std::string outfilename;
46  HepMC::IO_GenEvent *ascii_out;
47  std::string comment;
49 
50  // some pointers for use in compression handling
51  std::ofstream *filestream; // holds compressed filestream
52  std::ostream *zipstream; // feed into HepMC
53 
58 };
59 
60 #endif /* PHHEPMC_FUN4ALLHEPMCOUTPUTMANAGER_H */