Running method in a thread

I’ve been going through this documentation :
root.cern.ch/root/html534/guide … n-a-thread

I don’t get the line “(void(*)(void ))&Thread0,(void) this);”

I would like to pass a vector as my argument to my member function named
void myClass::checkValue(vector<int> val){ // something here }

How can I do it, any example appreciated !

This cast is historical per se:

[quote]Here mTh is a TThread* pointer which is member of Myclassand should be initialized to 0 in the constructor. The TThread constructor is called as when we used a plain C function above, except for the following two differences.

First, the member function Thread0 requires an explicit cast to (void(*) (void *)). This may cause an annoying but harmless compiler warning:

Myclass.cxx:98: warning:
converting from "void (Myclass::*)(void *)"to “void *” )

Strictly speaking, Thread0 must be a static member function to be called from a thread. Some compilers, for example gcc version 2.95.2, may not allow the (void() (void))s cast and just stop if Thread0 is not static. On the other hand, if Thread0 is static, no compiler warnings are generated at all[/code]

Rather than adapting your code, to fit this model, you may want to consider using ROOT v6 and std::thread (see solarianprogrammer.com/2011/12/ … -tutorial/ for example).

Cheers,
Philippe.