[d2n-analysis-talk] CVS-Version Analyzer Crashes: Solved!

Diana Parno dparno at cmu.edu
Mon Nov 15 19:53:55 EST 2010


Hi all,

Matt and I have both run into problems replaying BigBite runs on  
copies of the analyzer/d2n build checked out over the last several  
months. This has become more urgent now, as we want to set up a clean  
analyzer copy to start replaying production runs in large batches. I  
believe I have solved this problem and we can make simple changes to  
the CVS copy of the analyzer source code in order to avoid it in the  
future.

The problem: although the analyzer build on /usr/local on the d2n  
machine works fine, an analyzer built from the CVS version does not.  
The analyzer loads fine, and even replays LHRS runs just fine, but  
goes down in flames when trying to initialize the detectors and  
packages for a BigBite replay. There are two particular error messages  
that have plagued Matt and myself:

> Error in <"BB.mwdc.v1p"::THaAnalysisObject::LoadDB>: Required key  
> "BB.mwdc.v1p.detmap" missing in the database.
>

> Error in <"::THaAnalysisObject::LoadDB>: Required key "vzcorr_1"  
> missing in the database.

This was a vexing problem because the keys listed as missing are, in  
fact, present and accounted for in the database. In fact, the CVS  
version of the database works fine, as long as the analyzer  
environment variables are set to point to the /usr/local build rather  
than the CVS build. It isn't a problem in the database files.

It appears that the problem is in the analyzer code itself. I'm  
guessing that the analyzer code in the CVS repository has, perhaps,  
been updated more recently than the analyzer code in /usr/local (or,  
perhaps, the other way around?) and there's a mismatch between the  
analyzer version in CVS and the analyzer version our DB files were  
initially written for. In particular, the problem seems to lie in the  
THaAnalysisObject class. The CVS build of the analyzer and d2n  
branches works fine, as long as we replace these three files:

analyzer/src/THaAnalysisObject.h
analyzer/src/THaAnalysisObject.C
analyzer/src/THaVDC.C

with their counterparts from /usr/local/d2n_analysis. It's only those  
files that need to be replaced.

(I think the underlying problem lies in the THaAnalysisObject class,  
since THaVDC is not called by BigBite replays. However, the changes to  
the function IsTag(const char *buf), defined in THaAnalysisObject.C,  
mean that the CVS version of THaVDC, which inherits from it, won't  
compile if we're using the /usr/local version of THaAnalysisObject.)

Since this fix works, I'm not planning to try to track down the exact  
function(s) that caused the problem. However, I can see that among the  
functions that differ between the two versions are functions dealing  
with how database keys are recognized, especially when there is  
leading or trailing whitespace. When I look in the DB files around the  
two problematic database keys, I don't see any obvious difference  
between their whitespace and the whitespace around their neighbors,  
but there may be something subtle going on.

Matt, I'd be grateful if you'd try out this quick fix and confirm that  
it works for your CVS build whenever you get a chance. I'm thinking  
this would be a good change for the CVS build generally; it would be  
nice for the analyzer to work right out of the box.

Best,
Diana


More information about the d2n-analysis-talk mailing list