AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpDataProcessor.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 
11 
12 #ifndef ALI_MP_DATA_PROCESSOR_H
13 #define ALI_MP_DATA_PROCESSOR_H
14 
15 #include <TObject.h>
16 #include <TString.h>
17 
18 #include <fstream>
19 
20 using std::ofstream;
21 
22 class AliMpDataMap;
23 
24 class AliMpDataProcessor : public TObject
25 {
26  public:
28  virtual ~AliMpDataProcessor();
29 
30  // methods
31  AliMpDataMap* CreateDataMap(const TString& dataDir = "data" );
32  Bool_t GenerateData(AliMpDataMap* dataMap,
33  const TString& outputDataDir = "data_new" );
34  Bool_t GenerateCode(AliMpDataMap* dataMap);
35 
36  private:
37  // static methods
38  static const TString& GetHeaderFileName();
39  static const TString& GetImplFileName();
40 
41  // methods
42  void ProcessDirectory(const TString& path, AliMpDataMap* map);
43  void ProcessFile(const TString& path, AliMpDataMap* map );
44  void GenerateFunction(const TString& path, const TString& data);
45  void GenerateFileCode(const TString& path);
46  void GenerateFill();
47 
48  // data
49  Int_t fCounter;
50  ofstream fHeaderFile;
51  ofstream fImplFile;
52 
53  ClassDef(AliMpDataProcessor,0) // Helper class for sorted integer array
54 };
55 
56 #endif //ALI_MP_DATA_PROCESSOR_H
57 
AliMpDataMap * CreateDataMap(const TString &dataDir="data")
void GenerateFunction(const TString &path, const TString &data)
void ProcessDirectory(const TString &path, AliMpDataMap *map)
void GenerateFileCode(const TString &path)
ofstream fHeaderFile
header file
static const TString & GetImplFileName()
ofstream fImplFile
implementation file
Int_t fCounter
data files counter
TObject class containing a map of strings to strings.
Definition: AliMpDataMap.h:21
Class for converting ASCII data files in the map of string.
void ProcessFile(const TString &path, AliMpDataMap *map)
Bool_t GenerateData(AliMpDataMap *dataMap, const TString &outputDataDir="data_new")
static const TString & GetHeaderFileName()
Bool_t GenerateCode(AliMpDataMap *dataMap)