CMS 3D CMS Logo

ThePEGInterface.h

Go to the documentation of this file.
00001 #ifndef GeneratorInterface_ThePEGInterface_ThePEGInterface_h
00002 #define GeneratorInterface_ThePEGInterface_ThePEGInterface_h
00003 
00011 #include <memory>
00012 #include <string>
00013 
00014 #include <HepMC/GenEvent.h>
00015 #include <HepMC/PdfInfo.h>
00016 #include <HepMC/IO_BaseClass.h>
00017 
00018 #include <ThePEG/Repository/EventGenerator.h>
00019 #include <ThePEG/EventRecord/Event.h>
00020 
00021 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00022 
00023 class ThePEGInterface {
00024     public:
00025         ThePEGInterface(const edm::ParameterSet &params);
00026         virtual ~ThePEGInterface();
00027 
00028     protected:
00029         void initRepository(const edm::ParameterSet &params) const;
00030         void initGenerator();
00031 
00032         static std::auto_ptr<HepMC::GenEvent>
00033                                 convert(const ThePEG::EventPtr &event);
00034         static void clearAuxiliary(HepMC::GenEvent *hepmc,
00035                                    HepMC::PdfInfo *pdf);
00036         static void fillAuxiliary(HepMC::GenEvent *hepmc,
00037                                   HepMC::PdfInfo *pdf,
00038                                   const ThePEG::EventPtr &event);
00039 
00040         std::string dataFile(const std::string &fileName) const;
00041         std::string dataFile(const edm::ParameterSet &pset,
00042                              const std::string &paramName) const;
00043 
00044         static std::string resolveEnvVars(const std::string &s);
00045 
00046         ThePEG::EGPtr                           eg_;
00047         std::auto_ptr<HepMC::IO_BaseClass>      iobc_;
00048 
00049     private:
00050         const std::string                       dataLocation_;
00051         const std::string                       generator_;
00052         const std::string                       run_;
00053         const int                               skipEvents_;
00054         void readParameterSet(const edm::ParameterSet &base, const std::string &paramSet) const;
00055 };
00056 
00057 #endif // GeneratorInterface_ThePEGInterface_ThePEGInterface_h

Generated on Tue Jun 9 17:37:09 2009 for CMSSW by  doxygen 1.5.4