Print

Print


Commit in lcio/src/cpp on MAIN
include/UTIL/Operators.h+209-701.2 -> 1.3
src/UTIL/LCTOOLS.cc+2-21.67 -> 1.68
        /Operators.cc+1325-1351.3 -> 1.4
+1536-207
3 modified files
new ostrream operator<<(T)  for LCIO classes 

lcio/src/cpp/include/UTIL
Operators.h 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- Operators.h	21 Sep 2006 06:10:39 -0000	1.2
+++ Operators.h	18 Jun 2010 13:43:14 -0000	1.3
@@ -1,70 +1,209 @@
-#ifndef LCIO_OPERATORS_H
-#define LCIO_OPERATORS_H 1
-
-//#include "EVENT/LCCollection.h"
-#include "EVENT/Vertex.h"
-#include "EVENT/ReconstructedParticle.h"
-
-//#include "UTIL/IndexMap.h"
-
-#include <iostream>
-#include <iomanip>
-#include <string>
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// override some operators to enable one to send objects to the output stream (e.g. cout << vertexObj << endl;
-// 
-// EXP: UNDER DEVELOPMENT!!!
-//
-// @author engels
-// @version $Id: Operators.h,v 1.2 2006/09/21 06:10:39 gaede Exp $
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-namespace UTIL{
-
-  //template to enable the use of the operator << for a "one-line" output of an object.
-  //since there are two ostream& << operators for sending an object to the output stream this
-  //template works like a "wrapper class" so that the correct operator can be triggered for the
-  //respective detailed/short output
-  template <class T> struct lcio_short{
-  const T* obj;
-  lcio_short(const T* t) : obj(t) {}
-  };
-
-  //template to enable a "one-line" output of a vertex object
-  template <class T> lcio_short<T> lcshort( const T* t){ return lcio_short<T>(t); }
- 
-/*
-  // EXP: INDEX MAP - UNDER DEVELOPMENT
-  
-  template <class T, class T2> struct lcio_short{
-  const T* obj;
-  const T2* cobj;
-  lcio_short(const T* t, const T2* t2) : obj(t),cobj(t2) {}
-  };
-
-  //template to enable a "one-line" output of a vertex object
-  template <class T, class T2> lcio_short<T, T2> lcshort( const T* t, const T2* t2){ return lcio_short<T, T2>(t, t2); }
-*/
-
-  /** operator for detailed output of a vertex object (e.g. cout << vertexObj << endl; ) */
-  std::ostream& operator<<( std::ostream& out, const EVENT::Vertex* v);
-  
-  /** operator for short output of a vertex object (e.g. cout << lcshort(vertexObj) << endl; ) */
-  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex>& sV);
- 
-  //EXP: INDEX MAP - UNDER DEVELOPMENT
-  //std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex, EVENT::LCCollection>& sV);
-  
-  //deprecated
-  //std::string brief( const EVENT::Vertex* v);
-  
-  /** for printing the header of a vertex object (e.g. cout << header(vertexObj) << endl; ) */
-  const std::string& header( const EVENT::Vertex* v);
-  
-  /** for printing the tail of a vertex object (e.g. cout << tail(vertexObj) << endl; ) */
-  const std::string& tail( const EVENT::Vertex* v);
-
-}//namespace
-
-#endif /* ifndef LCIO_OPERATORS_H */
+#ifndef LCIO_OPERATORS_H
+#define LCIO_OPERATORS_H 1
+
+//#include "EVENT/LCCollection.h"
+#include "EVENT/Vertex.h"
+#include "EVENT/ReconstructedParticle.h"
+#include "EVENT/SimCalorimeterHit.h"
+#include "EVENT/MCParticle.h"
+#include "EVENT/SimTrackerHit.h"
+//#include "IMPL/MCParticleImpl.h"
+#include "EVENT/TrackerHit.h"
+#include "EVENT/ReconstructedParticle.h"
+#include "EVENT/Track.h"
+#include "EVENT/Cluster.h"
+
+
+//#include "UTIL/IndexMap.h"
+
+#include <iostream>
+#include <iomanip>
+#include <string>
+
+
+//hauke
+#include "EVENT/LCRelation.h"
+#include "EVENT/LCFloatVec.h"
+
+#include "EVENT/LCEvent.h"
+//#include "EVENT/MCParticle.h"
+//#include "EVENT/LCParameters.h"
+//#include "EVENT/LCRunHeader.h"
+//end hauke
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// override some operators to enable one to send objects to the output stream (e.g. cout << vertexObj << endl;
+// 
+// EXP: UNDER DEVELOPMENT!!!
+//
+// @author engels
+// @version $Id: Operators.h,v 1.3 2010/06/18 13:43:14 gaede Exp $
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace UTIL{
+
+  //template to enable the use of the operator << for a "one-line" output of an object.
+  //since there are two ostream& << operators for sending an object to the output stream this
+  //template works like a "wrapper class" so that the correct operator can be triggered for the
+  //respective detailed/short output
+  template <class T> struct lcio_short{
+  const T* obj;
+  lcio_short(const T* t) : obj(t) {}
+  };
+
+  //template to enable a "one-line" output of a vertex object
+  template <class T> lcio_short<T> lcshort( const T* t){ return lcio_short<T>(t); }
+ 
+/*
+  // EXP: INDEX MAP - UNDER DEVELOPMENT
+  
+  template <class T, class T2> struct lcio_short{
+  const T* obj;
+  const T2* cobj;
+  lcio_short(const T* t, const T2* t2) : obj(t),cobj(t2) {}
+  };
+
+  //template to enable a "one-line" output of a vertex object
+  template <class T, class T2> lcio_short<T, T2> lcshort( const T* t, const T2* t2){ return lcio_short<T, T2>(t, t2); }
+*/
+
+
+  /** operator for detailed output of a vertex object (e.g. cout << vertexObj << endl; ) */
+  /** for printing the header of a vertex object (e.g. cout << header(vertexObj) << endl; ) */
+  /** for printing the tail of a vertex object (e.g. cout << tail(vertexObj) << endl; ) */
+
+  const std::string& header(const EVENT::Vertex &);
+  const std::string& tail(const EVENT::Vertex &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex>& sV);
+  std::ostream& operator<<( std::ostream& out, const EVENT::Vertex &v);
+
+
+//hauke 2010 (start)
+  const std::string& header( const EVENT::MCParticle &);
+  const std::string& tail( const EVENT::MCParticle &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::MCParticle>& sV);
+  std::ostream& operator<<( std::ostream& out, const EVENT::MCParticle &);
+
+
+  const std::string& header( const EVENT::TrackerHit &);
+  const std::string& tail( const EVENT::TrackerHit &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerHit>& sV);
+  std::ostream& operator<<( std::ostream& out, const EVENT::TrackerHit &);
+
+  const std::string& header( const EVENT::SimTrackerHit &);
+  const std::string& tail( const EVENT::SimTrackerHit &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::SimTrackerHit>& sV);
+  std::ostream& operator<<( std::ostream& out, const EVENT::SimTrackerHit &);
+
+  const std::string& header( const EVENT::CalorimeterHit &);
+  const std::string& tail( const EVENT::CalorimeterHit &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::CalorimeterHit>& sV);
+  std::ostream& operator<<( std::ostream& out, const EVENT::CalorimeterHit &);
+
+  const std::string& header( const EVENT::SimCalorimeterHit &);
+  const std::string& tail( const EVENT::SimCalorimeterHit &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::SimCalorimeterHit>& sV);
+  std::ostream& operator<<( std::ostream& out, const EVENT::SimCalorimeterHit &);
+
+  const std::string& header( const EVENT::ReconstructedParticle &);
+  const std::string& tail( const EVENT::ReconstructedParticle &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::ReconstructedParticle> & );
+  std::ostream& operator<<( std::ostream& out, const EVENT::ReconstructedParticle &);
+
+  const std::string& header( const EVENT::Track &);
+  const std::string& tail( const EVENT::Track &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Track> &);
+  std::ostream& operator<<( std::ostream& out, const EVENT::Track &);
+
+  const std::string& header( const EVENT::Cluster &);
+  const std::string& tail( const EVENT::Cluster &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Cluster> &);
+  std::ostream& operator<<( std::ostream& out, const EVENT::Cluster &);
+
+  const std::string& header( const EVENT::LCRelation &);
+  const std::string& tail( const EVENT::LCRelation &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCRelation> &);
+  std::ostream& operator<<( std::ostream& out, const EVENT::LCRelation &);
+
+  const std::string& header( const EVENT::LCFloatVec &);
+  const std::string& tail( const EVENT::LCFloatVec &);
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCFloatVec> &);
+  std::ostream& operator<<( std::ostream& out, const EVENT::LCFloatVec &);
+
+  template <class T> 
+        const std::string & header(){return header((T)(0)); }
+  template <class T> 
+        const std::string & tail(){return tail((T)(0)); }
+
+
+  template <class T>
+  class LCIO_LONG{
+        public:
+            //lcio_long(const T& o, EVENT::LCCollection* c);
+            LCIO_LONG(const T& o, const EVENT::LCCollection* c){ obj=&o; col=c;};
+            const T *object(void) const {return(obj);};
+            const EVENT::LCCollection *collection(void) const {return(col);};
+        private: 
+            const T *obj;
+            const EVENT::LCCollection *col;
+  };
+
+  //test:
+  template <class T>
+  LCIO_LONG<T> lcio_long(const T& o, const EVENT::LCCollection* c){return(LCIO_LONG<T>(o,c));}
+
+
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::CalorimeterHit> l);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Cluster> l);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Track> l);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::ReconstructedParticle> ll);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::SimCalorimeterHit> ll);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackerHit> ll);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::SimTrackerHit> ll);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::MCParticle> ll);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Vertex> ll);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCRelation> ll);
+  std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCFloatVec> ll);
+
+
+
+/*
+  template <class T>
+  std::ostream& operator<<( std::ostream& out, const T obj) {
+    out << lcio_long<T>( obj , NULL ) ;
+    return out;
+  }
+*/
+
+
+
+
+
+
+
+
+//hauke 2010 (end)
+
+
+
+
+//  std::ostream& operator<<( std::ostream& out, const EVENT::CalorimeterHit*  c);
+
+
+  //std::ostream& operator<<( std::ostream& out, const EVENT::TrackerHit*);
+//  std::ostream& operator<<( std::ostream& out, const EVENT::MCParticleImpl*);
+  
+  /** operator for short output of a vertex object (e.g. cout << lcshort(vertexObj) << endl; ) */
+ 
+  //EXP: INDEX MAP - UNDER DEVELOPMENT
+  //std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex, EVENT::LCCollection>& sV);
+  
+
+  //deprecated
+  //std::string brief( const EVENT::Vertex* v);
+  
+
+}//namespace
+
+#endif /* ifndef LCIO_OPERATORS_H */

