ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/src/OpenGLDisplayer.cc
(Generate patch)

Comparing UserCode/FastOpenGlDisplayer/src/OpenGLDisplayer.cc (file contents):
Revision 1.2 by querten, Sat Mar 15 17:02:20 2008 UTC vs.
Revision 1.3 by querten, Mon Mar 17 06:26:31 2008 UTC

# Line 64 | Line 64
64  
65  
66   #include "Visualisation/OpenGLDisplayer/interface/SimEvent.h"
67 < //#include "Visualisation/OpenGLDisplayer/interface/SimEvent.cpp"
68 <
69 <
67 > #include "Visualisation/OpenGLDisplayer/interface/Geometry.h"
68  
69   using namespace edm;
70   using namespace std;
# Line 82 | Line 80 | class OpenGLDisplayer : public edm::EDAn
80  
81  
82     private:
83 <      virtual void beginJob(const edm::EventSetup&) ;
84 <      virtual void analyze(const edm::Event&, const edm::EventSetup&);
85 <      virtual void endJob() ;
83 >      virtual void beginJob(const edm::EventSetup& iSetup);
84 >      virtual void analyze (const edm::Event&, const edm::EventSetup&);
85 >      virtual void endJob  ();
86  
87  
88        MySimEvents* MyEvents;
89 +      Geometry*    Geom;
90  
91  
92        std::vector<std::string> SimHitSubdetectors;
# Line 115 | Line 114 | OpenGLDisplayer::~OpenGLDisplayer()
114  
115   // ------------ method called once each job just before starting event loop  ------------
116   void
117 < OpenGLDisplayer::beginJob(const edm::EventSetup&)
117 > OpenGLDisplayer::beginJob(const edm::EventSetup& iSetup)
118   {
119  
121
120     MyEvents = new MySimEvents();
121 +   Geom     = new Geometry();
122 +
123 +   edm::ESHandle<TrackerGeometry> tkGeom;
124 +   iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom );
125 +   vector<GeomDet*> Det = tkGeom->dets();
126 +
127 +   for(unsigned int i=0;i<Det.size();i++){
128 +      DetId  Detid  = Det[i]->geographicalId();
129 +      int    SubDet = Detid.subdetId();
130 +  
131 +      StripGeomDetUnit* DetUnit     = dynamic_cast<StripGeomDetUnit*> (Det[i]);
132 +      if(!DetUnit)continue;
133 +
134 +      GlobalVector Pos =  GlobalVector(DetUnit->position().basicVector());
135 +
136 +      Geom->Add_TrackerDet(SubDet,Pos.x(),Pos.y(),Pos.z(),Detid.rawId());
137 +   }
138 +   Geom->Save("Tracker.geom");    
139 +
140  
141   }
142  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines