TTree Fill() problem

we have a problem when running the code on different versions of ROOT.
When using v6-06-04-1, the code listed below works fine. When using v6-13-02-1, it crashes on AtlasLumi->Fill(); line with *** Break *** segmentation violation.
The types should be set properly.
Does anyone have a suggestion for this problem?
Thank you

 // Fill in ATLAS luminosities
    TTree *AtlasLumi = new TTree("AtlasLumi", "ATLAS luminosities per LB");
    AtlasLumi->Branch("LB_number",      &LB_number,     "LB_number/I");
    AtlasLumi->Branch("LB_start_time",  &LB_start_time, "LB_start_time/D");
    AtlasLumi->Branch("LB_end_time",    &LB_end_time,   "LB_end_time/D");
    AtlasLumi->Branch("LB_duration",    &LB_duration,   "LB_duration/I");
    AtlasLumi->Branch("LUCID",          &lcd,           "lcd/F");
    AtlasLumi->Branch("LUCID_err",      &lcd_err,       "lcd_err/F");
    AtlasLumi->Branch("LUCID_present",  &lcd_present,   "lcd_present/O");
    AtlasLumi->Branch("TRACKS",         &pix,           "pix/F");
    AtlasLumi->Branch("TRACKS_err",     &pix_err,       "pix_err/F");
    AtlasLumi->Branch("TRACKS_present", &pix_present,   "pix_present/O");
    AtlasLumi->Branch("TILE",           &til,           "til/F");
    AtlasLumi->Branch("TILE_err",       &til_err,       "til_err/F");
    AtlasLumi->Branch("TILE_present",   &til_present,   "til_present/O");

cout << "Number of LBs: " << LBs[r] << endl; 
    for ( Int_t n = 0 ; n < LBs[r] ; n++ ) {

      LB_number = LB_Num[n];
      LB_start_time = (Double_t)map_LB_sTime[LB_Num[n]];
      LB_end_time = (Double_t)map_LB_eTime[LB_Num[n]];
      LB_duration = map_LB_eTime[LB_Num[n]] - map_LB_sTime[LB_Num[n]];	    	 
      lcd = map_LB_Lint_lcd[LB_Num[n]];
      pix = map_LB_Lint_pix[LB_Num[n]];
      til = map_LB_Lint_til[LB_Num[n]];	 
      lcd_err = map_LB_Lint_lcd_err[LB_Num[n]];	    	 
      pix_err = map_LB_Lint_pix_err[LB_Num[n]];
      til_err = map_LB_Lint_til_err[LB_Num[n]];
      if ( lcd > 0 ) lcd_present = true;
      if ( pix > 0 ) pix_present = true;
      if ( til > 0 ) til_present = true;

      lcd_present = false, pix_present = false, til_present = false;



The issue is plausibly in the definition or handling of LB_Num. Do get more precise information I recommend running the failing example with valgrind:

valgrind --suppressions=$ROOTSYS/etc/valgrind-root.supp your_executable your_arguments


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.