source: trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.h@ 1299

Last change on this file since 1299 was 1236, checked in by tbretz, 23 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#ifndef MARS_MWriteAsciiFile
2#define MARS_MWriteAsciiFile
3
4#ifndef MARS_MWriteFile
5#include "MWriteFile.h"
6#endif
7#ifndef ROOT_TObjArray
8#include <TObjArray.h>
9#endif
10
11class MWriteAsciiFile : public MWriteFile
12{
13private:
14 class MScale : public TNamed
15 {
16 private:
17 Double_t fScale;
18 public:
19 MScale(const char *name, const char *title, Double_t scale)
20 : TNamed(name, title), fScale(scale) {}
21 Double_t GetScale() const { return fScale; }
22 };
23
24 ofstream *fOut;
25
26 TObjArray fContNames;
27 TObjArray fContainer;
28 TObjArray fMembers;
29
30 TString fNameFile;
31
32 virtual void CheckAndWrite() const;
33 virtual Bool_t IsFileOpen() const;
34 virtual Bool_t GetContainer(MParList *pList);
35 virtual const char *GetFileName() const { return fNameFile; }
36
37 void Init(const char *filename, const char *name, const char *title);
38
39public:
40 MWriteAsciiFile(const char *filename, const char *contname,
41 const char *name=NULL, const char *title=NULL);
42 MWriteAsciiFile(const char *filename, MParContainer *cont=NULL,
43 const char *name=NULL, const char *title=NULL);
44 ~MWriteAsciiFile();
45
46 void AddContainer(const char *cname, const char *member="", Double_t scale=1);
47 void AddContainer(MParContainer *cont, const char *member="", Double_t scale=1);
48
49 ClassDef(MWriteAsciiFile, 0) // Class to write one container to an ascii file
50};
51
52#endif
Note: See TracBrowser for help on using the repository browser.