]>
Commit | Line | Data |
---|---|---|
aa9dd72b | 1 | $Id$ |
2 | ||
e661d480 | 3 | The Offline Condition DataBase is described extensively on ALICE Offline pages. |
4 | ||
de01cdf0 | 5 | Here you'll find only information relevant to the AliMUONCDB class |
6 | (formerly MUONCDB.C macro), which defines a set of functions to read/write | |
7 | MUON information to this CDB. Those functions are not meant to be used | |
8 | as black boxes. | |
9 | Please have a closer look before using (especially the ones writing to the CDB...) | |
e661d480 | 10 | |
11 | ------- | |
12 | Calibration data objects | |
13 | ------- | |
14 | ||
15 | We've designed generic data containers to store calibration information, | |
de01cdf0 | 16 | tailored to the way we usually access MUON tracker data, that is, |
17 | indexed by the pair (detElemId,manuId). | |
18 | This container is called AliMUONV2DStore. You can attach a TObject to every and | |
19 | each pair (detElemId,manuId). | |
20 | For the moment, that TObject is generally of AliMUONVCalibParam type, | |
21 | which handles a given number of channels (64 typically) as a group. | |
22 | There's also an AliMUONV1DStore for data types which only requires indexing | |
23 | by 1 value (like trigger masks for instance). | |
24 | As the class names suggest (V...), those classes are only interfaces. | |
25 | Concrete ones are AliMUON2DMap (used instead of a vector as detElemId are | |
26 | not contiguous) for the V2DStore, AliMUON1DArray (for things where indices are | |
27 | contiguous) and AliMUON1DMap for the V1DStore, and CalibParamNI (VCalibParam | |
28 | storing n integer per channel), and CalibParamNF | |
29 | (VCalibParam storing n floats per channel). | |
e661d480 | 30 | |
de01cdf0 | 31 | One exception are the HV values from DCS, which are stored "as they come" from |
32 | the shuttle-dcs interface, as a TMap, where the key is the aliasname (TString), | |
33 | and the value a TObjArray of AliDCSValue. | |
e661d480 | 34 | |
de01cdf0 | 35 | For trigger, the same virtual container idea applies, |
36 | except we're using 1D container (AliMUONV1DStore, for masks) or specific ones (for LUT | |
37 | and efficiency) | |
e661d480 | 38 | |
39 | -------- | |
40 | CDB location | |
41 | -------- | |
42 | ||
de01cdf0 | 43 | One very important notion is that of the DefaultStorage (which you might set with |
e661d480 | 44 | AliCDBManager::Instance()->SetDefaultStorage(path)), which tells the CDB library where |
45 | the CDB is sitting (either locally on disk, or on the grid). | |
46 | ||
de01cdf0 | 47 | For local tests, path will be most likely = local://$ALICE_ROOT/MUON |
48 | (i.e. there is, in CVS a slim version of the calibration objects needed | |
e661d480 | 49 | for running the MUON code), or local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB for Shuttle testing. |
50 | ||
51 | ------- | |
52 | Writing to CDB | |
53 | ------- | |
54 | ||
de01cdf0 | 55 | AliMUONCDB class is used to populate the CDB with fake calibration objects for testing purposes. |
e661d480 | 56 | Real calibration data will normally be handled by the Shuttle (see READMEshuttle). |
57 | ||
de01cdf0 | 58 | The various WriteXXX() methods may be used to populate MUON tracker and trigger |
59 | information. | |
60 | A full set of calibration data types can be created from scratch using, from | |
61 | the Root prompt (from within the $ALICE_ROOT/MUON directory to get the correct | |
62 | list of libraries loaded by the loadlibs.C macro) | |
63 | ||
64 | root[0] AliMUONCDB cdb; | |
65 | root[1] Int_t startRun = 0; | |
66 | root[2] Bool_t defaultValues = kTRUE; | |
67 | root[3] cdb.WriteTrigger(startRun); | |
68 | root[4] cdb.WriteTracker(defaultValues,startRun); | |
69 | ||
e661d480 | 70 | ------ |
71 | Reading the CDB | |
72 | ------ | |
73 | ||
74 | The actual reading is encapsulated into AliMUONCalibrationData class. | |
75 | e.g. to read pedestals for run 4567, one would do : | |
76 | ||
77 | AliCDBManager::Instance()->SetDefaultStorage(cdbPath); | |
78 | AliMUONCalibrationData cd(4567); | |
79 | AliMUONV2DStore* ped = cd.Pedestals(); | |
80 | ||
de01cdf0 | 81 | If you want to plot calibration data (not terribly usefull as it's a really global view), |
82 | use the Plot() function of AliMUONCDB, e.g. | |
e661d480 | 83 | |
de01cdf0 | 84 | AliMUONCDB cdb(cdbpath); |
85 | cdb.Plot(*ped,"pedestal") | |
e661d480 | 86 | |
87 | which will create 2 histograms : pedestal_0 (mean) and pedestal_1 (sigma). | |
88 | ||
de01cdf0 | 89 | You might also be interested in the AliMUONStoreHelper::Diff() method |
90 | which generates an AliMUONV2DStore containing the difference | |
91 | (either absolute or relative) of two AliMUONV2DStore. | |
e661d480 | 92 | |
93 |