FairPlutoGenerator.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // -------------------------------------------------------------------------
  2. // ----- FairPlutoGenerator header file -----
  3. // ----- Created 13/07/04 by V. Friese / D.Bertini -----
  4. // -------------------------------------------------------------------------
  5. /** FairPlutoGenerator.h
  6. *@author V.Friese <v.friese@gsi.de>
  7. *@author D.Bertini <d.bertini@gsi.de>
  8. *
  9. The FairPlutoGenerator reads the PLUTO output file (ROOT format)
  10. and inserts the tracks into the FairStack via the FairPrimaryGenerator.
  11. Derived from FairGenerator.
  12. **/
  13. #ifndef FAIR_PLUTOGENERATOR_H
  14. #define FAIR_PLUTOGENERATOR_H
  15. #include "FairGenerator.h"
  16. class TClonesArray;
  17. class TFile;
  18. class TTree;
  19. class TVirtualMCStack;
  20. class FairPrimaryGenerator;
  21. class FairPlutoGenerator : public FairGenerator
  22. {
  23. public:
  24. /** Default constructor (should not be used) **/
  25. FairPlutoGenerator();
  26. /** Standard constructor
  27. ** @param fileName The input (PLUTO) file name
  28. **/
  29. FairPlutoGenerator(const Char_t* fileName);
  30. /** Destructor **/
  31. virtual ~FairPlutoGenerator();
  32. /** Reads on event from the input file and pushes the tracks onto
  33. ** the stack. Abstract method in base class.
  34. ** @param primGen pointer to the FairPrimaryGenerator
  35. **/
  36. virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
  37. private:
  38. Int_t iEvent; //! Event number
  39. const Char_t* fFileName; //! Input file name
  40. TFile* fInputFile; //! Pointer to input file
  41. TTree* fInputTree; //! Pointer to input tree
  42. TClonesArray* fParticles; //! Particle array from PLUTO
  43. /** Private method CloseInput. Just for convenience. Closes the
  44. ** input file properly. Called from destructor and from ReadEvent. **/
  45. void CloseInput();
  46. FairPlutoGenerator(const FairPlutoGenerator&);
  47. FairPlutoGenerator& operator=(const FairPlutoGenerator&);
  48. ClassDef(FairPlutoGenerator,1);
  49. };
  50. #endif