View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000412JANAFeature Requestpublic2014-07-18 08:192014-07-18 08:30
Assigned Todavidl 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Summary0000412: Set pointer to NULL in JEventLoop::GetSingle if 0 values.
From an e-mail from Paul Mattione on June 7, 2014

In JEventLoop::GetSingle(), could you set the pointer to NULL if the vector is empty, and only throw an exception if the size is >= 2? (Current is to throw if size != 1). I've been using GetSingle() for DMCThrownMatching, and checking for NULL after the function call, but it throws on (CLAS) experimental data.


- Paul
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
davidl (administrator)
2014-07-18 08:30

This was fixed in svn revision 2046 and will appear in JANA 0.7.2

The code now sets the value of "t" to NULL in all cases where there is not exactly one object of the requested type. It also has a 3rd parameter that can be used to disable throwing an exception if N!=1.

- Issue History
Date Modified Username Field Change
2014-07-18 08:19 davidl New Issue
2014-07-18 08:30 davidl Note Added: 0000592
2014-07-18 08:30 davidl Status new => resolved
2014-07-18 08:30 davidl Resolution open => fixed
2014-07-18 08:30 davidl Assigned To => davidl

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker