GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Persitancy in Tasks
Persitancy in Tasks [message #10209] Wed, 17 February 2010 09:16 Go to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Hello everyone,

Stefano asked me to implement a SetPersistance() function to my Digi tasks and make them switch on/off the saving of my digis (thus reducing disk space). In principle this is no problem to do, but I realised that wrapper tasks like PndMvdDigiTask can pass this only in a difficult way. Bu I have a solution.
I propose to extend FairTask by a boolean flag with a Set function. The set function then has to iterate through all subtasks, like it is done for the verbosity flag. All Tasks then can unse this flag in the persistancy flag of their TClonesArray's IO. E.g like:
Quote:


ioman->Register("MVDStripDigis", "MVD", fStripArray, fPersistance);



How are the opinions on that?

Kind regards, Ralf.
Re: Persitancy in Tasks [message #10210 is a reply to message #10209] Wed, 17 February 2010 09:24 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: 140.181.11*
Hi Ralf,

please also add a GetPersistance() function to get the status of the flag.

Cheers,

Tobias
Re: Persitancy in Tasks [message #10211 is a reply to message #10209] Wed, 17 February 2010 09:33 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Hi,
I am not so sure if this can be good or not.
If one Task is filling more than one TCA, in this way you can switch both of them ON or OFF, but if you want to have only one ON... then you cannot do it.

This happens in PndLheTrackFinder::

//_________________________________________________________________
void PndLheTrackFinder::Register() {
  //---
  FairRootManager::
    Instance()->Register("LheCandidate",
                         "Lhe", fFoundTracks, fCanPersistence);

  FairRootManager::
    Instance()->Register("LheCMPoint",
                         "Lhe",fCMHits, fCMPersistence);

}


where I need to separate the persistence of the two objects. And by deafault one is ON and the other is OFF.
Re: Persitancy in Tasks [message #10212 is a reply to message #10209] Wed, 17 February 2010 10:05 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *pool.mediaWays.net
Hello,

To me it is clear that there are parts of the data which we never throw away. These shall not be using that flag. If one needs a better distinction there can always be a second Persistance flag fot this individual task.

Another way would be to make the flag an integer, setting a level. But this requires a good definition and extra care when registering the arrays.

Ralf.
Re: Persitancy in Tasks [message #10214 is a reply to message #10211] Wed, 17 February 2010 10:34 Go to previous messageGo to next message
Tobias Stockmanns is currently offline  Tobias Stockmanns
Messages: 489
Registered: May 2007
first-grade participant
From: 140.181.11*
I think Stefano makes a good point. One wants to switch on persistancy individually for each data object. Why not use the fDetectorType (fDataType) to select in the task which objects to store?

Cheers,

Tobias
Re: Persitancy in Tasks [message #10215 is a reply to message #10214] Wed, 17 February 2010 10:55 Go to previous messageGo to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hi,

Why not to add such flags in the ctor of the tasks that need to do this? then you are free to add as much as you need. For the case of

wrapper tasks, one implement the necessary set methods which will pass the flags to the ctor of the task lists. What do you think about this?


regards

Mohammad

Re: Persitancy in Tasks [message #10220 is a reply to message #10209] Thu, 18 February 2010 12:44 Go to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *hiskp.uni-bonn.de
Hi,

I like to have the constructors of the tasks clean. This helps a lot with inner structural changes which then don't afflict the macros.
However if you don't want a persistancy flag in FairTask I'll work around that.

Greetings from Bonn.
Ralf.
Previous Topic: Diff. LX dists
Next Topic: Crash in PndDpmDirect
Goto Forum:
  


Current Time: Mon Apr 29 00:59:13 CEST 2024

Total time taken to generate the page: 0.00904 seconds