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 |
|
---|
11 | class MData;
|
---|
12 |
|
---|
13 | class MWriteAsciiFile : public MWriteFile
|
---|
14 | {
|
---|
15 | private:
|
---|
16 | ofstream *fOut; //! ascii file
|
---|
17 |
|
---|
18 | TString fNameFile; // name of the ascii file
|
---|
19 |
|
---|
20 | TObjArray fList; // list of rules and containers to be written
|
---|
21 | TObjArray fAutoDel; //! List of object to be deleted in the destructor
|
---|
22 |
|
---|
23 | virtual void CheckAndWrite() const;
|
---|
24 | virtual Bool_t IsFileOpen() const;
|
---|
25 | virtual Bool_t GetContainer(MParList *pList);
|
---|
26 | virtual const char *GetFileName() const { return fNameFile; }
|
---|
27 |
|
---|
28 | void Init(const char *filename, const char *name, const char *title);
|
---|
29 |
|
---|
30 | public:
|
---|
31 | MWriteAsciiFile(const char *filename, const char *contname,
|
---|
32 | const char *name=NULL, const char *title=NULL);
|
---|
33 | MWriteAsciiFile(const char *filename, MParContainer *cont=NULL,
|
---|
34 | const char *name=NULL, const char *title=NULL);
|
---|
35 | ~MWriteAsciiFile();
|
---|
36 |
|
---|
37 | void AddColumn(const TString rule);
|
---|
38 | void AddColumn(MParContainer *cont, const TString member="", Double_t scale=1);
|
---|
39 | void AddColumns(const TString name);
|
---|
40 | void AddColumns(MParContainer *cont);
|
---|
41 |
|
---|
42 | ClassDef(MWriteAsciiFile, 0) // Class to write one container to an ascii file
|
---|
43 | };
|
---|
44 |
|
---|
45 | #endif
|
---|