> it would be great if anyone can explain this warning. { & why Bronch? instead of Branch :) }
Implementation detail :)
> Warning in <TTree::Bronch>: Using split mode on a class: TLorentzVector with a custom Streamer
For TLorentzVector, this message can be ignored, the custom streamer exist only for backward compatibility.
Cheers,
Philippe.
On 3/27/12 7:09 PM, Asif Saddique wrote:
> Hi Venkat & Philippe,
>
> You are right that i need to generate the dictionary.
>
> As from venkat's suggestion, i included these 3 lines in my code:
> ==================
> #ifdef __CINT__
> #pragma link C++ class std::vector<TLorentzVector>+;
> #endif
> ==================
> It works & now i can see my branch. But i get following warning(Which i assume is harmless):
>
> Warning in <TTree::Bronch>: Using split mode on a class: TLorentzVector with a custom Streamer
>
> it would be great if anyone can explain this warning. { & why Bronch? instead of Branch :) }
>
>
> Cheers, Asif
>
>
>
>
>
> On Tue, Mar 27, 2012 at 6:00 PM, Philippe Canal <pcanal_at_fnal.gov <mailto:pcanal_at_fnal.gov>> wrote:
>
> Hi Asif,
>
> You need to generate the dictionary for vector<TLorentzVector>.
> See <http://root.cern.ch/drupal/faq#n676>
>
> Cheers,
> Philippe.
>
>
> On 3/27/12 5:56 PM, Asif Saddique wrote:
>> Hi Rooters,
>>
>> I am trying to write a vector of TLorentzVector as a branch in a root tree but getting some error. I don't get any
>> compilation error but error when i run the code over the data. I am using root 5.28.
>>
>> The structure of my code is like this:
>>
>> ============================================
>> TFile *file = new TFile("myfile.root","recreate");
>> TTree tcal("tcal","Calibration Tree");
>> vector<TLorentzVector> theJets;
>> tcal.Branch("theJets",&theJets);
>>
>> // EventLoop
>> {
>> //JetLoop
>> {....
>> TLorentzVector jet.............
>> theJets.push_back(jet)
>> }
>> tcal.Fill();
>> }
>> tcal.Write();
>> =============================================
>>
>> When i run this code i get following error:
>> ===============================
>> Error in <TTree::Branch>: The pointer specified for theJets is not of a class or type known to ROOT
>> ===============================
>>
>> Can anyone suggest what's going wrong?
>>
>> Cheers, Asif
>>
>>
>
Received on Wed Mar 28 2012 - 02:12:13 CEST
This archive was generated by hypermail 2.2.0 : Wed Mar 28 2012 - 05:50:02 CEST