MINT2
FromFileGenerator.h
Go to the documentation of this file.
1 #ifndef FROM_FILE_GENERATOR_HH
2 #define FROM_FILE_GENERATOR_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:17:59 GMT
5 
6 #include "Mint/IEventGenerator.h"
7 #include "Mint/IDalitzEvent.h"
8 #include "Mint/BaseGenerator.h"
9 #include "Mint/DalitzEvent.h"
11 #include "Mint/counted_ptr.h"
12 #include "Mint/NamedParameter.h"
13 
14 #include <string>
15 
17 : public BaseGenerator
18 , virtual public MINT::IEventGenerator<IDalitzEvent>{
19  protected:
20  std::string _opt;
23  unsigned int _listIndex;
26  std::vector<int> _bootstrap_indices;
27 
29  public:
30  FromFileGenerator(const std::string& fname = "integrationEvents.root"
31  , const std::string& ntpName = "DalitzEventList");
32 
33  FromFileGenerator(const std::string& fname
34  , MINT::IEventGenerator<IDalitzEvent>* addThisWhenFileEmpty
35  , const std::string& opt=""
36  , const std::string& ntpName = "DalitzEventList"
37  );
38 
39  virtual ~FromFileGenerator(){}
40 
41  // option "" defaults to "UPDATE" if addThisWhenFileEmpty != 0 and
42  // "READ" otherwise (this sets the option with which the root file
43  // containing the events is opened). If you want to override this behaviour
44  // set the option explicitly.
45 
47 
48  // this one below is required by MINT::IEventGenerator<IDalitzEvent>
49  // similar to above, except it's a pointer to
50  // IDalitzEvent, not DalitzEvent.
52  virtual bool exhausted() const;
53  virtual bool ensureFreshEvents();
54  virtual bool saveFile();
55  virtual bool closeFile();
56 
58  const DiskResidentEventList& getEventList() const;
59 
60 };
61 
62 #endif
63 //
MINT::IEventGenerator< IDalitzEvent > * _gen
virtual bool saveFile()
std::vector< int > _bootstrap_indices
virtual bool exhausted() const
FromFileGenerator(const std::string &fname="integrationEvents.root", const std::string &ntpName="DalitzEventList")
unsigned int _listIndex
virtual MINT::counted_ptr< IDalitzEvent > newEventFromGenerator()
virtual ~FromFileGenerator()
MINT::NamedParameter< int > _doBootstrap
DiskResidentEventList & getEventList()
virtual bool closeFile()
virtual bool ensureFreshEvents()
virtual MINT::counted_ptr< IDalitzEvent > newDalitzEvent()
virtual MINT::counted_ptr< IDalitzEvent > newEvent()
DiskResidentEventList _dL