-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patches to ldmx-sw following compiler update #1640
Conversation
- copy over refactor from LDMX-Softwar/fire and merge in our improvements - build into submodule - still need to test that it works after refactor and update to the newer Python C API
Can you add
to the TODO list? |
all tests compiling, Framework test passing the run
remove deprecated functions and use PyConfig style configuration before the initialization of the python interpreter
- only open config file once - close python interpreter if an exception is thrown after it is opened
we do not want python to parse the argv for us, we are already parsing it and so when python parses it, the first argument is dropped as if it was the 'python' command calling a script
this is only because we erroneously have a list of parents for sim particles when all sim particles only ever have exactly one parent
we have been well established for only using the container for building ldmx-sw for several years now. Additionally, this check is difficult to maintain because there isn't a standardized way to check whether you are in a container. The CI and I get this warning when using podman because podman does not create either of the files listed in this check.
it is not used anywhere in the tests
- don't try to hold a reference, just use safe_extract in place when needed or copy - define an empty object for logRules so that it is alive long enough to be used
older compilers didn't catch this because the code _does_ increment nPos within the loop over adc values, but it never accesses its value for something else
check for overlay event below when calling `nextEvent` on the overlay
I can't figure out the Hcal testing right now (I was hoping the additional warnings would point me towards something but they did not) and I want to wait on the nullptr dereferencing related to other developments, so I am marking this as Ready for Review. The changes are all "small" in the sense that they are not expected to affect the physics. The previous PR Validation run did not show any differences and I am expecting the same again. |
Parameters run(const std::string& root_object, const std::string& pythonScript, | ||
char* args[], int nargs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sneaking in a refactor of the Configure/Python ecosystem that does a few things:
- Removes the extraneous
ConfigurePython
class in favor of a function that runs the python script and returns aParameters
of the configuration extracted. - Updates
Parameters
to have shorteradd
andget
methods. - Promotes the "root object" that is used to extract the configuration to the argument so that hypothetically other programs could be written that use the same configuration system but with a different python object (e.g. https://github.com/LDMX-Software/ldmx-tb-online/tree/main/reformat could be brought in as a submodule with its own executable if we desired).
if (fabs(track.getCentroid() - nextTrack.getCentroid() < | ||
3 * maxDelta_)) { | ||
if (fabs(track.getCentroid() - nextTrack.getCentroid()) < | ||
3 * maxDelta_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bryngemark I think this is just a misplaced closing parentheses since the newer compiler warned me that fabs(bool)
doesn't make any sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agree with this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good, I have a question and a small suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Not sure what to think about the HCal digi errors, ask an HCal code expert if you want a real opinion on that
I am updating ldmx-sw, here are the details.
What are the issues that this addresses?
This is following up on LDMX-Software/dev-build-context#103 . I will maintain an checklist here of patches that I need to make before I feel comfortable merging.
configure-quick
The
configure-quick
build does not enable as many warnings, but I still get the big ones so its a helpful place to start. After I patch these up, I can move to a configuration that enables more warnings (e.g. our standardconfigure
).std::iterator
is deprecated,need to find replacement forno replacement, just remove it and the callers deduce if the iterator class has the required functionsHgcrocDigiCollection
recon::PFTruthProducer
when usingldmx::SimParticle::getParents
HcalDigiPipelineTest
is now failing 812 / 1000 of the test energies. All of the test hits being reconstructed return adaq_pe
of 0 rather than something close to the real value. The tests below 40PE are passing because 0 is within 40 of the true value. I don't think this is as apocalyptic as it seems because the PR validations all pass and those include distributions on non-zero PE hits in the HCal. I am guessing it has to do with how the test is creating the hits or how Catch2 is working with the new compiler.ldmx-sw/DetDescr/src/DetDescr/DetectorIDBindings.cxx
Lines 2 to 3 in 169ee85
configure
The regular
configure
build enables additional warnings and clang tidy.std::move
inProcess::getDummy
- compiler can use copy elision to place the construction where it is first usedRunHeader
which is inlined fromimportRunHeaders
channel
andmsg_level
in Logger{}
as default forlogRules
match
codeNtuplemanagerTest.cxx:124-132
Catch::Matchers::UnorderedEquals
, not sure if I'm misusing it thoughnPos
set but not used inEventReadoutProducer.cxx:64
TrigScintTrackProducer.cxx:333
overlayEvent_
will never be NULLKaonphysics::DumpDecayDetails
(lots of them)particleIndex
set but not used inLHEReader
andLHEPrimaryGenerator
G4String
copy constructorGetLogicalVolume
in a lot of the user actionsTaggerHitFilter
same memory used after free asEcalSD
Recon/DBScanClusterBuilder.cxx:132
, would be null dereference if size is zero