5 #include "TGeoManager.h"
9 #include "gearxml/GearXML.h"
11 #include "gearimpl/Util.h"
12 #include "gearimpl/ConstantBField.h"
13 #include "gearimpl/GearMgrImpl.h"
15 #include "geartgeo/TGeoGearPointProperties.h"
16 #include "geartgeo/TGeoGearDistanceProperties.h"
21 using namespace DD4hep ;
22 using namespace DD4hep::Geometry;
23 using namespace dd4hep ;
27 int main(
int argc,
char** argv ){
30 std::cout <<
" usage: convertToGear plugin compact.xml [gear_file.xml]" << std::endl
31 <<
" plugin: name of a plugin with a signature \"long int (LCDD*, int, char**)\" \n "
32 <<
" e.g. GearForILD (same as 'default'), GearForCLIC, ..." << std::endl ;
37 std::string pluginName = argv[1] ;
39 std::string inFile = argv[2] ;
41 std::string outFile = ( argc>3 ? argv[3] :
"" ) ;
43 LCDD& lcdd = LCDD::getInstance();
58 if( outFile.empty() ){
60 outFile =
"gear_" + gearMgr->getDetectorName() +
".xml" ;
63 gear::GearXML::createXMLFile ( gearMgr, outFile ) ;
66 std::cout <<
" ************************************************************** " << std::endl ;
67 std::cout <<
" created gear file : " << outFile << std::endl ;
68 std::cout <<
" ************************************************************** " << std::endl ;
int main(int argc, char **argv)
virtual void fromCompact(const std::string &fname, LCDDBuildType type=BUILD_DEFAULT)=0
Deprecated call (use fromXML): Read compact geometry description or alignment file.
The main interface to the DD4hep detector description package.
gear::GearMgr * createGearMgr(Geometry::LCDD &lcdd, const std::string &pluginName)