Fix for the problem during PbPb run of Nov 2010 (Indra)
[u/mrichter/AliRoot.git] / macros / SurveyAliSurveyObjExample.C
CommitLineData
cfcb9ce7 1void SurveyAliSurveyObjExample()
2{
3 AliSurveyObj *so = new AliSurveyObj();
4
5 Int_t size = so->GetEntries();
6 printf("-> %d\n", size);
7
8 // so->FillFromLocalFile("~/survey/real_data/Survey_781282_HMPID.txt");
9 // size = so->GetEntries();
10 // printf("--> %d\n", size);
11
12 so->Fill("HMPID", 2006, 781282, 1);
13 size = so->GetEntries();
14 printf("---> %d\n", size);
15
16 // so->Fill("TRD", 2007, 816582, 1);
17 // size = so->GetEntries();
18 // printf("----> %d\n", size);
19
20 Printf("Title: \"%s\"", so->GetReportTitle().Data());
21 Printf("Date: \"%s\"", so->GetReportDate().Data());
22 Printf("Detector: \"%s\"", so->GetDetector().Data());
23 Printf("URL: \"%s\"", so->GetURL().Data());
24 Printf("Number: \"%d\"", so->GetReportNumber());
25 Printf("Version: \"%d\"", so->GetReportVersion());
26 Printf("Observations: \"%s\"", so->GetObservations().Data());
27 Printf("Coordinate System: \"%s\"", so->GetCoordSys().Data());
28 Printf("Measurement Units: \"%s\"", so->GetUnits().Data());
29 Printf("Nr Columns: \"%d\"", so->GetNrColumns());
30
31 TObjArray *colNames = so->GetColumnNames();
32 for (Int_t i = 0; i < colNames->GetEntries(); ++i)
33 Printf(" Column %d --> \"%s\"", i, ((TObjString *) colNames->At(i))->GetString().Data());
34
35 Printf("Points:");
36 TObjArray *points = so->GetData();
37 for (Int_t i = 0; i < points->GetEntries(); ++i)
38 Printf(" Point %d --> \"%s\"", i, ((AliSurveyPoint *) points->At(i))->GetPointName().Data());
39
40 // See "STEER/AliSurveyPoint.h" for more getters
41
42 return;
43}