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

Last change on this file since 9341 was 9186, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.8 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;
15
16class MCorsikaRead : public MRead
17{
18private:
19 MCorsikaRunHeader *fRunHeader; // run header information container to fill from file
20 MCorsikaEvtHeader *fEvtHeader; // event header information container to fill from file
21 MPhotonEvent *fEvent; // event information
22
23 Bool_t fForceMode; // Force mode skipping defect RUNE
24
25 TList *fFileNames; // list of file names
26 UInt_t fNumFile; //! number of next file
27 UInt_t fNumEvents; //! input stream (file to read from)
28 UInt_t fNumTotalEvents; //! total number of events in all files
29
30 ifstream *fIn; //! input stream (file to read from)
31
32 MParList *fParList; //! tasklist to call ReInit from
33
34 //UInt_t fInterleave;
35 //Bool_t fForce;
36
37 virtual Bool_t OpenStream() { return kTRUE; }
38
39 Bool_t ReadEvtEnd();
40 Int_t OpenNextFile(Bool_t print=kTRUE);
41 Bool_t CalcNumTotalEvents();
42 Bool_t ReadEvent(istream &fin);
43
44 Int_t PreProcess(MParList *pList);
45 Int_t Process();
46 Int_t PostProcess();
47
48public:
49 MCorsikaRead(const char *filename=NULL, const char *name=NULL, const char *title=NULL);
50 ~MCorsikaRead();
51
52 //static Byte_t IsFileValid(const char *name);
53
54 //void SetInterleave(UInt_t i) { fInterleave = i; }
55 void SetForceMode(Bool_t b=kTRUE) { fForceMode=b; }
56
57 TString GetFullFileName() const;
58
59 Int_t AddFile(const char *fname, Int_t entries=-1);
60 Bool_t Rewind();
61 UInt_t GetEntries() { return fNumTotalEvents/*/fInterleave*/; }
62
63 ClassDef(MCorsikaRead, 0) // Task to read the raw data binary file
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.