StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
starlight.h
1 //
3 // Copyright 2010
4 //
5 // This file is part of starlight.
6 //
7 // starlight is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // starlight is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with starlight. If not, see <http://www.gnu.org/licenses/>.
19 //
21 //
22 // File and Version Information:
23 // $Rev:: $: revision of last commit
24 // $Author: jwebb $: author of last commit
25 // $Date: 2012/11/27 22:27:33 $: date of last commit
26 //
27 // Description:
28 //
29 //
30 //
32 
33 
34 #ifndef STARLIGHT_H
35 #define STARLIGHT_H
36 
37 #define Starlight_VERSION_MAJOR 1
38 #define Starlight_VERSION_MINOR 0
39 
40 
41 #include <string>
42 
43 #include "upcevent.h"
44 #include "eventchannel.h"
45 
46 
47 class inputParameters;
48 class beam;
49 class beamBeamSystem;
50 
51 
52 class starlight {
53 
54 public:
55 
56  starlight();
57  ~starlight();
58 
59  bool init();
60 
61  upcEvent produceEvent();
62 
63  std::string configFileName() const { return _configFileName; }
64  unsigned long nmbAttempts () const { return _eventChannel->nmbAttempts(); }
65  unsigned long nmbAccepted () const { return _eventChannel->nmbAccepted(); }
66 
67  void setInputParameters(inputParameters* inputParams) { _inputParameters = inputParams; }
68 
69 private:
70 
71  bool luminosityTableIsValid() const;
72 
73  bool createEventChannel();
74 
75  inputParameters* _inputParameters;
76  beam* _beam0;
77  beam* _beam1;
78  beamBeamSystem* _beamSystem;
79  eventChannel* _eventChannel;
80  unsigned int _nmbEventsPerFile;
81  unsigned long long _nmbEventsToGenerate;
82  std::string _configFileName;
83  std::string _eventDataFileName;
84  std::string _lumLookUpTableFileName;
85  bool _isInitialised;
86 
87 };
88 
89 
90 #endif // STARLIGHT_H
unsigned long nmbAccepted() const
returns number of accepted events
Definition: eventchannel.h:57
Definition: beam.h:43
unsigned long nmbAttempts() const
returns number of attempted events
Definition: eventchannel.h:56