Index: display/DelphesBranchElement.cc
===================================================================
--- display/DelphesBranchElement.cc	(revision 5bb66c982f87faa1e89b33fbf80a11fab68ea6c0)
+++ display/DelphesBranchElement.cc	(revision 5bb66c982f87faa1e89b33fbf80a11fab68ea6c0)
@@ -0,0 +1,64 @@
+/*
+ *  Delphes: a framework for fast simulation of a generic collider experiment
+ *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
+ *  
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "display/DelphesBranchElement.h"
+
+// special case for calo towers
+template<> DelphesBranchElement<DelphesCaloData>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
+      if(TString(type)=="tower") {
+        data_ = new DelphesCaloData(2);
+        data_->RefSliceInfo(0).Setup("ECAL", 0.1, kRed);
+        data_->RefSliceInfo(1).Setup("HCAL", 0.1, kBlue);
+        data_->IncDenyDestroy();
+      } else {
+        throw std::exception();
+      }
+    }
+template<> void DelphesBranchElement<DelphesCaloData>::Reset() { data_->ClearTowers(); }
+
+// special case for element lists
+template<> DelphesBranchElement<TEveElementList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
+      if(TString(type)=="vector" || TString(type)=="jet") {
+        data_ = new TEveElementList(name);
+        data_->SetMainColor(color_);
+      } else {
+        throw std::exception();
+      }
+    }
+template<> void DelphesBranchElement<TEveElementList>::Reset() { data_->DestroyElements(); }
+
+// special case for track lists
+template<> DelphesBranchElement<TEveTrackList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color):DelphesBranchBase(name, type, color) {
+      if(TString(type)=="track") {
+        data_ = new TEveTrackList(name);
+        data_->SetMainColor(color_);
+        data_->SetMarkerColor(color_);
+        data_->SetMarkerStyle(kCircle);
+        data_->SetMarkerSize(0.5);
+      } else if(TString(type)=="photon") {
+        data_ = new TEveTrackList(name);
+        data_->SetMainColor(color_);
+        data_->SetMarkerColor(color_);
+        data_->SetMarkerStyle(kCircle);
+        data_->SetMarkerSize(0.5);
+      } else {
+        throw std::exception();
+      }
+    }
+template<> void DelphesBranchElement<TEveTrackList>::Reset() { data_->DestroyElements(); }
+
Index: display/DelphesBranchElement.h
===================================================================
--- display/DelphesBranchElement.h	(revision 5bb66c982f87faa1e89b33fbf80a11fab68ea6c0)
+++ display/DelphesBranchElement.h	(revision 5bb66c982f87faa1e89b33fbf80a11fab68ea6c0)
@@ -0,0 +1,84 @@
+/*
+ *  Delphes: a framework for fast simulation of a generic collider experiment
+ *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
+ *  
+ *  This program is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DelphesBranchElement_h
+#define DelphesBranchElement_h
+
+#include "TColor.h"
+#include "TString.h"
+#include <exception>
+#include "display/DelphesCaloData.h"
+#include "TEveElement.h"
+#include "TEveTrack.h"
+
+// virtual class to represent objects from a Delphes-tree branch
+class DelphesBranchBase
+{
+  public:
+    DelphesBranchBase(const char* name="", const char*type="", const enum EColor color=kBlack):name_(name),type_(type),color_(color) {}
+    virtual ~DelphesBranchBase() {};
+    const char* GetName() const { return (const char*)name_; }
+    const char* GetType() const { return (const char*)type_; }
+    enum EColor GetColor() const { return color_; }
+    virtual const char* GetClassName() = 0;
+    virtual void Reset() = 0;
+
+  protected:
+    TString name_;
+    TString type_; // needed for parsing the branch later on
+    const enum EColor color_;
+};
+
+// concrete implementations. EveContainer can be a TrackList, ElementList or CaloData.
+template<typename EveContainer> class DelphesBranchElement: public DelphesBranchBase
+{
+  public:
+    // constructor
+    DelphesBranchElement(const char* name="", const char*type="", const enum EColor color=kBlack):DelphesBranchBase(name, type, color) {
+      throw std::exception();
+    }
+
+    // destructor
+    virtual ~DelphesBranchElement() { delete data_; }
+
+    // get the container (ElementList, TrackList, or CaloData)
+    EveContainer* GetContainer() { return data_; }
+
+    // resets the collection (before moving to the next event)
+    virtual void Reset() {};
+
+    // template class name
+    virtual const char* GetClassName() { return data_->ClassName(); }
+
+  private:
+    EveContainer* data_;
+};
+
+// special case for calo towers
+template<> DelphesBranchElement<DelphesCaloData>::DelphesBranchElement(const char* name, const char*type, const enum EColor color);
+template<> void DelphesBranchElement<DelphesCaloData>::Reset();
+
+// special case for element lists
+template<> DelphesBranchElement<TEveElementList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color);
+template<> void DelphesBranchElement<TEveElementList>::Reset();
+
+// special case for track lists
+template<> DelphesBranchElement<TEveTrackList>::DelphesBranchElement(const char* name, const char*type, const enum EColor color);
+template<> void DelphesBranchElement<TEveTrackList>::Reset();
+
+#endif //DelphesBranchElement_h
Index: display/DisplayLinkDef.h
===================================================================
--- display/DisplayLinkDef.h	(revision 7c0fcd57d14b446090edd879dc30fd8902f2b2d6)
+++ display/DisplayLinkDef.h	(revision 5bb66c982f87faa1e89b33fbf80a11fab68ea6c0)
@@ -32,4 +32,5 @@
 #include "display/DelphesDisplay.h"
 #include "display/DelphesCaloData.h"
+#include "display/DelphesBranchElement.h"
 
 #ifdef __CINT__
@@ -41,4 +42,7 @@
 #pragma link C++ class DelphesDisplay+;
 #pragma link C++ class DelphesCaloData+;
+#pragma link C++ class DelphesBranchElement<DelphesCaloData>-!;
+#pragma link C++ class DelphesBranchElement<TEveElementList>-!;
+#pragma link C++ class DelphesBranchElement<TEveTrackList>-!;
 
 #endif
