Interactive drawing of tree variables

Dear ROOTers,

I have a tree holding a complex structure, and I want to plot its content in ROOT command line. I end up writing commands such as:

which is a bit long for a single line of code… (In this example sensorResidual is a TClonesArray)

If possible, I would like to write instead something such as:

mySensorResidualPlayer mp(tree); mp.Scan("getChannelName():getLensResid()", "type==1 && getMeasRawNPoints(1)!=0 && getLensResid()<-0.6", "colsize=25")

Do you know of a simple way to implement this?

Thanks

Pierre-François

Hi,

You can use the tree aliases to do some of this:tree->SetAlias("getChannelName","iov.resultHeader.sensorResidual.getChannelName()"); tree->SetAlias("getLensResid","iov.resultHeader.sensorResidual.getLensResid()"); tree->SetAlias("getMeasRawNPoints_1","iov.resultHeader.sensorResidual.getMeasRawNPoints(1)"); tree->SetAlias("type","iov.resultHeader.sensorResidual.type"); ... tree->Scan("getChannelName:getLensResid","type==1 && getMeasRawNPoints_1!=0 && getLensResid<-0.6", "colsize=25")

Cheers,
Philippe.

PS. Note that the alias are simple string replacements

Thanks!

this solves my problem

Pierre-François