Is there any chance we could provide an option to MakeProxy that would generate a proxy w/out the sub-class and histogram? And wouldn’t, as a result, need the junk macroname as an argument? The way I tend to do things is create the proxy and then sub-class it. Carrying extra files along (like the junk file) is a pain when the proxy becomes something that you post for people to download or when you are pushing files over to PROOF.
What do you mean ‘without the subclass’?
[quote]and histogram? And wouldn’t, as a result, need the junk macroname[/quote]Fair enough, I think this is doable.
By subclass I mean that I have to pass MakeProxy a macroname, and then in the proxy code there is a class that can be used so that the macro can override various steps (slave being, etc.). I meant without that. I guess you are right - I shouldn’t call it a subclass.
Thanks for looking at this!
One interface level issue is that in order for the branch proxy to work correctly some calls must be made at some of the TSelector steps (for example call fDirector.SetReadEntry(entry); in Process). This would mean that the TSelector that you derive from a bare-bone MakeProxy would be required to call the base class version of the routine. So far I can not think of a proper way of enforcing this …
Right - it would have to call the base class. That is fine. If you want to enforce it, then what you do is create this proxy with a new abstract method called “DoIt” (or whatever) and have it called by Process. That forces the person to then write some code to sub-class it.
But I’m not sure that is the right thing to do - it would be good to have something that just runs out of the box without having to do anything else - even if running it doesn’t produce a result.
What I’m going for is that I have an analysis that is based on the proxy. Every now and then I need to re-run the MakeProxy b/c the underlying ntuple changes. It would be good to do that w/out having to modify any of my code, and also with a minimum of extra files. The current system will work, but it feels very kludgy (and fragile). And if you are sub-classing then you end up with some extra files which is a bit painful when having to deal with PROOF. Also, sub-classing brings its usage more in line and matchig with MakeClass.
[quote] It would be good to do that w/out having to modify any of my code, and also with a minimum of extra files. The current system will work, but it feels very kludgy (and fragile).[/quote]The first part is exactly what you get in the normal use (i.e. the include user script do not have to change, just the MakeProxy header file). But yes it is not quite the usual C++ development pattern . In a sense the current organization is an attempt to both enforce the additional calls and create a skeleton that the user never has to touch/modify and can easily be regenerated as needed.
[quote]with some extra files which is a bit painful when having to deal with PROOF. [/quote]Fair enough … I’ll see if it can be solve in a reasonable way.