Warning, file /include/HepMC3/WriterRoot.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006 #ifndef HEPMC3_WRITERROOT_H
0007 #define HEPMC3_WRITERROOT_H
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <string>
0022 #include <memory>
0023 #include "HepMC3/Writer.h"
0024 #include "HepMC3/GenEvent.h"
0025 #include "HepMC3/Data/GenEventData.h"
0026 #include "HepMC3/Data/GenRunInfoData.h"
0027
0028
0029 #ifdef __CINT__
0030 #include "TFile.h"
0031 #else
0032 class TFile;
0033 #endif
0034
0035 namespace HepMC3 {
0036
0037 class WriterRoot : public Writer {
0038
0039
0040
0041 public:
0042
0043
0044
0045 WriterRoot(const std::string& filename,
0046 std::shared_ptr<GenRunInfo> run = std::shared_ptr<GenRunInfo>());
0047
0048
0049
0050
0051 public:
0052
0053
0054
0055
0056 void write_event(const GenEvent &evt) override;
0057
0058
0059 void write_run_info();
0060
0061
0062 void close() override;
0063
0064
0065 bool failed() override;
0066
0067
0068
0069 private:
0070 TFile* m_file;
0071 int m_events_count;
0072 };
0073
0074 }
0075
0076 #endif