Dear Rooters,
please find attached a small testprogram. It is loosly based on the jets.c tutorial.
It creates an Event which contains serveral channel classes (MyChannel). These channels contain a Signaltrace, which is created with a signaltrace creator (MySignalTrace). To only record data of interest from this Signaltrace there is a class that suppresses the “zeros” (MyZeroSuppressor). This class produces several pulses, wich are subsets of the original trace and are stored in the class MyPuls. This class basicially holds a pointer to the first Point of interest of the original Signaltrace and a length. These properties are stored in a TArrayC.
The MyChannel class has a container wich stores the puls classes (std::vector<MyPuls*> pulses) . If there are more pulses than the container can take, this container is increased.
To visualize wether the Signaltrace creator and the Zerosuppressor are working correctly there is a class MyEventViewer. It opens a canvas and shows the zerosuppressed traces of the Channel.
I want to store the events in a Roottree. And I have not succeeded to go to the readRootFile part of the macro.
There are serveral questions that I have:
1.) The script fails, when calling T->Fill(). I could trace that back to the using of TArrayC. Is there anything wrong in the way I am using this class? Or is this not the reason why it throws a c++ exeption?
2.) Usually a Channel has less Pulses than the container provides. The correct number is stored in MyChannel::nbrPulses. How can I tell the tree not to store the whole container, but only the contents that are necessary?
3.) Instead of using a std::vector is it better to have a TClonesArray container? Can I tell the TClonesArray Container wich contents to write to the tree?
4.) Right now everything is done with ACLIC. Can I also do
the same thing in a Visual Studio 2003 Project? What besides creating a dictionary do I have to do to make it run, once its running with ACLIC?
5.) There are values in MyEvent and MyChannel that are not going to change for each following event. Can those values be stored in some kind of tree header as they will just increase the memory that is needed for each event?
ROOT Ver. 5.18
OS: WinXp Prof.
Thank you,
Lutz
TestWritingRootFiles.zip (13.3 KB)