Table of Contents

How to put a container on the TES

Idea

Sometimes it might be useful to make a copy of an existing container (with Particles, Tracks,…) and put it on the TES, to be used for a later algorithm.

Code (C++)

This can be done the following:

LHCb::Tracks* tracks = new LHCb::Tracks(); // Create the new container
for(loopOverOldContainer){
   tracks->insert( trackToCopy );
}
put( tracks, "MyOutputLocation" );

put is a method of GaudiAlgorithm, so it works for every class that derives from it.