Messenger file, command not found

Hello, I created a messenger file, that should set the position of a surface by the command line

/Chamber20nep/DummySurfacePos 0 0 10 mm

I don’t get errors during the compiling, but when I run the simulation I get

***** COMMAND NOT FOUND </Chamber20nep/DummySurfacePos 0 0 10 mm> *****

I don’t understand what I’m wrong (1.7 KB)
Chamber20nepMessenger.hh (576 Bytes)


Do you instantiate the Chamber20nepMessenger class?

Hi @mkelsey
how and where should I instantiate it?

I call it in the

chamber20NepMessenger = new Chamber20nepMessenger(this);


delete chamber20NepMessenger;
} (3.4 KB)
Chamber20nep.hh (752 Bytes)

and when i compile, I see Chamber20nepMessenger files are processed

[ 10%] Building CXX object CMakeFiles/SimLuna.dir/src/

should I do something more to instantiate the class?

That’s exactly right. I guess that Chamber20nep is your detector construction class? Do you start running your macro commands before the DetectorConstruction has been created?

Hello @mkelsey
Chambe20nep is a piece of the full setup and it is called in the DetectorConstruction. Thanks to your suggestion to run the macro before detectorconstruction is created, I understood the problem. I had to get istance in the detector construction to make working the chamber messenger

  detectorConstructionMessenger = new DetectorConstructionMessenger(this);
  materials = Materials::GetInstance();
  AGePD = GePD::GetInstance();
  AGeDD = GeDD::GetInstance();
  AChamber20nep = Chamber20nep::GetInstance();

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