Hi. I’ve got a tree with a Branch of char type. Here’s the TTree::Print() output:
root [5] tree->Print()
******************************************************************************
*Tree :tree : main tree *
*Entries : 119423 : Total = 9966428 bytes File Size = 1654849 *
* : : Tree compression factor = 6.01 *
******************************************************************************
*Br 0 :E : E/D *
*Entries : 119423 : Total Size= 958310 bytes File Size = 35451 *
*Baskets : 30 : Basket Size= 32000 bytes Compression= 27.01 *
*............................................................................*
<blah blah deleted>
*Br 11 :ProcessName : ProcessName/C *
*Entries : 119423 : Total Size= 1669093 bytes File Size = 328129 *
*Baskets : 68 : Basket Size= 32000 bytes Compression= 5.08 *
*............................................................................*
*Br 12 :SummaryEntry : SummaryEntry/O *
*Entries : 119423 : Total Size= 120235 bytes File Size = 16172 *
*Baskets : 4 : Basket Size= 32000 bytes Compression= 7.40 *
*............................................................................*
If I do TTree::Draw on ProcessName, it makes nice histograms. However, I’d like to histogram the energy while applying a cut on a particular ProcessName. Basically, I’d like to do the following:
root [6] tree->Draw("Edep","ProcessName==hadElastic")
Error in <TTreeFormula::Compile>: Bad numerical expression : "hadElastic"
(Long64_t)(-1)
root [7] tree->Draw("Edep","!strcmp(ProcessName,\"hadElastic\")")
Error in <TTreeFormula::Compile>: Bad numerical expression : "strcmp(ProcessName,"hadElastic")"
(Long64_t)(-1)
Of course both give me errors. Is there a simple way of doing such a comparison?