lcio/src/cpp/src/UTIL
LCTOOLS.cc 1.67 -> 1.68
diff -u -r1.67 -r1.68
--- LCTOOLS.cc	2 Jun 2010 10:59:33 -0000	1.67
+++ LCTOOLS.cc	18 Jun 2010 13:43:14 -0000	1.68
@@ -1328,10 +1328,10 @@
     for( int i=0 ; i< nPrint ; i++ ){
       Vertex* v = dynamic_cast<Vertex*>( col->getElementAt( i ) ) ;
       
-      if( i==0) { cout<<header(v); }
+      if( i==0) { cout<<header(*v); }
       //cout<<lcshort(v,col);
       cout<<lcshort(v);
-      if(i==nPrint-1){ cout<<tail(v); }
+      if(i==nPrint-1){ cout<<tail(*v); }
     }
   }
 

lcio/src/cpp/src/UTIL
Operators.cc 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- Operators.cc	4 Jun 2008 09:57:55 -0000	1.3
+++ Operators.cc	18 Jun 2010 13:43:14 -0000	1.4
@@ -1,135 +1,1325 @@
-#include "UTIL/Operators.h"
-
-////////////////////////////////////////////////////////////////////////////////
-// EXP: UNDER DEVELOPMENT!!!
-////////////////////////////////////////////////////////////////////////////////
-
-using namespace std;
-using namespace EVENT;
-
-namespace UTIL{
-
-/* 
-  // EXP: INDEX MAP - UNDER DEVELOPMENT
-  
-  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex, EVENT::LCCollection>& sV){
-    const EVENT::Vertex* v = sV.obj;
-    const EVENT::LCCollection* col = sV.cobj;
-    
-    //TODO: PROBLEM HERE!!!
-    UTIL::IndexMap im(col,"AlgorithmNames","AlgorithmTypes");
-    
-    out << setfill('0');
-    out << " [" << setw(8) << hex << v->id() << "] | " << v->isPrimary()<< " | ";
-    out << setfill(' ') << setw(17) << left << im.decode( v->getAlgorithmType() ) << " | ";
-    
-    out << setfill('0') << right << scientific << setprecision(3) << v->getChi2() << " | " << v->getProbability() << " | " <<
-	v->getPosition()[0] << "," <<
-        v->getPosition()[1] << "," <<
-        v->getPosition()[2] << " | [" ;
-
-//    for(int i=0;i<VTXCOVMATRIX;i++)
-//      out << v->getCovMatrix()[i] << (i<(VTXCOVMATRIX-1)?",":" | [");
-    out << setw(3) << v->getParameters().size() << "] | [";
-    out << setw(8) << hex << (v->getAssociatedParticle()!=NULL?v->getAssociatedParticle()->id():0) << "]\n";
-    
-    return out;
-
-  }
-*/
-
-  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex>& sV){
-    const EVENT::Vertex* v = sV.obj;
-    
-    out << setfill('0');
-    out << " [" << setw(8) << hex << v->id() << "] | " << v->isPrimary()<< " | ";
-    out << setfill(' ') << setw(17) << left << v->getAlgorithmType() << " | ";
-    
-    out << setfill('0') << right << scientific << setprecision(3) << v->getChi2() << " | " << v->getProbability() << " | " <<
-	v->getPosition()[0] << ", " << v->getPosition()[1] << ", " << v->getPosition()[2] << " | [" ;
-
-    out << setw(3) << v->getParameters().size() << "] | [";
-    out << setw(8) << hex << (v->getAssociatedParticle()!=NULL?v->getAssociatedParticle()->id():0) << "]\n";
-    
-    return out;
-
-  }
- 
-  std::ostream& operator<<( std::ostream& out, const EVENT::Vertex* v){
-    
-    out << setfill('0');
-    out << "Vertex ID:\t\t[" << setw(8) << hex << v->id() << "]" << endl;
-    out << "Is Primary Vertex:\t" << (v->isPrimary() ? "yes":"no") << endl;
-    out << "Algorithm Type:\t" << v->getAlgorithmType() << endl;
-    out << scientific << setprecision(5);
-    out << "Chi2:\t\t\t" << v->getChi2() << endl;
-    out << "Probability:\t\t" << v->getProbability() << endl;
-    out << "Position (x, y, z):\t" <<
-	v->getPosition()[0] <<", "<<
-	v->getPosition()[1] <<", "<<
-	v->getPosition()[2] << endl;
-    
-    out << "Covariance Matrix:\t";
-    for(unsigned int i=0; i<v->getCovMatrix().size(); i++)
-      out << v->getCovMatrix()[i] << (i<(v->getCovMatrix().size()-1)?", ":"\n");
-    
-    out << "Parameters:";
-    if(v->getParameters().size()==0){
-      out << "\t\t[Empty]" << endl;
-    }
-    else { out << endl; }
-    for(unsigned int i=0; i < v->getParameters().size(); i++){
-      out << "   Parameter [";
-      out << setw(3) << i << "]:\t";
-      out << scientific << setprecision(5) << v->getParameters()[i] << endl;
-    }
-    
-    out << "Associated Reconstructed Particle ID:\t["; 
-    out << setw(8) << hex << (v->getAssociatedParticle()!=NULL?v->getAssociatedParticle()->id():0) <<"]\n\n";
-   
-    return out;
-  }
-  
-  const std::string& header(const EVENT::Vertex* v){
-    
-    static std::string _vtxh(
-      "\n    [id]    |pri|     alg. type     |    chi2   |    prob.  |       position ( x, y, z)       | [par] |  [idRecP]  \n");
-    _vtxh+=tail(v);
-    return _vtxh;
-  }
-  
-  const std::string& tail(const EVENT::Vertex* v){
-    
-    static std::string _vtxt(
-	"------------|---|-------------------|-----------|-----------|---------------------------------|-------|------------\n");
-    return _vtxt;
-  }
-
-//deprecated
-/*
-  std::string brief(const EVENT::Vertex* v){
-    std::string str;
-    char buffer[256];
-	  
-    sprintf( buffer, " [%8.8x] | %1d | %4.2e | %4.2e | %5.3e, %5.3e, %5.3e | "
-      , v->id()
-      , v->isPrimary()
-      , v->getChi2()
-      , v->getProbability()
-      , v->getPosition()[0]
-      , v->getPosition()[1]
-      , v->getPosition()[2]
-    ) ;
-
-    for(int i=0; i<VTXCOVMATRIX; i++)
-      sprintf( buffer, "%s%5.3e%s", buffer, v->getCovMatrix()[i], (i<(VTXCOVMATRIX-1) ? ", ":" |") ) ;
-    
-    sprintf( buffer, "%s [%8.8x]\n", buffer, (v->getAssociatedParticle()!=NULL? v->getAssociatedParticle()->id(): 0) ) ;
-    
-    str = buffer;
-    return str;
-  }
-*/
-
-} // namespace
- 
+#include "UTIL/Operators.h"
+
+#include "EVENT/ReconstructedParticle.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// EXP: UNDER DEVELOPMENT!!!
+////////////////////////////////////////////////////////////////////////////////
+
+using namespace std;
+using namespace EVENT;
+
+
+//hauke: for the LCIOTOOLS.cc code
+#include "EVENT/SimTrackerHit.h"
+#include "UTIL/LCTOOLS.h"
+
+#include "EVENT/TPCHit.h"
+#include "EVENT/TrackerRawData.h"
+#include "EVENT/TrackerData.h"
+#include "EVENT/TrackerPulse.h"
+#include "EVENT/LCIO.h"
+#include "EVENT/MCParticle.h"
+#include "EVENT/LCFloatVec.h"
+#include "EVENT/LCIntVec.h"
+#include "IMPL/LCFlagImpl.h"
+#include "EVENT/Track.h"
+#include "EVENT/Cluster.h"
+#include "EVENT/ReconstructedParticle.h"
+#include "EVENT/Vertex.h"
+#include "EVENT/TrackerHit.h"
+#include "EVENT/LCGenericObject.h"
+#include "EVENT/LCRelation.h"
+#include "LCIOSTLTypes.h"
+
+#include <sstream>
+
+// #ifdef USE_CLHEP
+// #include "UTIL/LCFourVector.h"
+// #endif
+#include "UTIL/LCObjectHandle.h"
+#include "UTIL/LCTime.h"
+#include "UTIL/CellIDDecoder.h"
+#include "UTIL/PIDHandler.h"
+#include <map>
+#include <set>
+#include <cstdio>
+
+#include "EVENT/LCEvent.h"
+
+typedef std::vector<std::string> LCStrVec ;
+
+using namespace std ;
+using namespace EVENT ;
+using namespace IMPL ;
+
+//end hauke
+
+
+namespace UTIL{
+
+/* 
+  // EXP: INDEX MAP - UNDER DEVELOPMENT
+  
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex, EVENT::LCCollection>& sV){
+    const EVENT::Vertex* v = sV.obj;
+    const EVENT::LCCollection* col = sV.cobj;
+    
+    //TODO: PROBLEM HERE!!!
+    UTIL::IndexMap im(col,"AlgorithmNames","AlgorithmTypes");
+    
+    out << setfill('0');
+    out << " [" << setw(8) << hex << v->id() << "] | " << v->isPrimary()<< " | ";
+    out << setfill(' ') << setw(17) << left << im.decode( v->getAlgorithmType() ) << " | ";
+    
+    out << setfill('0') << right << scientific << setprecision(3) << v->getChi2() << " | " << v->getProbability() << " | " <<
+	v->getPosition()[0] << "," <<
+        v->getPosition()[1] << "," <<
+        v->getPosition()[2] << " | [" ;
+
+//    for(int i=0;i<VTXCOVMATRIX;i++)
+//      out << v->getCovMatrix()[i] << (i<(VTXCOVMATRIX-1)?",":" | [");
+    out << setw(3) << v->getParameters().size() << "] | [";
+    out << setw(8) << hex << (v->getAssociatedParticle()!=NULL?v->getAssociatedParticle()->id():0) << "]\n";
+    
+    return out;
+
+  }
+*/
+
+  const std::string& header(const EVENT::SimCalorimeterHit &){ //hauke
+        static std::string _vtxh("    [id]    | cellId0| cellId1|  energy  |energyerr |        position (x,y,z)          |nMCParticles|\n\t\t-> MC contribution: prim. PDG|  energy  |   time   | sec. PDG\n");
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::SimCalorimeterHit &){ //hauke
+        static std::string _vtxt("------------|--------|--------|----------|----------|----------------------------------|-------------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::SimCalorimeterHit>& sV){ //hauke
+    const EVENT::SimCalorimeterHit* hit = sV.obj;
+    using namespace std;
+    out << noshowpos;
+    out << " [" << hex << setw(8) << setfill('0') << hit->id() << "] ";
+    out << "|" << hex << setw(8) << setfill('0') << hit->getCellID0();
+    out << "|" << hex << setw(8) << setfill('0') << hit->getCellID1();
+    out << "|" << dec << setprecision(3) << scientific << showpos << hit->getEnergy(); 
+    //out << "|" << dec << setprecision(3) << scientific << hit->getEnergyError() << "|"; 
+    out << "|" << dec << setprecision(3) << scientific << "          "; 
+    out << "|" << dec << setprecision(3) << scientific << showpos
+        << hit->getPosition()[0] << ", " << hit->getPosition()[0] << ", " << hit->getPosition()[0]; 
+    out << "|" << dec << setw(12) << setfill(' ') << hit->getNMCContributions()
+        << endl;
+
+    for(int k=0;k < hit->getNMCContributions();k++){
+        try{
+            out << "\t\t-> "
+                 << setw(15) << left <<  setfill(' ') << k << ":"
+                 << setw(10) << left <<  setfill(' ') << hit->getParticleCont(k)->getPDG() << "|"
+                 << right << setprecision(3) << scientific << showpos << hit->getEnergyCont(k) << "|"
+                 << setprecision(3) << scientific << setw(8) <<setfill(' ') << showpos<< hit->getTimeCont(k) << "|" 
+                 << " " << hit->getPDGCont( k) << endl ;
+        }catch(exception& e){
+            out << e.what() << endl ;
+        }
+    }
+    out << noshowpos;
+
+    return(out);
+}
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::SimCalorimeterHit  &hit){
+    //out<<lcio_long<EVENT::SimCalorimeterHit>(hit,NULL);
+    out<<lcio_long(hit,NULL);
+    return out;
+  }
+
+/*  std::ostream& operator<<( std::ostream& out, const LCIO::MCParticle*  part){
+    out << endl
+            <<  "[   id   ]index|      PDG |    px,     py,        pz    | energy  |gen|[simstat]| vertex x,     y   ,   z     | endpoint x,    y  ,   z     |    mass |  charge |  [parents] - [daughters] |"
+        << endl
+        << endl ;
+      printf("[%8.8x]", part->id() );
+      printf("%10d|" , part->getPDG() );
+      printf("% 1.2e,% 1.2e,% 1.2e|" ,
+         part->getMomentum()[0] ,
+         part->getMomentum()[1] ,
+         part->getMomentum()[2] );
+      printf("% 1.2e|" , part->getEnergy() ) ;
+
+      printf(" %1d |" , part->getGeneratorStatus()  );
+      printf("% 1.2e,% 1.2e,% 1.2e|" ,
+         part->getVertex()[0] ,
+         part->getVertex()[1] ,
+         part->getVertex()[2] );
+      printf("% 1.2e,% 1.2e,% 1.2e|" ,
+         part->getEndpoint()[0] ,
+         part->getEndpoint()[1] ,
+         part->getEndpoint()[2] );
+      printf("% 1.2e|" , part->getMass() ) ;
+      printf("% 1.2e|" , part->getCharge() ) ;
+
+      cout << " [" ;
+
+      for(unsigned int k=0;k<part->getParents().size();k++){
+            if(k>0) cout << "," ;
+            cout << p2i_map[ part->getParents()[k] ]  ;
+      }
+      cout << "] - [" ;
+      for(unsigned int k=0;k<part->getDaughters().size();k++){
+            if(k>0) cout << "," ;
+            cout << p2i_map[ part->getDaughters()[k] ]  ;
+      }
+      cout << "] " << endl ;
+
+
+    cout << endl
+     << "-------------------------------------------------------------------------------- "
+     << endl ;
+}
+*/
+
+
+  const std::string& header(const EVENT::TrackerHit &){ //hauke
+    static std::string _vtxh("    [id]    | position (x,y,z)            | dEdx    | time    |type \n");
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::TrackerHit &){ //hauke
+    static std::string _vtxt("------------|-----------------------------|---------|---------|-----\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerHit>& sV){ //hauke
+    const EVENT::TrackerHit* part = sV.obj;
+    using namespace std;
+    out << " [" << setfill('0') << setw(8) << hex<< part->id() << "] |" << dec;
+    out << showpos << scientific << setprecision (2) << part->getPosition()[0] << ","<< part->getPosition()[1] << "," << part->getPosition()[2] << "|"; 
+    out << part->getdEdx() << "|";
+    out << part->getTime() << "|";
+    out << noshowpos << setw(4) << part->getType() << endl;
+    return out;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::TrackerHit &hit){ //hauke
+    out << lcio_long(hit,NULL);
+    return out;
+  }
+
+  const std::string& header(const EVENT::SimTrackerHit &){ //hauke
+    static std::string _vtxh(" CellID  | position (x,y,z)            |  dEdx   |  time   |PDG of MCParticle|   px    ,   py    ,   pz    |path length \n");
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::SimTrackerHit &){ //hauke
+    static std::string _vtxt("---------|-----------------------------|---------|---------|-----------------|-----------------------------|------------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::SimTrackerHit>& sV){ //hauke
+    const EVENT::SimTrackerHit* hit = sV.obj;
+    using namespace std;
+    out << noshowpos << " " << setw(8) << hex << hit->getCellID() << "|";
+    out << showpos << scientific << setprecision (2) << setfill(' ') << hit->getPosition()[0]<<","<<hit->getPosition()[1]<<","<<hit->getPosition()[2]<<"|";
+    out << hit->getdEdx() << "|";
+    out << hit->getTime() << "|";
+    if(hit->getMCParticle()){
+        out << setw(17) << hit->getMCParticle()->getPDG() << "|";
+    }else{
+        out << "                 |";
+    }
+    out << hit->getMomentum()[0] << "," << hit->getMomentum()[0] << "," << hit->getMomentum()[0] << "|";
+    out << setw(11) << hit->getPathLength() << endl;
+    out << noshowpos;
+
+    return(out);
+}
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::SimTrackerHit &hit){ //hauke
+    out << lcio_long(hit,NULL);
+    return(out);
+  }
+
+
+  const std::string& header(const EVENT::CalorimeterHit &){ //hauke
+    static std::string _vtxh("    [id]    |cellId0 |cellId1 |  energy  |energyerr |        position (x,y,z)           \n");
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::CalorimeterHit &){ //hauke
+    static std::string _vtxt("------------|--------|--------|----------|----------|-----------------------------------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::CalorimeterHit>& sV){ //hauke
+    const EVENT::CalorimeterHit* hit = sV.obj;
+    using namespace std;
+    out << noshowpos;
+
+    out << " [" << hex << setw(8) << setfill('0') << hit->id() << "] ";
+    out << "|" << hex << setw(8) << setfill('0') << hit->getCellID0();
+    out << "|" << hex << setw(8) << setfill('0') << hit->getCellID1();
+    out << "|" << dec << setprecision(3) << scientific << showpos << hit->getEnergy(); 
+    out << "|" << dec << setprecision(3) << scientific << hit->getEnergyError(); 
+    out << "|" << dec << setprecision(3) << scientific << showpos
+        << hit->getPosition()[0] << ", " << hit->getPosition()[0] << ", " << hit->getPosition()[0]; 
+    out << endl << noshowpos;
+
+    return(out);
+}
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::CalorimeterHit &hit){ //hauke
+    out << lcio_long(hit,NULL);
+    //out << lcio_long(a,NULL);
+
+    return(out);
+  }
+/*
+    using namespace std;
+    stringstream tmp;
+    out << noshowpos;
+
+    out << setw(42) <<  std::setfill('-') << right << " CalorimeterHit " << setfill('-') << setw(28) << "-" << endl;
+    //out << setw(30) << setfill(' ') << left << "ID" <<   right << setw(40) << hit->getId() << endl;
+    out << setw(30) << setfill(' ') << left << "CellId0" <<   right << setw(40) << hex <<  hit->getCellID0() << endl;
+    out << setw(30) << setfill(' ') << left << "CellId1" <<   right << setw(40) << hex << hit->getCellID1() << endl;
+    out << setw(30) << setfill(' ') << left << "Energy [GeV]" <<   right << setw(40) << dec << hit->getEnergy() << endl;
+    out << setw(30) << setfill(' ') << left << "Energy Error [GeV]" <<   right << setw(40) << hit->getEnergyError() << endl;
+    tmp.str("");
+    tmp  << hit->getPosition()[0] << ", " << hit->getPosition()[1]  << ", " << hit->getPosition()[2]; 
+    out <<setw(30) << left << showpos << "Position (x,y,z) " << setfill(' ') << right <<setw(40) << tmp.str() << endl;
+    out <<setw(30) << left << noshowpos << "Type " << setfill(' ') << right <<setw(40) << hit->getType() << endl;
+    out << noshowpos;
+
+    return(out);
+
+    }
+*/
+
+  const std::string& header(const EVENT::MCParticle &){ //hauke
+    static std::string _vtxh("    [id]    |      PDG |    px   ,    py   ,    pz   |  energy |gen| vertex x,    y    ,    z    |endpoint x,    y   ,    z    |  mass   | charge  |parents-daughters\n");
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::MCParticle &){ //hauke
+    static std::string _vtxt("------------|----------|-----------------------------|---------|---|-----------------------------|-----------------------------|---------|---------|------------------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::MCParticle>& sV){ //hauke
+    const EVENT::MCParticle* part = sV.obj;
+    using namespace std;
+    out << noshowpos <<  " [" << setfill('0') << setw(8) << hex<< part->id() << "] |" << dec;
+    out << setfill(' ') << setw(10) << part->getPDG() << "|";
+    out << showpos << scientific << setprecision (2) << part->getMomentum()[0] << ","<< part->getMomentum()[1] << "," << part->getMomentum()[2] << "|"; 
+    out << part->getEnergy() << "|";
+    out << " " << noshowpos << part->getGeneratorStatus() << showpos <<" |";
+    out << part->getVertex()[0] << "," << part->getVertex()[1] << "," <<part->getVertex()[2] << "|";
+    out << part->getEndpoint()[0] << "," << part->getEndpoint()[1] << "," <<part->getEndpoint()[2] << "|";
+    out << part->getMass() << "|"; 
+    out << part->getCharge() << "|"; 
+    out << setw(6) << part->getParents().size() << " - " << setw(8) << part->getDaughters().size();
+    out << endl << noshowpos;
+    return out;
+  }
+
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::MCParticle &mcp){ //hauke
+    out << lcio_long(mcp,NULL);
+    return out;
+  }
+
+  const std::string& header(const EVENT::ReconstructedParticle &){ //hauke
+    static std::string _vtxh("    [id]    |com|type|     momentum( px,py,pz)       | energy | mass   | charge |        position ( x,y,z)      |pidUsed\n");
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::ReconstructedParticle &){ //hauke
+    static std::string _vtxt("------------|---|----|-------------------------------|--------|--------|--------|-------------------------------|--------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::ReconstructedParticle>& sV){ //hauke
+    const EVENT::ReconstructedParticle * part = sV.obj;
+    stringstream tmp;
+    using namespace std;
+    out << noshowpos <<  " [" << setfill('0') << setw(8) << hex << part->id() << "] |" << dec;
+    out << setfill(' ') << setw(3) << part->isCompound() << "|";
+    out << setfill(' ') << setw(4) << part->getType() << "|";
+
+    tmp.str("");
+    tmp << showpos << scientific << setprecision(2); 
+    tmp << part->getMomentum()[0] << ", " << part->getMomentum()[1] << ", " << part->getMomentum()[2];
+    out << tmp.str() << "|";
+
+
+    out << noshowpos << scientific << setprecision(2); 
+    out << part->getMass() << "|";
+    out << part->getCharge() << "|";
+    out << part->getEnergy() << "|";
+
+    tmp.str("");
+    tmp << part->getReferencePoint()[0] << ", " << part->getReferencePoint()[1] << ", " << part->getReferencePoint()[2];
+    out << tmp.str() << "|";
+
+    out << hex << setw(7) << setfill('0');
+    if(part->getParticleIDUsed() != 0 ){
+        out << part->getParticleIDUsed()->id();
+    }else{ 
+        out << 0;
+    }
+    out << endl;
+
+    out << "    covariance( px,py,pz,E) : (" ;
+    for(int l=0;l<10;l++){
+        if(l==9){
+            out << scientific << setprecision(2) << part->getCovMatrix()[l];
+        }else{
+            out << scientific << setprecision(2) << part->getCovMatrix()[l] << ", ";
+        }
+
+
+
+        //printf("%4.2e, ", part->getCovMatrix()[l] ) ;
+    }
+    out << ")" << endl ;
+
+    out << "    particles ( [   id   ] ):" ;
+    for(unsigned int l=0;l<part->getParticles().size();l++){
+        if(l == part->getParticles().size()-1){
+            out << hex <<  setfill('0') << "[" <<setw(8) << part->getParticles()[l]->id() << "]";
+        }else{
+            out << hex <<  setfill('0') << "[" <<setw(8) << part->getParticles()[l]->id() << "], ";
+        }
+         
+        //printf("[%8.8x], ", part->getParticles()[l]->id() ) ;
+    }
+    out << endl ;
+
+    out << "    tracks ( [   id   ] ): " ;
+    for(unsigned int l=0;l<part->getTracks().size();l++){
+        if(l == part->getTracks().size()-1){
+            out << hex << setfill('0') << "[" << setw(8) << part->getTracks()[l]->id() << "]";
+        }else{
+            out << hex << setfill('0') << "[" << setw(8) << part->getTracks()[l]->id() << "], ";
+        }
+
+        //printf("[%8.8x], ",  part->getTracks()[l]->id() );
+    }
+    out << endl ;
+
+    out << "    clusters ( [   id   ] ): " ;
+    for(unsigned int l=0;l<part->getClusters().size();l++){
+        if(l == part->getClusters().size()-1){
+            out << hex <<  setfill('0') << "[" << setw(8) << part->getClusters()[l]->id() << "]";
+        }else{
+            out << hex <<  setfill('0') << "[" << setw(8) << part->getClusters()[l]->id() << "], ";
+        }
+
+        //printf("[%8.8x], ",  part->getClusters()[l]->id() );
+    }
+    out << endl ;
+    out << "    particle ids ( [id], PDG, (type)): " ;
+    for(unsigned int l=0;l<part->getParticleIDs().size();l++){
+        ParticleID* pid = part->getParticleIDs()[l] ;
+        out << hex <<  "[" << setw(8) <<pid->id() << "], " <<  dec << setw(6) << pid->getPDG() << ", " <<  "(" << setw(6) <<pid->getType() << ") ";
+        //printf("[%8.8x], %6.6d, (%6.6d)  ",  pid->id() , pid->getPDG() , pid->getType() ) ;
+    }
+    out << endl ;
+
+    return out;
+  }
+
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::ReconstructedParticle &part){ //hauke
+    out << lcio_long(part,NULL);
+    return(out);
+  }
+
+  const std::string& header(const EVENT::Track &){ //hauke
+    static std::string _vtxh("    [id]    |    type   |   d0    |  phi    |  omega  |   z0    |tan lambd|   reference point(x,y,z)      |   dEdx  | dEdxErr |   chi2    \n");
+    return _vtxh;
+  }
+
+  const std::string& tail(const EVENT::Track &){ //hauke
+    static std::string _vtxt("------------|-----------|---------|---------|---------|---------|---------|-------------------------------|---------|---------|----------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Track>& sV){ //hauke
+    const EVENT::Track * part = sV.obj;
+    using namespace std;
+    out << noshowpos <<  " [" << setfill('0') << setw(8) << hex<< part->id() << "] ";
+    out << "|" << dec << setfill(' ') << setw(8) << part->getType();
+    out << scientific << setprecision (2) << showpos;
+    out << "|" << part->getD0(); 
+    out << "|" << part->getPhi(); 
+    out << "|" << part->getOmega();
+    out << "|" << part->getZ0();
+    out << "|" << part->getTanLambda();
+    out << "|" << part->getReferencePoint()[0] << ", " << part->getReferencePoint()[1] << ", " <<part->getReferencePoint()[2];
+    out << "|" << part->getdEdx();
+    out << "|" << part->getdEdxError();
+    out << "|" << part->getChi2();
+    out << endl;
+    
+    out << "Errors: " ;
+    unsigned int l;
+    for(l=0;l<14;l++){
+        out << part->getCovMatrix()[l] << ", ";
+    }
+    out << part->getCovMatrix()[l+1] << endl;
+
+
+    out << "Tracks(id): " ;
+    const TrackVec& tracks = part->getTracks() ;
+    for(l=0;l<tracks.size();l++){
+        if( tracks[l] != 0  )
+            out << tracks[l]->id();
+        else
+            out << 0;
+        if(l != tracks.size()-1){ out << ", ";}
+    }
+
+    out << endl << "Hits ->";
+    const TrackerHitVec& hits= part->getTrackerHits() ;
+    for(l=0;l<hits.size();l++){
+        out << "[" << hits[l]->id() << "] ";
+    }
+    out << endl;
+
+    out << "Radius of innermost hit " << part->getRadiusOfInnermostHit() << " / mm , " << " subdetector Hit numbers : " ;
+    for(l=0 ; l< part->getSubdetectorHitNumbers().size()-1 ; l++) {
+        out << part->getSubdetectorHitNumbers()[l] << ", " ;
+    }
+    out << part->getSubdetectorHitNumbers()[l+1] << endl;
+    return out;
+  }
+
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::Track &part){ //hauke
+    out << lcio_long(part,NULL);
+    return(out);
+  }
+      
+
+
+  const std::string& header(const EVENT::Cluster &){ //hauke
+    static std::string _vtxh("    [id]    |type|  energy  |      position ( x,y,z)           |  itheta  |   iphi   \n");
+    return _vtxh;
+  }
+
+
+  const std::string& tail(const EVENT::Cluster &){ //hauke
+    static std::string _vtxt("------------|----|----------|----------------------------------|----------|----------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Cluster>& sV){ //hauke
+    const EVENT::Cluster * clu = sV.obj;
+    using namespace std;
+    out << noshowpos <<  " [" << setfill('0') << setw(8) << hex << clu->id() << "] |" << dec;
+    out << setfill(' ') << setw(4) << clu->getType() << "|";
+    out << showpos << scientific << setprecision(3) << clu->getEnergy() << "|";
+    out << clu->getPosition()[0] << ", " << clu->getPosition()[1] << ", " <<  clu->getPosition()[2] << "|";
+    out << clu->getITheta() << "|";
+    out << clu->getIPhi() <<  noshowpos << endl;
+    return out;
+  }
+
+
+  std::ostream& operator<<( std::ostream& out, const EVENT::Cluster &clu){ //hauke
+    out << lcio_long(clu,NULL);
+    return(out);
+  }
+
+
+//####################################################
+
+  const std::string& header(const EVENT::Vertex &v){
+    static std::string _vtxh(
+      "\n    [id]    |pri|     alg. type     |    chi2   |    prob.  |       position ( x, y, z)       | [par] |  [idRecP]  \n");
+    //_vtxh+=tail(v);
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::Vertex &){
+    static std::string _vtxt(
+	"------------|---|-------------------|-----------|-----------|---------------------------------|-------|------------\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex>& sV){
+    using namespace std;
+
+    const EVENT::Vertex* v = sV.obj;
+    out << noshowpos; 
+    out << setfill('0');
+    out << " [" << setw(8) << hex << v->id() << "] | " << v->isPrimary()<< " | ";
+    out << setfill(' ') << setw(17) << left << v->getAlgorithmType() << " | ";
+    out << showpos;
+    
+    out << setfill('0') << right << scientific << setprecision(2) << v->getChi2() << " | " << v->getProbability() << " | " <<
+	v->getPosition()[0] << ", " << v->getPosition()[1] << ", " << v->getPosition()[2] << " | [" ;
+
+    out << setw(3) << v->getParameters().size() << "] | [";
+    out << setw(8) << hex << (v->getAssociatedParticle()!=NULL?v->getAssociatedParticle()->id():0) << "]\n";
+
+    out << noshowpos; 
+    return out;
+  }
+
+
+ 
+  std::ostream& operator<<( std::ostream& out, const EVENT::Vertex &v){
+    out << lcio_long(v,NULL);
+    return out;
+  }
+
+//#######################
+  const std::string& header(const EVENT::LCRelation &v){
+    static std::string _vtxh("| [  from  ] | [   to   ] | Weight |\n");
+    //_vtxh+=tail(v);
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::LCRelation &){
+    static std::string _vtxt("|------------|------------|--------|\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCRelation>& sV){
+    using namespace std;
+    const EVENT::LCRelation* v = sV.obj;
+    out << noshowpos; 
+    out << "| [" << setw(8) << hex << (v->getFrom())->id() << "] |";
+    out << " [" << setw(8) << hex << (v->getTo())->id() << "] |";
+    out << " " << setw(8) << dec << v->getWeight() << "|\n";
+    return out;
+  }
+
+
+ 
+  std::ostream& operator<<( std::ostream& out, const EVENT::LCRelation &v){
+    out << lcio_long(v,NULL);
+    return out;
+  }
+//#######################
+  const std::string& header(const EVENT::LCFloatVec &v){
+    static std::string _vtxh("| [  id  ] |\n");
+    //_vtxh+=tail(v);
+    return _vtxh;
+  }
+  
+  const std::string& tail(const EVENT::LCFloatVec &){
+    static std::string _vtxt("|----------|\n");
+    return _vtxt;
+  }
+
+  std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCFloatVec>& sV){
+    using namespace std;
+    const EVENT::LCFloatVec* v = sV.obj;
+    out << noshowpos; 
+    out << "| [" << setw(8) << hex << v->id() << "] |\n";
+    return out;
+  }
+
+
+ 
+  std::ostream& operator<<( std::ostream& out, const EVENT::LCFloatVec &v){
+    out << lcio_long(v,NULL);
+    return out;
+  }
+
+//#######################
+std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::CalorimeterHit> l) {
+    const EVENT::CalorimeterHit *hit = l.object();
+    const EVENT::LCCollection *col = l.collection();
+
+    using namespace std;
+    stringstream tmp;
+    out << noshowpos;
+
+    out << setw(42) <<  std::setfill('-') << right << " CalorimeterHit " << setfill('-') << setw(28) << "-" << endl;
+
+    if(col != NULL){ 
+        if(col->getTypeName() != LCIO::CALORIMETERHIT){
+            out << "Warning: collection not of type " << LCIO::CALORIMETERHIT << endl ;
+            return(out);
+        }
+        tmp.str(""); 
+        tmp << "0x" << hex << col->getFlag() << dec;
+        out << setw(30) << setfill(' ') << left << "Collection Flag" << right << setw(40) <<  tmp.str() << endl;
+        LCTOOLS::printParameters(col->getParameters()); //todo
+        LCFlagImpl flag(col->getFlag());
+        cout << "  -> LCIO::RCHBIT_LONG   : " << flag.bitSet( LCIO::RCHBIT_LONG ) << endl ;
+        cout << "     LCIO::RCHBIT_BARREL : " << flag.bitSet( LCIO::RCHBIT_BARREL ) << endl ;
+        cout << "     LCIO::RCHBIT_ID1    : " << flag.bitSet( LCIO::RCHBIT_ID1 ) << endl ;
+        cout << "     LCIO::RCHBIT_TIME   : " << flag.bitSet( LCIO::RCHBIT_TIME ) << endl ;
+        cout << "     LCIO::RCHBIT_NO_PTR : " << flag.bitSet( LCIO::RCHBIT_NO_PTR ) << endl ;
+        cout << "     LCIO::RCHBIT_ENERGY_ERROR  : " << flag.bitSet( LCIO::RCHBIT_ENERGY_ERROR ) << endl ;
+    }
+
+
+    //out << setw(30) << setfill(' ') << left << "ID" <<   right << setw(40) << hit->getId() << endl;
+    tmp.str("");
+    tmp << "0x" << hex << hit->getCellID0() << dec;
+    out << setw(30) << setfill(' ') << left << "CellId0" <<   right << setw(40) << tmp.str() << endl;
+    tmp.str("");
+    tmp << "0x" << hex << hit->getCellID1() << dec;
+
+    out << setw(30) << setfill(' ') << left << "CellId1" <<   right << setw(40) << tmp.str() << endl;
+    out << setw(30) << setfill(' ') << left << "Energy [GeV]" <<   right << setw(40) << dec << hit->getEnergy() << endl;
+    out << setw(30) << setfill(' ') << left << "Energy Error [GeV]" <<   right << setw(40) << hit->getEnergyError() << endl;
+    tmp.str("");
+    tmp  << hit->getPosition()[0] << ", " << hit->getPosition()[1]  << ", " << hit->getPosition()[2]; 
+    if(col != NULL){ 
+        LCFlagImpl flag(col->getFlag());
+        if(flag.bitSet(LCIO::CHBIT_LONG)){
+            out <<setw(30) << left << showpos << "Position (x,y,z) " << setfill(' ') << right <<setw(40) << tmp.str() << endl;
+        }
+        else{
+            out <<setw(30) << left << showpos << "Position (x,y,z) " << setfill(' ') << right <<setw(40) << "no position available" << endl;
+        }
+    }else{
+        out <<setw(40) << left << showpos << "Position (x,y,z) [not verified]" << setfill(' ') << right <<setw(30) << tmp.str() << endl;
+    }
+    //out << setw(30) << left << noshowpos << "ID-Field" << right << setw(40) << idDecoder(hit).valuestring() << endl;
+    out <<setw(30) << left << noshowpos << "Type " << setfill(' ') << right <<setw(40) << hit->getType() << endl;
+    out << noshowpos;
+
+    return(out);
+}
+
+std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Cluster> l) {
+    const EVENT::Cluster *clu = l.object();
+    const EVENT::LCCollection *col = l.collection();
+
+    //out << "lcio_long: Cluster : lcio_long" << std::endl;
+
+    using namespace std;
+    stringstream tmp;
+    out << noshowpos;
+    out << setw(41) << setfill('-') << right << " Cluster " << setfill('-') << setw(29) << "-" << endl;
+
+    if(col != NULL){ 
+        if(col->getTypeName() != LCIO::CLUSTER){
+            out << "Warning: collection not of type " << LCIO::CLUSTER << endl ;
+            return(out);
+
+        }
+        tmp.str(""); 
+        tmp << "0x" << hex << col->getFlag() << dec;
+        out << setw(30) << setfill(' ') << left << "Collection Flag" << right << setw(40) <<  tmp.str() << endl;
+        LCTOOLS::printParameters(col->getParameters());
+        LCFlagImpl flag( col->getFlag() ) ;
+        cout << "     LCIO::CLBIT_HITS : " << flag.bitSet( LCIO::CLBIT_HITS ) << endl ;
+
+    }
+
+
+    tmp << "0x" << hex << clu->id();
+    out << setw(30) << setfill(' ') << left << "Id" << right << setw(40) << tmp.str() << endl;
+    out << setw(30) << setfill(' ') << left << "Type"<< setfill(' ') << right << setw(40) << clu->getType() << endl;
+    out << setw(30) << left << "Energy [GeV]" << right << setw(40) << clu->getEnergy() << endl;
+    tmp.str("");
+    tmp  << dec << clu->getPosition()[0] << ", " << clu->getPosition()[1]  << ", " << clu->getPosition()[2]; 
+    out << setw(30) << left << "Position [mm] (x,y,z) " << setfill(' ') << right <<setw(40) << tmp.str() << endl;
+    out << setw(30) << left << "itheta" << setfill(' ') << right <<setw(40) << clu->getITheta() << endl;
+    out << setw(30) << left << "iphi" << setfill(' ') << right <<setw(40) << clu->getIPhi() << endl;
+    //to much output
+/* 
+    //raw code from LCTOOLS.cc
+    out << " errors (6 pos)/( 3 dir): (" ;
+      for(int l=0;l<6;l++){
+    printf("%4.2e, ", clu->getPositionError()[l] ) ;
+      }
+      out << ")/("  ;
+      for(int l=0;l<3;l++){
+    printf("%4.2e, ", clu->getDirectionError()[l] ) ;
+      }
+      out << ")" << endl ;
+      out << " clusters(e): " ;
+     const ClusterVec& clusters = clu->getClusters() ;
+
+      for(unsigned int l=0;l<clusters.size();l++){
+        printf("%4.2e, ",  clusters[l]->getEnergy() ) ;
+      }
+      out << endl ;
+      out <<" subdetector energies : " ;
+      const FloatVec& sdE = clu->getSubdetectorEnergies() ;
+      for(unsigned int l=0;l<sdE.size();l++){
+        printf("%4.2e, ",  sdE[l] ) ;
+      }
+   const CalorimeterHitVec& hits= clu->getCalorimeterHits() ;
+    const FloatVec& contr = clu->getHitContributions() ;
+    for(unsigned int k=0;k<hits.size();k++){
+      printf( " [%8.8x] (%4.3e), " , hits[k]->id(), contr[k] ) ;
+      //      out << "0x" << hits[k]  << "(" << contr[k] << "), " ;
+    }
+    out << dec << endl  ;
+*/
+
+    return(out);
+}
+
+
+std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Track> ll){
+    const EVENT::Track *part = ll.object();
+    const EVENT::LCCollection *col = ll.collection();
+
+    using namespace std;
+    stringstream tmp;
+
+    //out << scientific << setprecision (2) << showpos;
+    out << noshowpos;
+    out << setw(41) << setfill('-') << right << "-- Track ---" << setfill('-') << setw(29) << "-" << endl;
+
+    if(col != NULL){ 
+        if(col->getTypeName() != LCIO::TRACK){
+            out << "Warning: collection not of type " << LCIO::TRACK << endl ;
+            return(out);
+
+        }
+        tmp.str(""); 
+        tmp << "0x" << hex << col->getFlag() << dec;
+        out << setw(30) << setfill(' ') << left << "Collection Flag" << right << setw(40) <<  tmp.str() << endl;
+        LCTOOLS::printParameters(col->getParameters());
+        LCFlagImpl flag( col->getFlag() ) ;
+        cout << "     LCIO::TRBIT_HITS : " << flag.bitSet( LCIO::TRBIT_HITS ) << endl ;
+
+    } 
+
+    tmp << hex << setfill('0') << setw(8) << part->id();
+    out << setw(30) << setfill(' ') << left << "Id" << right << setw(40) << tmp.str() << endl;
+    out << setw(30) << setfill(' ') << left << "Type" << right << setw(40) << part->getType() << endl;
+    out << setw(30) << setfill(' ') << left << "D0" << right << showpos << setw(40) << part->getD0() << endl;
+    out << setw(30) << setfill(' ') << left << "Phi" << right << setw(40) << part->getPhi() << endl;
+    out << setw(30) << setfill(' ') << left << "Omega" << right << setw(40) << part->getOmega() << endl;
+    out << setw(30) << setfill(' ') << left << "Z0" << right << setw(40) << part->getZ0() << endl;
+    out << setw(30) << setfill(' ') << left << "Tan Lambda" << right << setw(40) << part->getTanLambda() << endl;
+
+    tmp.str("");
+    tmp  << dec << part->getReferencePoint()[0] << ", " << part->getReferencePoint()[1]  << ", " << part->getReferencePoint()[2]; 
+    out << setw(30) << setfill(' ') << left << "ReferencePoint" << right << setw(40) << tmp.str() << endl;
+    out << setw(30) << setfill(' ') << left << "dEdx" << right << setw(40) << part->getdEdx() << endl;
+    out << setw(30) << setfill(' ') << left << "dEdx Error" << right << setw(40) << part->getdEdxError() << endl;
+    out << setw(30) << setfill(' ') << left << "Chi2" << right << setw(40) << part->getChi2() << endl;
+
+    out << "Errors:     " << showpos;
+    unsigned int l;
+    for(l=0;l<14;l++){
+        out << part->getCovMatrix()[l];
+        if(! ((l+1)%5)){
+            out << endl << "            ";
+        } else{
+            out << ", ";
+        }
+    }
+    if(!((l+2)%5)){out << endl << "            ";}
+    out << part->getCovMatrix()[l+1] << endl;
+
+
+
+    out << "Tracks(id): " ;
+    const TrackVec& tracks = part->getTracks() ;
+    for(l=0;l<tracks.size();l++){
+        if( tracks[l] != 0  )
+            out << tracks[l]->id();
+        else
+            out << 0;
+
+
+        if(!(l+1)%5){
+            out << endl << "            ";
+            continue;
+        }
+        if(l != tracks.size()-1){ out << ", ";}
+
+    }
+
+    out << endl << "Hits:       " << noshowpos;
+    const TrackerHitVec& hits= part->getTrackerHits() ;
+    for(l=0;l<hits.size();l++){
+        out << "[" << hits[l]->id() << "] ";
+        if(!((l+1)%7)){out << endl << "            ";}
+    }
+    out << endl;
+
+    out << "Radius of innermost hit " << part->getRadiusOfInnermostHit() << " / mm , " << " subdetector Hit numbers : " ;
+    out << endl << "            ";
+    for(l=0 ; l< part->getSubdetectorHitNumbers().size()-1 ; l++) {
+        out << part->getSubdetectorHitNumbers()[l] << ", " ;
+        if(!((l+1)%20)){out << endl << "            ";}
+    }
+    if(!((l+2)%20)){out << endl << "            ";}
+    out << part->getSubdetectorHitNumbers()[l+1] << endl;
+
+    out << noshowpos;
+    return(out);
+}
[truncated at 1000 lines; 464 more skipped]
CVSspam 0.2.8