Problem with Class Event

Hello

I’m new to ROOT. I want to run examples of tutorials (tree), but when I try to run tree4.C I get this:

Error: cannot open file “…/test/libEvent.dll”

how can I fix this?

I use root_v5.32.36 on windows7.

Can you tell how you are running tree4.C ? In principal it should be no problem. As it seems a windows issue @bellenot can help you I guess.

First, I suppose you meant root_v5.34.36. Then, if the …/test/libEvent.dll doesn’t exist, you can try to open a Visual Studio command prompt, go to the test directory, and type nmake -f Makefile.win32 to build the missing applications/dlls. And I hope you have a version of Visual studio matching the one used to build ROOT (VS 2012 or 2013)…

Thanks. yes, it’s root_v5.34.36. I have VS 2013. I tried “nmake -f Makefile.win32” but I get this error:

OK, I can’t try right now (ROOT 5 is too old…), but try to remove -FIw32pragma.h from Makefile.wi32. I.e.:

CXXFLAGS      = -nologo -EHs -GR -DWIN32 -W3 -D_WIN32 -D_WINDOWS \
                -I$(ROOTSYS)/include -wd4244 \
                -FIw32pragma.h

Should be:

CXXFLAGS      = -nologo -EHs -GR -DWIN32 -W3 -D_WIN32 -D_WINDOWS \
                -I$(ROOTSYS)/include -wd4244

I removed -FIw32pragma.h but still I get error:

You have to call root\bin\thisroot.bat before typing nmake -f Makefile.win32
(or probably ..\bin\thisroot.bat from the test directory…)

Am I do it right?
bat

No. Sorry, I edited my previous reply, just take a look at it again

No, thisroot.bat file is in root\bin.

Yes, then just execute it

Ok, I get these:


Well, ok, but now, at least, you have the libEvent.dll you were looking for. Or do you want everything in the test directory?

Thank you very much. I can run tree4.C now.

1 Like

Good! And you’re welcome!

1 Like

Thank you very much for your help and kindness.

1 Like

Hello!
I have another problem in executing Event. I’m following the tutorial, section Using TTree:: MakeClass, I want to create Event.root file using:

> $ROOTSYS/test/Event 400 1 2 1

I get this Error:

Error: Invalid type ‘Event’ in declaration of ‘400 1 2 1’ (tmpfile)(1)
Error: Symbol Event 400 1 2 1 is not defined in current scope (tmpfile)(1)

I’m using ROOT V_5.34.38 on Windows.Hello!
I have anothor problem in excecuting Event. I’m following the tutorial, section Using TTree::MakeClass, I want to create Event.root file using:

> $ROOTSYS/test/Event 400 1 2 1

I get this Error:

Error: Invalid type ‘Event’ in declaration of ‘400 1 2 1’ (tmpfile)(1)
Error: Symbol Event 400 1 2 1 is not defined in current scope (tmpfile)(1)

Am I doing it wrong?

I work with ROOT on windows.

Can you describe exactly what you did to obtain this error?
For example, from where / how did you call this:

And BTW, please don’t reply to an old (and unrelated) topic, but open a new one instead…

I just write it in the ROOT:

root [0] Event 400 1 2 1
Error: Invalid type 'Event' in declaration of '400 1 2 1' (tmpfile)(1)
Error: Symbol Event 400 1 2 1 is not defined in current scope  (tmpfile)(1)

in the command promot I get this:

C:\root\test>Event 400 1 2 1
'Event' is not recognized as an internal or external command,
operable program or batch file.

Neither of those are the proper way of using the Event example. If you look at the comments in the Event.cxx file, you can read:

/   An example of a batch program to use the Event/Track classes is given
//   in this directory: MainEvent.
//   Look also in the same directory at the following macros:
//     - eventa.C  an example how to read the tree
//     - eventb.C  how to read events conditionally

(you can take a look at the test/eventa.cxx and test/eventb.cxx files). or on the command line, you can use the eventexe executable (created with the MainEvent.cxx source file). On Windows, you will have to rename it event.exe or eventexe.exe (this issue will be fixed shortly in the master)