]>
Commit | Line | Data |
---|---|---|
324b1730 | 1 | #ifndef ALI_SURVEY_OBJ_H |
2 | #define ALI_SURVEY_OBJ_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | ///////////////////////////////////////////////////////////////////// | |
8 | // // | |
9 | // class AliSurveyObj // | |
10 | // Retrieve and Convert survey data into ROOT Objects // | |
11 | // // | |
12 | ///////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
15 | //#include <sstream> | |
16 | ||
17 | #include <TString.h> | |
18 | #include <TObjArray.h> | |
19 | ||
20 | //#include "AliLog.h" | |
21 | #include "AliSurveyPoint.h" | |
22 | ||
23 | class AliSurveyObj: public TObject { | |
24 | ||
25 | public: | |
26 | AliSurveyObj(); | |
27 | ~AliSurveyObj(); | |
573b6a5a | 28 | Bool_t FillFromLocalFile(const Char_t* filename); |
adfef030 | 29 | Bool_t Fill(TString detector, Int_t year, Int_t reportNumber, |
737100a1 | 30 | Int_t reportVersion, TString username); |
31 | ||
32 | // Number of points (AliSurveyPoint) in the TObjArray | |
324b1730 | 33 | Int_t GetEntries() const {return fDataPoints->GetEntries();}; |
573b6a5a | 34 | |
35 | TString GetReportTitle() const {return fTitle;}; | |
36 | TString GetReportDate() const {return fDate;}; | |
37 | TString GetDetector() const {return fDetector;}; | |
38 | TString GetURL() const {return fURL;}; | |
39 | Int_t GetReportNumber() const {return fReportNr;}; | |
40 | Int_t GetReportVersion() const {return fVersion;}; | |
737100a1 | 41 | |
42 | // General comments and observations | |
573b6a5a | 43 | TString GetObservations() const {return fObs;}; |
737100a1 | 44 | |
45 | // Coordinate system used for the measurements | |
573b6a5a | 46 | TString GetCoordSys() const {return fCoordSys;}; |
737100a1 | 47 | |
48 | // Units used in the measurement | |
573b6a5a | 49 | TString GetUnits() const {return fUnits;}; |
737100a1 | 50 | |
51 | // Number of columns read from file (in the "Data" section) | |
573b6a5a | 52 | Int_t GetNrColumns() const {return fNrColumns;}; |
737100a1 | 53 | |
54 | // TObjArray with the names of the columns read | |
573b6a5a | 55 | TObjArray *GetColumnNames() const {return fColNames.Tokenize(',');}; |
737100a1 | 56 | |
57 | // TObjArray with the points read (AliSurveyPoint) | |
573b6a5a | 58 | TObjArray *GetData() const {return fDataPoints;}; |
59 | ||
324b1730 | 60 | Bool_t IsValid() const {return fIsValid;}; |
61 | ||
62 | ||
63 | private: | |
64 | TString fTitle; // Report Title | |
65 | TString fDate; // Report Date | |
66 | TString fDetector; // Subdetector (or structure) surveyed | |
67 | TString fURL; // Report URL in EDMS | |
68 | Int_t fReportNr; // Report Number | |
69 | Int_t fVersion; // Report Version | |
70 | TString fObs; // General observations / comments | |
71 | TString fCoordSys; // Measurements coordinate system | |
72 | TString fUnits; // Measurements units | |
73 | Int_t fNrColumns; // Number of columns in data values | |
74 | TString fColNames; // Column names sepparated by commas | |
75 | Bool_t fIsValid; // Is the data valid? (sucessfully parsed) | |
737100a1 | 76 | |
77 | TString fGridUser; // Username to be used for the connection to GRID | |
324b1730 | 78 | |
79 | TObjArray *fDataPoints; // Actual Data | |
80 | ||
81 | Bool_t Connect(const char *gridUrl, const char *user); | |
82 | Bool_t OpenFile(TString openString); | |
83 | TString &Sanitize(TString str); | |
84 | Bool_t ParseBuffer(const Char_t* buf); | |
adfef030 | 85 | void Reset(); |
86 | ||
737100a1 | 87 | AliSurveyObj (const AliSurveyObj& surveyObj); |
88 | AliSurveyObj& operator=(const AliSurveyObj& surveyObj); | |
324b1730 | 89 | void AddPoint(AliSurveyPoint* point); |
adfef030 | 90 | |
324b1730 | 91 | ClassDef(AliSurveyObj, 1); |
92 | }; | |
93 | ||
94 | #endif |