]>
Commit | Line | Data |
---|---|---|
cf806c6a | 1 | TList medias; |
2 | ||
3 | void | |
4 | ConvertGeom() | |
5 | { | |
6 | ||
7 | std::ostream output("foo.C"); | |
8 | TGeoVolume* top = gGeoManager->GetTopVolume(); | |
9 | TGeoIterator next(top); | |
10 | TGeoNode* node = 0; | |
11 | ||
12 | // Iterate through all nodes, and write out the mediums used. | |
13 | while ((node = next())) { | |
14 | TGeoMedium* med = node->GetMedium(); | |
15 | if (medias->Find(med)) { | |
16 | Info("ConvertGeom", "Already has medium %s", med->GetName()); | |
17 | continue; | |
18 | } | |
19 | medias->Add(med); | |
20 | output << " {\n" | |
21 | << " Double_t p[] = { " << std::flush; | |
22 | for (Int_t i = 0; i < 10; i++) { | |
23 | if (i != 0) output << ", "; | |
24 | output << med->GetPar(i); | |
25 | } | |
26 | output << std::endl; | |
27 | } | |
28 | } | |
29 | ||
30 | ||
31 |