I’m having issues compiling my code. It is meant to take a few text files, put them in TNtuples then write them to a ROOT file. The two big issues that I’m having is that it won’t let me push a TNtuple onto a vector (Because it calls the copy constructor of TNtuple?)
and it doesn’t like me trying to initialize my TNtuple, object
output(name.c_str(), "UPDATE","Title", 9);
if (!output.IsOpen())
output.Open(name.c_str(), "UPDATE", 9);
I know that I’m doing something wrong here, but I can’t figure out what it is, and I’ve been poring over the documentation all day. Any pointers (not C++ ones)?
[quote]push a TNtuple onto a vector [/quote]Why do you need to do this?
[quote]that it won’t let me push a TNtuple onto a vector (Because it calls the copy constructor of TNtuple?)[/quote]Yes, this kind of copy is not supported as the semantic is not clear. Do you meant to just copy the meta data (relatively small) or all the data (usually very large).
[quote]and it doesn’t like me trying to initialize my TNtuple, object[/quote]Didn’t you mean TFile?
[quote]output.Open(name.c_str(), “UPDATE”, 9);[/quote]TFile::Open is a static function which returns the address of newly created TFile object (and thus by C++ syntax/rule of static function, output is NOT modified by this statement).
[quote]I’ve been poring over the documentation all day. Any pointers (not C++ ones)?[/quote]Actually C++ pointers is probably (maybe depending on what you really need to do) the right way to go