ArtificialShowerFile.h
Go to the documentation of this file.
1 #ifndef _io_ArtificialShowerFile_h_
2 #define _io_ArtificialShowerFile_h_
3 
4 #include <io/VEventFile.h>
5 #include <io/IoCodes.h>
6 
8 #include <utl/GeometryUtilities.h>
9 
10 #include <fstream>
11 
12 
13 namespace evt {
14  class Event;
15  class ShowerSimData;
16 }
17 
18 namespace io {
19 
20  class ArtificialShowerFileParticleIterator;
21 
22 
33  public:
35  ArtificialShowerFile(const std::string& fileName, const Mode mode = eRead, utl::Branch* const b = nullptr);
36  virtual ~ArtificialShowerFile() { }
37 
38  void Open(const std::string& fileName, const Mode mode = eRead, utl::Branch* const b = nullptr) override;
39  void Close() override { fIsOpen = false; }
40  Status Read(evt::Event& event) override;
41  void Write(const evt::Event& event) override;
42  Status FindEvent(const unsigned int eventId) override;
43  Status GotoPosition(const unsigned int position) override;
44  int GetNEvents() override;
45 
46  private:
47  void ReadXMLParameters();
49 
51  double fPrimaryEnergy = 0;
52  double fZenith = 0;
53  double fAzimuth = 0;
54  //double fMaxRadius = 0; // unused. LN.
55  //double fMuonEnergy = 0; // unused. LN.
56  //double fPhotonEnergy = 0; // unused. LN.
57  //double fElectronEnergy = 0; // unused. LN.
59  //double fPhotonDensity = 0; // unused. LN.
60  //double fElectronDensity = 0; // unused. LN.
61  //double fParticleZenith = 0; // unused. LN.
62  //double fParticleAzimuth = 0; // unused. LN.
63  //double fParticleTime = 0; // unused. LN.
64  //double fParticleWeight = 0; // unused. LN.
65  //bool fRandomAzimuth = false; // unused. LN.
66  bool fIsOpen = false;
67  int fReadEvents = 0;
68  };
69 
70 }
71 
72 
73 #endif
Status FindEvent(const unsigned int eventId) override
seek Event id set cursor there
bool fIsOpen
double fMuonDensity = 0; // unused. LN.
ArtificialShowerFileParticleIterator fArtificialShowerFileParticleIterator
Mode
Available open modes.
Definition: IoCodes.h:16
void Write(const evt::Event &event) override
Status Read(evt::Event &event) override
read current event advance cursor by 1
Class representing a document branch.
Definition: Branch.h:107
Artificial shower generator: uniform particle density, direction.
Status
Return code for seek operation.
Definition: IoCodes.h:24
Status GotoPosition(const unsigned int position) override
goto by position in the file
void Open(const std::string &fileName, const Mode mode=eRead, utl::Branch *const b=nullptr) override

, generated on Tue Sep 26 2023.