Replacement of AliMpIntPair object with algoritmic
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpDataProcessor.h
CommitLineData
228fd720 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
5
6/// \ingroup basic
7/// \class AliMpDataProcessor
8/// \brief Class for converting ASCII data files in the map of string
9///
10/// \author Ivana Hrivnacova, IPN Orsay
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
20class AliMpDataMap;
21
22class AliMpDataProcessor : public TObject
23{
24 public:
25 AliMpDataProcessor();
26 virtual ~AliMpDataProcessor();
27
28 // methods
29 AliMpDataMap* CreateDataMap(const TString& dataDir = "data" );
30 Bool_t GenerateData(AliMpDataMap* dataMap,
31 const TString& outputDataDir = "data_new" );
32 Bool_t GenerateCode(AliMpDataMap* dataMap);
33
34 private:
35
36 // methods
37 void ProcessDirectory(const TString& path, AliMpDataMap* map);
38 void ProcessFile(const TString& path, AliMpDataMap* map );
39 void GenerateFunction(const TString& path, const TString& data);
40 void GenerateFileCode(const TString& path);
41 void GenerateFill();
42
43 // static data
44 /// default name for generated header file
45 static const TString fgkHeaderFileName;
46 /// default name for generated implementation file
47 static const TString fgkImplFileName;
48
49 // data
50 Int_t fCounter; ///< data files counter
51 ofstream fHeaderFile; ///< header file
52 ofstream fImplFile; ///< implementation file
53
54 ClassDef(AliMpDataProcessor,0) // Helper class for sorted integer array
55};
56
57#endif //ALI_MP_DATA_PROCESSOR_H
58