Skip to content
Snippets Groups Projects
HepMCRdr.h 774 B
Newer Older
fangwx@ihep.ac.cn's avatar
V3
fangwx@ihep.ac.cn committed
#ifndef HepMCRdr_h
#define HepMCRdr_h 1

#include "GaudiKernel/AlgTool.h"

fangwx@ihep.ac.cn's avatar
V3
fangwx@ihep.ac.cn committed
#include "GenReader.h"
#include "GenEvent.h"

#include "HepMC/IO_GenEvent.h"//HepMC
#include "HepMC/GenEvent.h"


class HepMCRdr: public extends<AlgTool, GenReader> {
fangwx@ihep.ac.cn's avatar
V3
fangwx@ihep.ac.cn committed

    public:
        using extends::extends;
fangwx@ihep.ac.cn's avatar
V3
fangwx@ihep.ac.cn committed
        ~HepMCRdr();

        StatusCode initialize() override;
        StatusCode finalize() override;    

        bool configure_gentool();               
fangwx@ihep.ac.cn's avatar
V3
fangwx@ihep.ac.cn committed
        bool mutate(MyHepMC::GenEvent& event);    
        bool finish();
        bool isEnd();
    private:
        HepMC::IO_GenEvent *ascii_in{nullptr};
        long m_total_event{-1};
        long m_processed_event{-1};

        // input file name
        Gaudi::Property<std::string> m_filename{this, "Input"};

fangwx@ihep.ac.cn's avatar
V3
fangwx@ihep.ac.cn committed
};

#endif