1 #ifndef ALI_SURVEY_OBJ_H
2 #define ALI_SURVEY_OBJ_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 /////////////////////////////////////////////////////////////////////
9 // class AliSurveyObj //
10 // Retrieve and Convert survey data into ROOT Objects //
12 /////////////////////////////////////////////////////////////////////
18 #include <TObjArray.h>
21 #include "AliSurveyPoint.h"
23 class AliSurveyObj: public TObject {
28 Bool_t FillFromLocalFile(const Char_t* filename);
29 Bool_t Fill(TString detector, Int_t year, Int_t reportNumber,
30 Int_t reportVersion, TString username);
32 // Number of points (AliSurveyPoint) in the TObjArray
33 Int_t GetEntries() const {return fDataPoints->GetEntries();};
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;};
42 // General comments and observations
43 TString GetObservations() const {return fObs;};
45 // Coordinate system used for the measurements
46 TString GetCoordSys() const {return fCoordSys;};
48 // Units used in the measurement
49 TString GetUnits() const {return fUnits;};
51 // Number of columns read from file (in the "Data" section)
52 Int_t GetNrColumns() const {return fNrColumns;};
54 // TObjArray with the names of the columns read
55 TObjArray *GetColumnNames() const {return fColNames.Tokenize(',');};
57 // TObjArray with the points read (AliSurveyPoint)
58 TObjArray *GetData() const {return fDataPoints;};
60 Bool_t IsValid() const {return fIsValid;};
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)
77 TString fGridUser; // Username to be used for the connection to GRID
79 TObjArray *fDataPoints; // Actual Data
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);
87 AliSurveyObj (const AliSurveyObj& surveyObj);
88 AliSurveyObj& operator=(const AliSurveyObj& surveyObj);
89 void AddPoint(AliSurveyPoint* point);
91 ClassDef(AliSurveyObj, 1);