Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:14

0001 // -*- C++ -*-
0002 //
0003 // This file is part of HepMC
0004 // Copyright (C) 2014-2023 The HepMC collaboration (see AUTHORS for details)
0005 //
0006 /**
0007  *  @file Version.h
0008  *  @brief Declaration of the Verrion functions and some macros
0009  *
0010  */
0011 #ifndef HEPMC3_VERSION_H
0012 #define HEPMC3_VERSION_H
0013 
0014 #include <string>
0015 
0016 /// HepMC version string
0017 #define HEPMC3_VERSION "3.03.00"
0018 
0019 /// @brief HepMC version as an integer, HepMC X.Y.Z = 1000000*X + 1000*Y + Z
0020 ///
0021 /// Use like "#if HEPMC3_VERSION_CODE < 3001004" for < 3.01.04
0022 #define HEPMC3_VERSION_CODE 3003000
0023 namespace HepMC3 {
0024 /// Get the HepMC library version string
0025 inline std::string version() {
0026     return HEPMC3_VERSION;
0027 }
0028 }
0029 
0030 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
0031 #define HEPMC3_DECLARE_READER_FILE(classname)      extern "C" {  __declspec(dllexport) classname * __stdcall new ## classname ## file (const std::string &filename ) { return new classname (filename);  } }
0032 #define HEPMC3_DECLARE_READER_STREAM(classname)    extern "C" {  __declspec(dllexport) classname * __stdcall new ## classname ## stream (std::istream & stream) { return new classname (stream);  } }
0033 #define HEPMC3_DECLARE_READER_SPSTREAM(classname)  extern "C" {  __declspec(dllexport) classname * __stdcall new ## classname ## spstream (std::shared_ptr<std::istream> stream) { return new classname (stream);  } }
0034 #define HEPMC3_DECLARE_WRITER_FILE(classname)      extern "C" {  __declspec(dllexport) classname * __stdcall new ## classname ## file (const std::string &filename, std::shared_ptr<GenRunInfo> run ) { return new classname (filename, run);  } }
0035 #define HEPMC3_DECLARE_WRITER_STREAM(classname)    extern "C" {  __declspec(dllexport) classname * __stdcall new ## classname ## stream (std::ostream & stream, std::shared_ptr<GenRunInfo> run) { return new classname (stream,run);  } }
0036 #define HEPMC3_DECLARE_WRITER_SPSTREAM(classname)  extern "C" {  __declspec(dllexport) classname * __stdcall new ## classname ## spstream (std::shared_ptr<std::ostream> stream, std::shared_ptr<GenRunInfo> run) { return new classname (stream, run);  } }
0037 #endif
0038 #if defined(__linux__) || defined(__darwin__)|| defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
0039 #define HEPMC3_DECLARE_READER_FILE(classname)      extern "C" { classname * new ## classname ## file (const std::string &filename ) { return new classname (filename);  } }
0040 #define HEPMC3_DECLARE_READER_STREAM(classname)    extern "C" { classname * new ## classname ## stream (std::istream & stream) { return new classname (stream);  } }
0041 #define HEPMC3_DECLARE_READER_SPSTREAM(classname)  extern "C" { classname * new ## classname ## spstream (std::shared_ptr<std::istream> stream) { return new classname (stream);  } }
0042 #define HEPMC3_DECLARE_WRITER_FILE(classname)      extern "C" { classname * new ## classname ## file (const std::string &filename, std::shared_ptr<GenRunInfo> run ) { return new classname (filename,run);  } }
0043 #define HEPMC3_DECLARE_WRITER_STREAM(classname)    extern "C" { classname * new ## classname ## stream (std::ostream & stream, std::shared_ptr<GenRunInfo> run) { return new classname (stream, run);  } }
0044 #define HEPMC3_DECLARE_WRITER_SPSTREAM(classname)  extern "C" { classname * new ## classname ## spstream (std::shared_ptr<std::ostream> stream, std::shared_ptr<GenRunInfo> run) { return new classname (stream, run);  } }
0045 #endif
0046 #endif