Dear all, I have a problem with a macro. I would like to stress that as you
will see by the following macro I am not a pro-user.
The macro is
void macroask()
{
....
}
void macrow()
{
....
}
void macro5_root_bk()
{
Int_t choice;
char fn_root[100];
printf("Are you going to create root files (1) or just to analize (2)?");
scanf("%d",&choice);
macroask();
printf("%d runmax",run_max);
if (choice==1)
{
macrow();
}
TChain chain("Eventi");
for(int s=0;s<=run_max;s++)
{
sprintf(fn_root,"Run_%s/run%s.root",namerun[s],namerun[s]); printf("Adding file %s\n",fn_root); chain.Add(fn_root);
My problem is that if a executed the macro through the
.x macro5_root_bk.C
It opens a treeviewer window but as soon as I try to double click on a leaf I get the error
The same error is NOT obtained if instead of executing the hole macro a pass through command line interface the list of all the instructions contained in the function macro5_root_bk. In that case the double click works perfectly. Any help please?
The second question is connected to the possibility of saving CUTS into treeviewer. I would like to add to the above macro some fixed cuts through the command
item = treeview->ExpressionItem(3);
item->SetExpression("XXXX", "YYYY");
Obviously instead of treeview I should insert the name of the object created by chain.StartViewer() command. Which name is assigned by default to that object?
Thanks
Regards
Luca Received on Thu Oct 20 2005 - 18:53:30 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:13 MET