Unexpected Behavior in StEvent and StMuEvent
In our analysis, we need to use both StMuEvent and StEvent concurrently. However, we discovered that in some instances the 2 classes were looking at different events...
The code below illustrates this behavior. It creates an instance of StMuEvent and StEvent, and then compares the event ID and run ID of each class (see 'StEventBugTest_cxx.txt'). In some instances, but not all, either of these may differ. If either differ, it prints a warning. For instance:
StEventBugTest::Make() -- StMuEvent and StEvent differ!StEventBugTest::Make() -- event summary:uEvtID = 881944, uRunID = 10152004sEvtID = 54518, sRunID = 10152004
The file 'test.5fpp1.txt' contains instances where they differed, and ones where they didn't.
This behavior disappears when we require at most 1 input file per output file ('nFilesPerProcess=1' when using star-submit). After requiring this, StMuEvent and StEvent coincide in every instance. The file 'test.1fpp5.txt' is an example of the output when 'nFilesPerProcess=1'. The file 'test.5fpp1.txt' was produced with 'nFilesPerProcess=5'.
For completeness, the header file ('StEventBugTest_h.txt') as well as the root macro ('DoBugTest_C.txt') and xml file ('DoBugTest_xml.txt') used to run the code have been included below.
Update, 05/25/2017: Following suggestions from Dmitri Smirnov and our own studies, we removed the following block of code from 'DoBugTest_C.txt':
if (inputFile.EndsWith("event.root") || inputDir.BeginsWith("@")) {
StIOMaker *ioMaker = new StIOMaker("IO", "r", inputDir.Append(inputFile).Data());
ioMaker -> SetIOMode("r");
ioMaker -> SetBranch("*", 0, "0");
ioMaker -> SetBranch("eventBranch", 0, "r");
}
After removing this, there is no issue. The file 'test.noEventIf.5fpp1.txt' contains example output after implementing this change. The file 'DoBugTest_UpdateMay24_C.txt' is the updated root macro.
- dmawxc's blog
- Login or register to post comments