From 84c44a49811c99e8852d0f4401ed372c67fe5b10 Mon Sep 17 00:00:00 2001 From: Gustavo Conesa Date: Mon, 28 Sep 2020 15:28:40 +0200 Subject: [PATCH 1/2] rename macro --- MC/CustomGenerators/DPG/UserTriggerExample.C | 49 ++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 MC/CustomGenerators/DPG/UserTriggerExample.C diff --git a/MC/CustomGenerators/DPG/UserTriggerExample.C b/MC/CustomGenerators/DPG/UserTriggerExample.C new file mode 100644 index 00000000..0a4af234 --- /dev/null +++ b/MC/CustomGenerators/DPG/UserTriggerExample.C @@ -0,0 +1,49 @@ +/// +/// \file UserTrigger.C +/// \brief Example of user defined trigger, to be called by main CustomGenerator macro +/// +/// Example of user trigger with simple multiplicity event selection. +/// In Root5 it must be compiled +/// +/// \author Luca Micheletti +/// \author Gustavo Conesa Balbastre + + +#include "AliStack.h" +#include "AliGenerator.h" + +//------ +/// User trigger logic to accept the event +/// Here simple multiplicity selection +//------ +Bool_t UserTriggerFunction(AliStack *stack) +{ + printf("____________________________\n"); + printf("USER TRIGGER IMPLEMENTATION \n"); + + Int_t nTracks = stack->GetNtrack(); + printf("n Tracks = %i \n",nTracks); + + if ( nTracks > 120 ) + { + printf("\t accepted!\n"); + return kTRUE; + } + else + { + printf("\t rejected!\n"); + return kFALSE; + } +} + +//------ +/// Main, pass the generator and set the user trigger +//------ +void UserTrigger(AliGenerator * generator) +{ + Bool_t (*funcUserTrigger)(AliStack*) = UserTriggerFunction; + +//printf("*-*-*-* USER FUNC %p\n",funcUserTrigger); + + generator->SetUserTrigger(funcUserTrigger); +} From fe8c2251a105ed20128123a43234a80483716499 Mon Sep 17 00:00:00 2001 From: Gustavo Conesa Date: Mon, 28 Sep 2020 15:32:47 +0200 Subject: [PATCH 2/2] removed macro --- MC/CustomGenerators/DPG/UserTrigger.C | 49 --------------------------- 1 file changed, 49 deletions(-) delete mode 100644 MC/CustomGenerators/DPG/UserTrigger.C diff --git a/MC/CustomGenerators/DPG/UserTrigger.C b/MC/CustomGenerators/DPG/UserTrigger.C deleted file mode 100644 index 0a4af234..00000000 --- a/MC/CustomGenerators/DPG/UserTrigger.C +++ /dev/null @@ -1,49 +0,0 @@ -/// -/// \file UserTrigger.C -/// \brief Example of user defined trigger, to be called by main CustomGenerator macro -/// -/// Example of user trigger with simple multiplicity event selection. -/// In Root5 it must be compiled -/// -/// \author Luca Micheletti -/// \author Gustavo Conesa Balbastre - - -#include "AliStack.h" -#include "AliGenerator.h" - -//------ -/// User trigger logic to accept the event -/// Here simple multiplicity selection -//------ -Bool_t UserTriggerFunction(AliStack *stack) -{ - printf("____________________________\n"); - printf("USER TRIGGER IMPLEMENTATION \n"); - - Int_t nTracks = stack->GetNtrack(); - printf("n Tracks = %i \n",nTracks); - - if ( nTracks > 120 ) - { - printf("\t accepted!\n"); - return kTRUE; - } - else - { - printf("\t rejected!\n"); - return kFALSE; - } -} - -//------ -/// Main, pass the generator and set the user trigger -//------ -void UserTrigger(AliGenerator * generator) -{ - Bool_t (*funcUserTrigger)(AliStack*) = UserTriggerFunction; - -//printf("*-*-*-* USER FUNC %p\n",funcUserTrigger); - - generator->SetUserTrigger(funcUserTrigger); -}