Comments (5)
Digging a little further, it seems that the problem is likely that ROOT isn't actually calling NtpMCEventRecord::~NtpMCEventRecord()
when it loads a new entry from the file, but simply writing over it (which does call the constructor for the new entry, and that involves a new EventRecord
inside NtpMCEventRecord::Init()
).
from generator.
I believe this issue showed up with the switch to ROOT 6. There was an issue open in the old trac system about it but that system seems not to have survived the move away from hepforge.
Assuming it's the same thing, the way I mostly reproduced it was just running a TTree::Draw
on the GHEP file.
from generator.
... and reading a bit further, it looks like we're violating the serialization rules from ROOT (https://root.cern.ch/root/html/guides/users-guide/AddingaClass.html#the-default-constructor):
Be sure that you do not allocate any space for embedded pointer objects in this constructor. This space will be lost (memory leak) while reading in the object. For example:
class T49Event : public TObject {
private:
Int_t fId;
TCollection *fTracks;
...
public:
// Error space for TList pointer will be lost
T49Event() { fId = 0; fTrack = new TList; }
// Correct default initialization of pointer
T49Event() { fId = 0; fTrack = 0; }
...
};
The memory will be lost because during reading of the object the pointer will be set to the object it was pointing to at the time the object was written. Create the fTrack list when you need it, e.g. when you start filling the list or in a not-default constructor.
We are doing the new EventRecord
in the default constructor.
from generator.
This serialisation rule was a problem in many contexts before and it was solved by leaving the default ctor as is (if it allocates memory so be it) but adding a new ctor only for ROOT I/O purposes. This is done, for example, in GHepRecord::GHepRecord(TRootIOCtor*).
Not sure what changed with ROOT6 wrt NtpMCEventRecord.
from generator.
Ah, I didn't know that such a construction existed. There's no analogous constructor for NtpMCEventRecord
, so maybe just adding one would do the trick?
I don't have a 3.00.06-equivalent version of GENIE currently built from source in an area I can modify so I can't test quickly, but maybe somebody can? (If not I can look into it but won't be able to get to it right away)
from generator.
Related Issues (20)
- gspl2root is not useful for IBD v3.04 HOT 3
- Possible memory leak? HOT 2
- GVLE18_01a could not provide a CC process for nue+37Cl v3.04 HOT 2
- Executing gevgen and shows that there is no cross-section data "v3.04 medium energy G21_11b"
- G18_10b can't use the gevgen command and the program crashes nue+37Cl v3.04
- Calculation of EM RES XSec HOT 6
- Test of HINCLCascadeIntranuke and HG4BertCascIntranuke models. HOT 7
- C++17 support HOT 8
- GENIE NC zero momentum nucleons
- macOS arm not supported ? HOT 3
- Error in GEM21_11c and GEM21_11d configuration
- gevgen_ndcy geometry
- Failure of generators generated with gevgen (18O with nu_e_bar, G21_11b, latest version of genie)
- Error in <GSLError>: Error 4 in $ROOTSYS/GSL-src/monte/vegas.c at 128 : xu must be greater than xl HOT 2
- Failure to run gevgen with non-default tunes on Genie R-3_04_00 HOT 4
- Reference frame of the polarization vector
- Incorrect polarization vector for primary leptons HOT 2
- Broken GEM21_11a configuration HOT 4
- Fatal kinematic error when running eH events with GEM21
- Error when using gntpc with new version of GENIE HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator.