# Root Tree Custom Objects

**URL:** <https://root-forum.cern.ch/t/root-tree-custom-objects/15878>\
**Category:** ROOT\
**Created:** [April 3, 2013, 12:02am UTC](https://root-forum.cern.ch/t/root-tree-custom-objects/15878 "2013-04-03T00:02:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [April 3, 2013, 3:29am UTC](https://root-forum.cern.ch/t/root-tree-custom-objects/15878/2 "2013-04-03T03:29:27Z")

</div>

In your “test.C”, try to use: `// ...
class TMyRootEvent;
#if !defined( __CINT__ )
#include "TMyRootEvent.hpp"
#endif /* !defined( __CINT__ ) */
//...
void test() {
  if (!TClass::GetDict("TMyRootEvent")) {
    gROOT->ProcessLine(".L TMyRootEvent.hpp++");
  }
  // ...
}`  
See also [url=https://root-forum.cern.ch/t/adding-classes-in-aclic/15817/2 post[/url] (it deals with exactly the same type of problems as you have now).

---

_[View the full topic](https://root-forum.cern.ch/t/root-tree-custom-objects/15878)._
