GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Task (or macro, I dont know) stops after one event
Task (or macro, I dont know) stops after one event [message #20346] Tue, 21 February 2017 16:42 Go to previous message
Marcel Tiemens is currently offline  Marcel Tiemens
Messages: 47
Registered: January 2014
continuous participant
From: *

I created a new macro to run a new task. I based the macro on existing macros, which I know to work. The task tries to get some information, using FairLinks, on a set of objects that are loaded into a TClonesArray.

The TClonesArray is initiated like this:
fClusterArray = (TClonesArray*) ioman->GetObject("EmcClusterTemp");
with ioman a pointer to the FairRootManager. The task has the standard layout of an Init(), Exec(), and a FinishTask(), which cout's some info and draw the histogram that was filled during the Exec stage. They are all defined as public virtual methods in the task's header file.

The macro looks like this, where clusFile contains the objects that need to be loaded into the TClonesArray, and simFile and digiFile contain the destination of the FairLinks:
FairRunAna *fRun= new FairRunAna();


// -----  Parameter database   -----------------------------
FairRuntimeDb* rtdb = fRun->GetRuntimeDb();

FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();

FairParRootFileIo* parInput1 = new FairParRootFileIo();

// ---------------------------------------------------------

PndEmcInspectClusters* inspectorTask = new PndEmcInspectClusters(iVerbose);

// -----   Intialise and run   -----------------------------


When running this macro, everything seems to work, except that it exits after processing the first event. ROOT acts like it is supposed to do that, but it isn't. Trying to provide different ranges to the call fRun->Run() doesn't change anything. Does anyone know what could be causing this behaviour?
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to reconfigure and rerun a FairRunAna instance
Next Topic: FairHit - why only 32bit precision??
Goto Forum:

Current Time: Fri Jun 14 13:22:09 CEST 2024

Total time taken to generate the page: 0.00945 seconds