Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// $Id:$
//====================================================================
// AIDA Detector description implementation for LCD
//--------------------------------------------------------------------
//
// Standard plugins necessary for nearly everything.
//
// Author : M.Frank
//
//====================================================================
// Framework include files
#include "DD4hep/Factories.h"
#include "DD4hep/LCDD.h"
// ROOT includes
#include "TGeoManager.h"
#include "TGeoVolume.h"
using namespace std;
using namespace DD4hep::Geometry;
static long display(LCDD& /* lcdd */,int argc,char** argv) {
TGeoManager* mgr = gGeoManager;
const char* opt = "ogl";
if ( argc > 0 ) {
opt = argv[0];
}
if ( mgr ) {
mgr->SetVisLevel(4);
mgr->SetVisOption(1);
TGeoVolume* vol = mgr->GetTopVolume();
if ( vol ) {
vol->Draw(opt);
return 1;
}
}
return 0;
}
DECLARE_APPLY(DD4hepGeometryDisplay,display);
static long load_compact(LCDD& lcdd,int argc,char** argv) {
for(size_t j=0; j<argc; ++j) {
string input = argv[j];
cout << "Processing compact input file : " << input << endl;
lcdd.fromCompact(input);
}
return 1;
}
DECLARE_APPLY(DD4hepCompactLoader,load_compact);