Project

General

Profile

Support #1089

SciFiHit usage

Added by Dobbs, Adam almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Tracker
Target version:
Start date:
05 August 2012
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

Description

Currently writing unit tests for SciFiEvent in the MAUS namespace, which uses the SciFiHit derived from Hit already provided in DataStructure. Am experiencing a seg fault when I try to access the Hits in the Event, but not when I do this for any of the other data members (digits, clusters, etc). Some example code is attached which is testing the SciFiEvent copy constructor. This code runs and passes fine, provided line 33 is commented out:

EXPECT_EQ(evt2.hits()[0]->GetChannelId()->GetFiberNumber(), 0);

hits() returns a SciFiHitPArray, defined as

typedef std::vector<SciFiHit*> SciFiHitPArray;

in Hit.hh.

I also attached the SciFiEvent class files.

Am I not using the SciFiHit class / typedef correctly, or could this be a real issue?

Thanks!


Files

SciFiEventTestPart.cc (1.87 KB) SciFiEventTestPart.cc Dobbs, Adam, 05 August 2012 02:48
SciFiEvent.hh (4.03 KB) SciFiEvent.hh Dobbs, Adam, 05 August 2012 02:48
SciFiEvent.cc (4.81 KB) SciFiEvent.cc Dobbs, Adam, 05 August 2012 02:48

Also available in: Atom PDF