Commit 055c57cc authored by Alex Pearce's avatar Alex Pearce
Browse files

Let relations cloner use a non-cloned From object.

In the case where the user only wants the relations and MC particles
cloned, and not the (proto)particles, the cloner should be allowed to
just take the (proto)particles from the 'original' location, and should
not force the user to have used the microDST cloners on them beforehand.
parent bfdb017d
...@@ -50,10 +50,12 @@ namespace MicroDST ...@@ -50,10 +50,12 @@ namespace MicroDST
: MicroDSTAlgorithm ( name , pSvcLocator ), : MicroDSTAlgorithm ( name , pSvcLocator ),
m_cloner ( NULL ), m_cloner ( NULL ),
m_clonerType ( DEFAULTS::clonerType ), m_clonerType ( DEFAULTS::clonerType ),
m_useOriginalFrom ( false ),
m_tableCloner( boost::bind(&RelationsClonerAlg<TABLE>::cloneFrom, &(*this), _1), m_tableCloner( boost::bind(&RelationsClonerAlg<TABLE>::cloneFrom, &(*this), _1),
boost::bind(&RelationsClonerAlg<TABLE>::cloneTo, &(*this), _1) ) boost::bind(&RelationsClonerAlg<TABLE>::cloneTo, &(*this), _1) )
{ {
declareProperty( "ClonerType", m_clonerType ); declareProperty( "ClonerType", m_clonerType );
declareProperty( "UseOriginalFrom", m_useOriginalFrom, "Take 'from' object from original location");
//setProperty( "OutputLevel", 1 ); //setProperty( "OutputLevel", 1 );
} }
...@@ -186,6 +188,10 @@ namespace MicroDST ...@@ -186,6 +188,10 @@ namespace MicroDST
inline typename TABLE::From cloneFrom(const typename TABLE::From from) inline typename TABLE::From cloneFrom(const typename TABLE::From from)
{ {
if ( m_useOriginalFrom )
{
return from;
}
if ( ! from ) if ( ! from )
{ {
error() << "FROM is NULL !!!!" << endmsg; error() << "FROM is NULL !!!!" << endmsg;
...@@ -219,6 +225,7 @@ namespace MicroDST ...@@ -219,6 +225,7 @@ namespace MicroDST
CLONER* m_cloner; CLONER* m_cloner;
std::string m_clonerType; std::string m_clonerType;
bool m_useOriginalFrom;
TableCloner m_tableCloner; TableCloner m_tableCloner;
}; };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment