GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » NUSTAR » NUSTAR PRESPEC » problem with a processor (software-wise)
Re: problem with a processor (software-wise) [message #17152 is a reply to message #17144] Mon, 11 August 2014 11:48 Go to previous messageGo to previous message
miree is currently offline  miree
Messages: 71
Registered: June 2014
continuous participant
From: *
Hi Tayfun,

I like a lot that you want to add new functionality!

But the existing "Gate1D" processors might already be used at some point in your (or others) analysis. And if you modify the behavior of an existing processor it might break your analysis.

It is always good to add new functionality by adding another processor. Doing this, you also have the opportunity to give your processor a name that describes its purpose. To add a new processor, do the following:

1) copy an exsisting processor's header (.hpp) and implementation (.cpp) files
cp Gate1D.hpp MyNewProcessor.hpp; cp Gate1D.cpp MyNewProcessor.cpp

2) add the new processor to the file module.cpp in the direcory of the plugin. You have to add a line on the top of the file to include your header file:
#include "process/MyNewProcessor.hpp"

and you have to add a line to make the framework aware of the new Processor:

3) add your processor header and implementation files to the toplevel in the prespec directory.
You have to add it to the correct plugin. If your new processor is in the UTILS plugin, it has to go here:
libprespecUTILS_la_SOURCES = ...    \
                             ...    \
                             plugins/UTILS/process/MyNewProcessor.cpp \
                             plugins/UTILS/process/MyNewProcessor.hpp \

Be careful not to put whitespaces after the '\' character!!!!

4) Now you can implement your Processor, but first rename all "Gate1D" to "MyNewProcessor" in the two files MyNewProcessor.cpp and MyNewProcessor.hpp.

5) type 'make' in the prespec toplevel directory.

Once you have written a useful processor, please push it to the repository so that everybody can benefit from your efforts.

I'll post another reply about the assertion failure that you get.
You can also look at the processor "ArrayFilter" in UTILS plugin. It might already do what you need.

Best regards,

Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FINGER ToF detector
Next Topic: LYCCA - w-DSSSD Time Gated
Goto Forum:

Current Time: Fri May 24 14:33:40 CEST 2024

Total time taken to generate the page: 0.01007 seconds