"Error : discarding <simple type>* : no [dimension]"

Hi all,

I’m using CMSSW_5_3_11 and ROOT 5.32.00 and I’m struggling with this error :

[quote]Fatal Root Error: @SUB=TStreamerInfo::Build
IPHCTree::MTObj, discarding: float* fData, no [dimension][/quote]

I have a class that looks like (in a very simple way) :

namespace IPHCTree
{
  class MTObj
  {
  public:
    MTObj() { }
    ~MTObj() { }

    Int_t fSize;
    Float_t* fData; //[fSize]  

    void Fill();
  };
  MTObj::Fill()
  {
    fSize = 4; // the size is normally not fixed
    fData = new Float_t[fSize];
    for (int i = 0; i < fSize; ++i)
    {
      fData[i] = i;
    }
  }
}

I generate a TTree with CMSSW and add a branch :

produces<IPHCTree::MTObj>("MTObj");

Then I put this branch into my “edm::Event& iEvent” :

std::auto_ptr<IPHCTree::MTObj> obj(new IPHCTree::MTObj()); obj->Fill(); iEvent.put(obj, "MTObj");

I also have 2 files for wrapping the class.
“classes.h” containing: edm::Wrapper<IPHCTree::MTObj> MTObj;
and “classes_def.xml” containing: <lcgdict> <class pattern="edm::Wrapper<*>" /> <class name="IPHCTree::MTObj"/> </lcgdict>

I haven’t found more information in the documentation of streamers (http://root.cern.ch/download/doc/InputOutput.html#streamers)

It works well using ROOT only (for creating the TTree etc.).
Do the versions of CMSSW and ROOT that I am using are incompatible for what I’m trying to do ?

Thanks a lot.

Hi Doky,

I think you should try to discuss this in a CMSSW HN forum before.
Once you reduced your issue to a pure ROOT problem, you will certainly find help in this forum.

Best,
Danilo