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

Last change on this file since 1346 was 1337, checked in by tbretz, 22 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.5 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 TList fList;
33*/
34 virtual void CheckAndWrite() const;
35 virtual Bool_t IsFileOpen() const;
36 virtual Bool_t GetContainer(MParList *pList);
37 virtual const char *GetFileName() const { return fNameFile; }
38
39 void Init(const char *filename, const char *name, const char *title);
40
41public:
42 MWriteAsciiFile(const char *filename, const char *contname,
43 const char *name=NULL, const char *title=NULL);
44 MWriteAsciiFile(const char *filename, MParContainer *cont=NULL,
45 const char *name=NULL, const char *title=NULL);
46 ~MWriteAsciiFile();
47
48 void AddContainer(const char *cname, const char *member="", Double_t scale=1);
49 void AddContainer(MParContainer *cont, const char *member="", Double_t scale=1);
50
51 /*
52 Bool_t PreProcess(MParList *plist);
53 void Add(const char *rule);
54 */
55
56 ClassDef(MWriteAsciiFile, 0) // Class to write one container to an ascii file
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.