CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DetectorDescription/Algorithm/src/AlgoInit.cc

Go to the documentation of this file.
00001 #include "DetectorDescription/Algorithm/src/AlgoInit.h"
00002 #include "DetectorDescription/Core/interface/DDAlgo.h"
00003 #include "DetectorDescription/ExprAlgo/interface/AlgoPos.h"
00004 
00005 // include all from XML generated algorithms
00006 
00007 #include "DetectorDescription/Algorithm/src/global_linear.h"
00008 #include "DetectorDescription/Algorithm/src/global_angular.h"
00009 #include "DetectorDescription/Algorithm/src/global_simpleAngular.h"
00010 
00011 // add a line for each generated algorithm to register the
00012 // algorithm with DDCore
00013 void AlgoInit()
00014 {
00015   static bool isInit = false;
00016   if (isInit) return;
00017   isInit = true;
00018   
00019   // placeholder pointer
00020   AlgoPos * algo = 0;
00021   
00022   // generated:
00023   //   for each <Algorithm> in each ADL-instance the code generator has to provide code
00024   //   similar to that below ...
00025    
00026   //   create the representation of the algorithm  
00027 
00028 
00029   algo = new AlgoPos(new global_linear_Check);
00030 
00031   //   create the implementations of the algorithm & register them with the representation
00032 
00033   new global_linear_0(algo,"base in the input parameters");
00034   new global_linear_1(algo,"without base in input parameters");
00035 
00036   //   register the representation at DDCore
00037   DDalgo(DDName("linear", "global"), algo);
00038 
00039   algo = new AlgoPos(new global_angular_Check);
00040 
00041   //   create the implementations of the algorithm & register them with the representation
00042   
00043   new global_angular_0(algo,"divrange");
00044 
00045   //   register the representation at DDCore
00046   DDalgo(DDName("angular", "global"), algo);
00047 
00048   algo = new AlgoPos(new global_simpleAngular_Check);
00049 
00050   //   create the implementations of the algorithm & register them with the representation
00051 
00052   new global_simpleAngular_0(algo,"number no delta");
00053   new global_simpleAngular_1(algo,"delta no number");
00054   new global_simpleAngular_2(algo,"delta AND number");
00055 
00056   //   register the representation at DDCore
00057 
00058   DDalgo(DDName("simpleAngular", "global"), algo);
00059 }
00060 
00061