CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/DetectorDescription/Core/src/DDAlgo.cc File Reference

#include "DetectorDescription/Core/interface/DDAlgo.h"
#include "DetectorDescription/ExprAlgo/interface/AlgoPos.h"
#include <cstdio>

Go to the source code of this file.

Functions

DDAlgo DDalgo (const DDName &n, AlgoPos *a)
std::ostream & operator<< (std::ostream &os, const DDAlgo &algo)

Function Documentation

DDAlgo DDalgo ( const DDName n,
AlgoPos a 
)

create a DDCore compatible algorithm

Definition at line 117 of file DDAlgo.cc.

Referenced by AlgoInit().

{
  return DDAlgo(n,a);
}
std::ostream& operator<< ( std::ostream &  os,
const DDAlgo algo 
)

Definition at line 7 of file DDAlgo.cc.

References DDBase< N, C >::isDefined(), and DDBase< N, C >::rep().

{
 DDBase<DDName,AlgoPos*>::def_type defined(algo.isDefined());
  if (defined.first) {
    os << *(defined.first) << " ";
    if (defined.second) {
      algo.rep().stream(os); 
    }
    else {
      os << "* algorithm not defined * ";  
    }
  }  
  else {
    os << "* algorithm not declared * ";  
  }  
  return os;
  
}