geometry locking. This is now properly handled in TEveManager.
Call DefaultColors() on newly imported geometries.
Replace old, backup geometry alice-data/alice_fullgeo.root with a
recent one (colors sanitized manually). Register it as default
geometry in alieve initialization.
In geometry macros use the default geometry.
Weed-out all references to obsolete environment var REVESYS.
Fix raw-data macros for PMD and TOF so that they use
AliEveEventManager to get their hands on a raw-reader.
::Warning(kEH, "mismatch of alignable volumes. Proceeding.");
// throw (kEH + "could not apply align objs.");
}
-
- // @@NEWROOT@@ Temporary fix.
- // In AliEve several simplified geometries can be loaded at a later stage.
- // Locking/unlocking is now handled properly in
- // TEveManager::GetGeometry() but we're waiting for next root
- // version due on 14.5.2008.
- TGeoManager::UnlockGeometry();
+ AliGeomManager::GetGeometry()->DefaultColors();
}
gGeoManager = AliGeomManager::GetGeometry();
for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
- //fGeoManager = (TGeoManager*)gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ //fGeoManager = AliEveEventManager::AssertGeometry();
if (!fGeoManager) {
printf("ERROR: no TGeo\n");
}
fGeoManager(0)
{
- //fGeoManager = (TGeoManager*)gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ //fGeoManager = AliEveEventManager::AssertGeometry();
if (!fGeoManager) printf("ERROR: no TGeo\n");
}
TTree* dt = rl->GetTreeD("EMCAL",false);
TTree *rt = rl->GetTreeR("EMCAL",false);
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode("XEN1_1");
TGeoHMatrix* m = gGeoManager->GetCurrentMatrix();
emcal_data = new AliEveEMCALData(rl,node,m);
rl->LoadDigits("EMCAL");
TTree* dt = rl->GetTreeD("EMCAL", kFALSE);
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode("XEN1_1");
TGeoBBox* bbbox = (TGeoBBox*) node->GetDaughter(0) ->GetVolume()->GetShape();
void geom_all()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
TEveGeoTopNode* topn_re = new TEveGeoTopNode(gGeoManager, gGeoManager->GetTopNode());
gEve->AddGlobalElement(topn_re);
void geom_ddip()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
+
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode("DDIP_1");
TEveGeoTopNode* re = new TEveGeoTopNode(gGeoManager, node);
void geom_emcal()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
+
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode("XEN1_1");
TEveGeoTopNode* emcal_re = new TEveGeoTopNode(gGeoManager, node);
TEveGeoShape* geom_gentle()
{
- TFile f("$REVESYS/alice-data/gentle_geo.root");
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
gEve->AddGlobalElement(gsre);
TEveGeoShape* geom_gentle_trd()
{
- TFile f("$REVESYS/alice-data/gentle_geo_trd.root");
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_trd.root");
TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle TRD");
TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
gEve->AddGlobalElement(gsre);
void geom_hmpid()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
TEveElementList* list = new TEveElementList("HMPID");
gEve->AddGlobalElement(list);
void geom_its()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
+
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode("ITSV_1");
TEveGeoTopNode* its_re = new TEveGeoTopNode(gGeoManager, node);
void geom_phos()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
TEveElementList* list = new TEveElementList("PHOS");
gEve->AddGlobalElement(list);
void geom_pmd()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
for(Int_t i=1; i<=4; ++i) {
//PH The line below is replaced waiting for a fix in Root
void geom_simple()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/simple_geo.root");
+ gGeoManager = gEve->GetGeometry("$ALICE_ROOT/EVE/alice-data/simple_geo.root");
TEveGeoTopNode* topn_re = new TEveGeoTopNode(gGeoManager, gGeoManager->GetTopNode());
gEve->AddGlobalElement(topn_re);
void geom_t0()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
TEveElementList* list = new TEveElementList("T0");
gEve->AddGlobalElement(list);
void geom_tpc()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
+
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode("TPC_M_1");
TEveGeoTopNode* tpc_re = new TEveGeoTopNode(gGeoManager, node);
void geom_trd_tof()
{
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
+
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode("B077_1");
TEveGeoTopNode* its_re = new TEveGeoTopNode(gGeoManager, node);
{
static const TEveException kEH("geom_vzero() ");
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetDefaultGeometry();
TEveElementList* list = new TEveElementList("VZero");
gEve->AddGlobalElement(list);
// ---------------------------------------------------------------------- //
void pmd_raw(Int_t mode = 0)
{
+ AliRawReader *reader = AliEveEventManager::AssertRawReader();
+
gStyle->SetPalette(1, 0);
TString sddl;
TString bsddl="DDL";
- Int_t ievt = 0;
- AliRawReaderRoot reader("raw.root",ievt);
- AliPMDRawStream stream(&reader);
+ AliPMDRawStream stream(reader);
gEve->DisableRedraw();
Int_t iddl = -1;
- while ((iddl = rawStream.DdlData(&pmdddlcont)) >=0) {
+ while ((iddl = stream.DdlData(pmdddlcont)) >=0) {
if (iddl >= istartDDL && iddl < iendDDL){
sddl = bsddl;
sddl += iddl;
TEveElementList* lddl = new TEveElementList(sddl.Data());
// l->SetMainColor(3);
- gEve->AddElement(ddl, lplane);
+ lplane->AddElement(lddl);
modnumber = iddl*6;
AliEvePMDModule *lmodule = new AliEvePMDModule();
lmodule->SetPosition(0.,0.,zpos);
lmodule->DisplayRawData(modnumber,pmdddlcont);
- gEve->AddElement(lmodule, lddl);
+ lddl->AddElement(lmodule);
modnumber++;
if (iddl == 4 && modnumber == 30) modnumber = 42;
}
pmdddlcont->Clear();
}
}
-
- gEve->EnableRedraw();
}
-
+ gEve->EnableRedraw();
}
// ---------------------------------------------------------------------- //
{
TClonesArray *array = 0x0;
- TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
+ TGeoManager *localGeoManager = gEve->GetGeometry("./geometry.root");// gGeoManager = gEve->GetDefaultGeometry();
if (!localGeoManager) {
printf("ERROR: no TGeo\n");
}
void tof_digits_sector(Int_t sector=0)
{
- TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
+ TGeoManager *localGeoManager = gEve->GetGeometry("./geometry.root");// gGeoManager = gEve->GetDefaultGeometry();
if (!localGeoManager) {
printf("ERROR: no TGeo\n");
}
Int_t nDigitsInVolume[3] = {-1, -1, -1};
Int_t nStrips=19;
- TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
+ TGeoManager *localGeoManager = gEve->GetGeometry("./geometry.root");// gGeoManager = gEve->GetDefaultGeometry();
+
if (!localGeoManager) {
printf("ERROR: no TGeo\n");
}
-void tof_raw(const char *input = "raw.root",
- const char *geometry = "geometry.root",
- Int_t event = 0,
- Bool_t newDecoder = kFALSE)
+void tof_raw(Bool_t newDecoder = kFALSE)
{
+ AliRawReader *rawReader = AliEveEventManager::AssertRawReader();
TClonesArray *array = 0x0;
- if (gSystem->AccessPathName(input, kReadPermission))
- {
- Error("tof_raw", "file '%s' not found.", input);
- return;
- }
-
- TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry(geometry);
+ TGeoManager *localGeoManager = gEve->GetDefaultGeometry();
if (!localGeoManager) {
printf("ERROR: no TGeo\n");
}
- AliRawReader *rawReader = NULL;
- TString fileName(input);
- if (fileName.EndsWith("/")) {
- rawReader = new AliRawReaderFile(fileName);
- } else if (fileName.EndsWith(".root")) {
- rawReader = new AliRawReaderRoot(fileName);
- } else if (!fileName.IsNull()) {
- rawReader = new AliRawReaderDate(fileName);
- rawReader->SelectEvents(7);
- }
-
AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
-
- for (Int_t ev=0; rawReader->NextEvent(); ev++) {
- if (ev==event) {
-
- if (di) {
- di->Delete();
- di = new AliEveTOFDigitsInfo();
- }
-
- di->ReadRaw(rawReader, newDecoder);
- continue;
- }
-
- else continue;
-
- }
+ di->ReadRaw(rawReader, newDecoder);
AliTOFGeometry* g = new AliTOFGeometry();
}
gEve->EnableRedraw();
-
}
{
static const TEveException kEH("alieve::main");
- if (gSystem->Getenv("REVESYS") == 0) {
- if (gSystem->Getenv("ALICE_ROOT") != 0) {
- Info(kEH.Data(), "setting REVESYS from ALICE_ROOT.");
- gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
- } else {
- Error(kEH.Data(), "REVESYS not defined, neither is ALICE_ROOT.");
- gSystem->Exit(1);
- }
+ if (gSystem->Getenv("ALICE_ROOT") == 0)
+ {
+ Error(kEH.Data(), "ALICE_ROOT is not defined, aborting.");
+ gSystem->Exit(1);
}
- if (gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) {
- Error(kEH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS"));
+
+ TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
+
+ if (gSystem->AccessPathName(evedir) == kTRUE)
+ {
+ Error(kEH.Data(), "Directory $ALICE_ROOT/EVE does not exist.");
gSystem->Exit(1);
}
TString macPath(gROOT->GetMacroPath());
- macPath += Form(":%s/macros", gSystem->Getenv("REVESYS"));
- gInterpreter->AddIncludePath(gSystem->Getenv("REVESYS"));
- if (gSystem->Getenv("ALICE_ROOT") != 0) {
- macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS"));
+ macPath += Form(":%s/macros", evedir.Data());
+ gInterpreter->AddIncludePath(evedir);
+ if (gSystem->Getenv("ALICE_ROOT") != 0)
+ {
+ macPath += Form(":%s/alice-macros", evedir.Data());
gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
TEveManager::Create();
+ gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/alice_fullgeo.root", evedir.Data()));
+
app.Run(); // Never returns.
delete log;
TEveGeoShape* geom_hlt()
{
- TFile f("$REVESYS/alice-data/gentle_geo.root");
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse, 0);
f.Close();
// Put macros in the list of browsables, add a macro browser to
// top-level GUI.
- TString macdir("$(REVESYS)/alice-macros");
+ TString macdir("$(ALICE_ROOT)/EVE/alice-macros");
gSystem->ExpandPathName(macdir);
TFolder* f = gEve->GetMacroFolder();
// Extract reasonably top-level mother-volumes of TRD and
// store them as geo-shape-extract.
- gGeoManager = gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
+ gGeoManager = gEve->GetGeometry("$ALICE_ROOT/EVE/alice-data/alice_fullgeo.root");
TGeoNode* tnode = gGeoManager->GetTopVolume()->FindNode("B077_1");