source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/simulation/detector/tools/include/OADBConverter.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 1.2 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: OADBConverter.hh 768 2004-06-16 13:35:19Z thea $
3// A.Thea, J.Watts created Mar, 22 2004
4
5#ifndef __OADBCONVERTER_HH_
6#define __OADBCONVERTER_HH_
7
8#include "TObject.h"
9#include "OADBTree.hh"
10#include <Riostream.h>
11#include <string>
12
13class OADBHeader;
14class OADBPhotons;
15
16
17enum OAEKeyType { kBegin, kEnd, kHeader, kPhotons, kWavelength, kAngle };
18
19class OADBConverter : public TObject {
20private:
21//    enum OAEKeyType { kBegin, kEnd, kHeader, kPhotons, kWavelength, kAngle };
22public:
23    // ctor
24    OADBConverter( OADBTree* );
25
26    // dtor
27    virtual ~OADBConverter();
28
29    // convert oatree into a binary ESAF-readable file
30    void SaveBinary( const char* );
31
32    // checks binary
33    void CheckBinary( const char* );
34
35    static string KeyWord( OAEKeyType );
36
37private:
38    // helper functions
39    // writing
40    void WriteHeader();
41    void WritePhotons();
42    void InsertBegin( OAEKeyType );
43    void InsertEnd( OAEKeyType );
44    //reading
45    void Read();
46   
47   
48    OADBTree *fTree;
49
50    OADBHeader *fHeader;
51    OADBPhotons *fPhotons;
52
53    fstream *fBinFile;
54    // length of the keywords
55    size_t fKeyLength;
56
57    ClassDef(OADBConverter,1)
58};
59
60#endif  /* __OADBCONVERTER_HH_ */
61
Note: See TracBrowser for help on using the repository browser.