CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FlatEGunASCIIWriter.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------
2 // FlatEGunASCIIWriter.h
3 // Author: Julia Yarba
4 //
5 // This code has been molded after examples in HepMC and HepPDT, and
6 // after single particle gun example (private contacts with Lynn Garren)
7 //
8 // Plus, it uses the ParameterSet funtionalities for "user interface"
9 //
10 // ----------------------------------------------------------------------
11 
12 #ifndef FlatEGunASCIIWriter_h
13 #define FlatEGunASCIIWriter_h
14 
15 // base class
17 
18 // for local things (data members)
19 #include <string>
20 
21 #include "HepPDT/defs.h"
22 #include "HepPDT/TableBuilder.hh"
23 #include "HepPDT/ParticleDataTable.hh"
24 
25 #include "HepMC/GenEvent.h"
26 #include "HepMC/IO_GenEvent.h"
27 
31 
32 namespace edm
33 {
34 
36  {
37 
38  public:
39 
40  // The following is not yet used, but will be the primary
41  // constructor when the parameter set system is available.
42  //
43  explicit FlatEGunASCIIWriter( const edm::ParameterSet& ) ;
44 
45  virtual ~FlatEGunASCIIWriter() ;
46 
47  virtual void analyze( const edm::Event&, const edm::EventSetup& );
48  virtual void beginJob() ;
49  virtual void beginRun( edm::Run&, const EventSetup& ) ;
50 
51  private:
52 
53 
54  // gun particle(s) characteristics
55  std::vector<int> fPartIDs ;
56  double fMinEta ;
57  double fMaxEta ;
58  double fMinPhi ;
59  double fMaxPhi ;
60  double fMinE ;
61  double fMaxE ;
62 
63  // the event format itself
64  HepMC::GenEvent* fEvt;
65 
66 
67  // HepMC/HepPDT related things
69 
70  std::string fOutFileName;
71  HepMC::IO_GenEvent * fOutStream ;
72 
73  int fCurrentEvent ; // event counter - untill I learn how to get it
74  // from edm::Event ) EventID ??? or what ?)
75 
76  };
77 
78 }
79 
80 #endif
std::vector< int > fPartIDs
ESHandle< HepPDT::ParticleDataTable > fPDGTable
FlatEGunASCIIWriter(const edm::ParameterSet &)
HepMC::IO_GenEvent * fOutStream
virtual void beginRun(edm::Run &, const EventSetup &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: Run.h:31