CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/GeneratorInterface/LHEInterface/plugins/LHESource.h

Go to the documentation of this file.
00001 #ifndef GeneratorInterface_LHEInterface_LHESource_h
00002 #define GeneratorInterface_LHEInterface_LHESource_h
00003 
00004 #include <memory>
00005 
00006 #include <boost/shared_ptr.hpp>
00007 #include <boost/ptr_container/ptr_deque.hpp>
00008 
00009 #include "FWCore/Framework/interface/Event.h"
00010 #include "FWCore/Framework/interface/Run.h"
00011 #include "FWCore/Sources/interface/ExternalInputSource.h"
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 
00014 #include "SimDataFormats/GeneratorProducts/interface/LesHouches.h"
00015 
00016 namespace lhef {
00017         class LHERunInfo;
00018         class LHEEvent;
00019         class LHEReader;
00020 }
00021 
00022 class LHERunInfoProduct;
00023 
00024 class LHESource : public edm::ExternalInputSource {
00025     public:
00026         explicit LHESource(const edm::ParameterSet &params,
00027                            const edm::InputSourceDescription &desc);
00028         virtual ~LHESource();
00029 
00030     protected:
00031         virtual void endJob();
00032         virtual void beginRun(edm::Run &run);
00033         virtual void endRun(edm::Run &run);
00034         virtual bool produce(edm::Event &event);
00035 
00036         virtual void nextEvent();
00037 
00038         std::auto_ptr<lhef::LHEReader>          reader;
00039 
00040         boost::shared_ptr<lhef::LHERunInfo>     runInfoLast;
00041         boost::shared_ptr<lhef::LHERunInfo>     runInfo;
00042         boost::shared_ptr<lhef::LHEEvent>       partonLevel;
00043 
00044         boost::ptr_deque<LHERunInfoProduct>     runInfoProducts;
00045         bool                                    wasMerged;
00046 };
00047 
00048 #endif // GeneratorInterface_LHEInterface_LHESource_h