Root PROOF error: "error: macro name must be an identifier"

ROOT Version: 6.08.02
Platform: Ubuntu 16.04
Compiler: Not Provided

I use ROOT 6, and I recently installed ROOT on my multicore core i5 computer, so I want to take advantage of more than one core in my ROOT processes using PROOF. I included (#include “MySelector.h”) MySelector.h, which I have attached. Then when I try to run my .C file, I get:

In file included from /home/sam/stuff/muons/Read_muons2D.C:15:
/home/sam/stuff/root-6.08.02/include/MySelector.h:8:9: error: macro name must be an identifier
#ifndef …/data/MySelector_h
/home/sam/stuff/root-6.08.02/include/MySelector.h:71:8: error: macro name must be an identifier
#ifdef …/data/MySelector_cxx
This is referring to lines 8 and 9 of MySelector.h. What’s wrong? I also attached my .C for your reference.

Thanks for the help.

MySelector.h (3.7 KB)

Read_muons2D.C (37.7 KB)

The token after “#ifndef” is not a filename but just a normal (preprocessor) variable name. Therefore you cannot use special characters such as “.” or “/” in that name.

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