source: trunk/MagicSoft/Mars/mcorsika/MCorsikaRead.h@ 9620

Last change on this file since 9620 was 9616, checked in by rohlfs, 14 years ago
can read also EventIO files
File size: 1.9 KB
Line 
1#ifndef MARS_MCorsikaRead
2#define MARS_MCorsikaRead
3
4#ifndef MARS_MRead
5#include "MRead.h"
6#endif
7
8class TList;
9//class MZlib;
10class MTaskList;
11
12class MCorsikaRunHeader;
13class MCorsikaEvtHeader;
14class MPhotonEvent;
15class MCorsikaFormat;
16
17class MCorsikaRead : public MRead
18{
19private:
20 MCorsikaRunHeader *fRunHeader; //! run header information container to fill from file
21 MCorsikaEvtHeader *fEvtHeader; //! event header information container to fill from file
22 MPhotonEvent *fEvent; //! event information
23
24 Bool_t fForceMode; // Force mode skipping defect RUNE
25
26 TList *fFileNames; // list of file names
27 UInt_t fNumFile; //! number of next file
28 UInt_t fNumEvents; //! input stream (file to read from)
29 UInt_t fNumTotalEvents; //! total number of events in all files
30
31 ifstream *fIn; //! input stream (file to read from)
32 MCorsikaFormat * fInFormat; //! access to input corsika data
33
34 MParList *fParList; //! tasklist to call ReInit from
35
36 //UInt_t fInterleave;
37 //Bool_t fForce;
38
39 virtual Bool_t OpenStream() { return kTRUE; }
40
41 Bool_t ReadEvtEnd();
42 Int_t OpenNextFile(Bool_t print=kTRUE);
43 Bool_t CalcNumTotalEvents();
44 Bool_t ReadEvent();
45
46 Int_t PreProcess(MParList *pList);
47 Int_t Process();
48 Int_t PostProcess();
49
50public:
51 MCorsikaRead(const char *filename=NULL, const char *name=NULL, const char *title=NULL);
52 ~MCorsikaRead();
53
54 //static Byte_t IsFileValid(const char *name);
55
56 //void SetInterleave(UInt_t i) { fInterleave = i; }
57 void SetForceMode(Bool_t b=kTRUE) { fForceMode=b; }
58
59 TString GetFullFileName() const;
60
61 Int_t AddFile(const char *fname, Int_t entries=-1);
62 Bool_t Rewind();
63 UInt_t GetEntries() { return fNumTotalEvents/*/fInterleave*/; }
64
65 ClassDef(MCorsikaRead, 0) // Task to read the raw data binary file
66};
67
68#endif
Note: See TracBrowser for help on using the repository browser.