visscan_init.C - handle null pointers returned from xyz_clusters.C.
AliEveEventManager::AssertGeometry();
AliEveEventManager::AssertGeometry();
- TEvePointSet* clusters = new TEvePointSet(kMaxCl);
- clusters->SetOwnIds(kTRUE);
-
AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
rl->LoadRecPoints("TPC");
AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
rl->LoadRecPoints("TPC");
- AliTPCClustersRow *clrow=new AliTPCClustersRow();
+ TTree *cTree = rl->GetTreeR("TPC", false);
+ if (cTree == 0)
+ return 0;
+
+ AliTPCClustersRow *clrow = new AliTPCClustersRow();
clrow->SetClass("AliTPCclusterMI");
clrow->SetArray(kMaxCl);
clrow->SetClass("AliTPCclusterMI");
clrow->SetArray(kMaxCl);
-
- TTree *cTree = rl->GetTreeR("TPC", false);
cTree->SetBranchAddress("Segment", &clrow);
cTree->SetBranchAddress("Segment", &clrow);
+ TEvePointSet* clusters = new TEvePointSet(kMaxCl);
+ clusters->SetOwnIds(kTRUE);
+
+
Float_t maxRsqr = maxR*maxR;
Int_t nentr=(Int_t)cTree->GetEntries();
for (Int_t i=0; i<nentr; i++)
Float_t maxRsqr = maxR*maxR;
Int_t nentr=(Int_t)cTree->GetEntries();
for (Int_t i=0; i<nentr; i++)
{
try {
TEvePointSet* itsc = its_clusters();
{
try {
TEvePointSet* itsc = its_clusters();
- itsc->SetMarkerColor(5);
+ if (itsc) {
+ itsc->SetMarkerColor(5);
+ }
TEvePointSet* tpcc = tpc_clusters();
TEvePointSet* tpcc = tpc_clusters();
- tpcc->SetMarkerColor(4);
+ if (tpcc) {
+ tpcc->SetMarkerColor(4);
+ }
TEvePointSet* trdc = trd_clusters();
TEvePointSet* trdc = trd_clusters();
- trdc->SetMarkerColor(7);
- trdc->SetMarkerStyle(4);
- trdc->SetMarkerSize(0.5);
+ if (trdc) {
+ trdc->SetMarkerColor(7);
+ trdc->SetMarkerStyle(4);
+ trdc->SetMarkerSize(0.5);
+ }
}
catch(TEveException& exc) {
printf("Exception loading ITS/TPC clusters: %s\n", exc.Data());
}
catch(TEveException& exc) {
printf("Exception loading ITS/TPC clusters: %s\n", exc.Data());