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10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /visualization/modeling/src/G4TrajectoryModelFactories.cc (Version 11.3.0) and /visualization/modeling/src/G4TrajectoryModelFactories.cc (Version 6.0)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 //                                                
 27 // Jane Tinslay, John Allison, Joseph Perl Oct    
 28                                                   
 29 #include "G4ModelCompoundCommandsT.hh"            
 30 #include "G4ModelCommandsT.hh"                    
 31 #include "G4ModelCommandUtils.hh"                 
 32 #include "G4TrajectoryDrawByAttribute.hh"         
 33 #include "G4TrajectoryDrawByCharge.hh"            
 34 #include "G4TrajectoryDrawByOriginVolume.hh"      
 35 #include "G4TrajectoryDrawByParticleID.hh"        
 36 #include "G4TrajectoryDrawByEncounteredVolume.    
 37 #include "G4TrajectoryGenericDrawer.hh"           
 38 #include "G4TrajectoryModelFactories.hh"          
 39 #include "G4VisTrajContext.hh"                    
 40                                                   
 41 // Draw by attribute                              
 42 G4TrajectoryDrawByAttributeFactory::G4Trajecto    
 43   :G4VModelFactory<G4VTrajectoryModel>("drawBy    
 44 {}                                                
 45                                                   
 46 G4TrajectoryDrawByAttributeFactory::~G4Traject    
 47                                                   
 48 ModelAndMessengers                                
 49 G4TrajectoryDrawByAttributeFactory::Create(con    
 50 {                                                 
 51   Messengers messengers;                          
 52                                                   
 53   // Create default context and model             
 54   G4VisTrajContext* context = new G4VisTrajCon    
 55                                                   
 56   G4TrajectoryDrawByAttribute* model = new G4T    
 57                                                   
 58   // Create messengers for default context con    
 59   G4ModelCommandUtils::AddContextMsgrs(context    
 60                                                   
 61   messengers.push_back(new G4ModelCmdVerbose<G    
 62   messengers.push_back(new G4ModelCmdSetString    
 63   messengers.push_back(new G4ModelCmdAddInterv    
 64   messengers.push_back(new G4ModelCmdAddValueC    
 65                                                   
 66   return ModelAndMessengers(model, messengers)    
 67 }                                                 
 68                                                   
 69 G4TrajectoryGenericDrawerFactory::G4Trajectory    
 70   :G4VModelFactory<G4VTrajectoryModel>("generi    
 71 {}                                                
 72                                                   
 73 G4TrajectoryGenericDrawerFactory::~G4Trajector    
 74                                                   
 75 ModelAndMessengers                                
 76 G4TrajectoryGenericDrawerFactory::Create(const    
 77 {                                                 
 78   Messengers messengers;                          
 79                                                   
 80   // Create default context and model             
 81   G4VisTrajContext* context = new G4VisTrajCon    
 82   G4TrajectoryGenericDrawer* model = new G4Tra    
 83                                                   
 84   // Create messengers for default context con    
 85   G4ModelCommandUtils::AddContextMsgrs(context    
 86                                                   
 87   // Verbose command                              
 88   messengers.push_back(new G4ModelCmdVerbose<G    
 89                                                   
 90   return ModelAndMessengers(model, messengers)    
 91 }                                                 
 92                                                   
 93 // drawByCharge                                   
 94 G4TrajectoryDrawByChargeFactory::G4TrajectoryD    
 95   :G4VModelFactory<G4VTrajectoryModel>("drawBy    
 96 {}                                                
 97                                                   
 98 G4TrajectoryDrawByChargeFactory::~G4Trajectory    
 99                                                   
100 ModelAndMessengers                                
101 G4TrajectoryDrawByChargeFactory::Create(const     
102 {                                                 
103   Messengers messengers;                          
104                                                   
105   // Create default context and model             
106   G4VisTrajContext* context = new G4VisTrajCon    
107   G4TrajectoryDrawByCharge* model = new G4Traj    
108                                                   
109   // Create messengers for default context con    
110   G4ModelCommandUtils::AddContextMsgrs(context    
111                                                   
112   // Create messengers for drawer                 
113   messengers.push_back(new G4ModelCmdSetString    
114   messengers.push_back(new G4ModelCmdVerbose<G    
115                                                   
116   return ModelAndMessengers(model, messengers)    
117 }                                                 
118                                                   
119 //Draw by particle ID                             
120 G4TrajectoryDrawByParticleIDFactory::G4Traject    
121   :G4VModelFactory<G4VTrajectoryModel>("drawBy    
122 {}                                                
123                                                   
124 G4TrajectoryDrawByParticleIDFactory::~G4Trajec    
125                                                   
126 ModelAndMessengers                                
127 G4TrajectoryDrawByParticleIDFactory::Create(co    
128 {                                                 
129   Messengers messengers;                          
130                                                   
131   // Create default context and model             
132   G4VisTrajContext* context = new G4VisTrajCon    
133   G4TrajectoryDrawByParticleID* model = new G4    
134                                                   
135   // Create messengers for default context con    
136   G4ModelCommandUtils::AddContextMsgrs(context    
137                                                   
138   // Create messengers for drawer                 
139   messengers.push_back(new G4ModelCmdSetString    
140   messengers.push_back(new G4ModelCmdSetDefaul    
141   messengers.push_back(new G4ModelCmdVerbose<G    
142                                                   
143   return ModelAndMessengers(model, messengers)    
144 }                                                 
145                                                   
146 //Draw by origin volume                           
147 G4TrajectoryDrawByOriginVolumeFactory::G4Traje    
148 :G4VModelFactory<G4VTrajectoryModel>("drawByOr    
149 {}                                                
150                                                   
151 G4TrajectoryDrawByOriginVolumeFactory::~G4Traj    
152                                                   
153 ModelAndMessengers                                
154 G4TrajectoryDrawByOriginVolumeFactory::Create(    
155 {                                                 
156   Messengers messengers;                          
157                                                   
158   // Create default context and model             
159   G4VisTrajContext* context = new G4VisTrajCon    
160   G4TrajectoryDrawByOriginVolume* model = new     
161                                                   
162   // Create messengers for default context con    
163   G4ModelCommandUtils::AddContextMsgrs(context    
164                                                   
165   // Create messengers for drawer                 
166   messengers.push_back(new G4ModelCmdSetString    
167   messengers.push_back(new G4ModelCmdSetDefaul    
168   messengers.push_back(new G4ModelCmdVerbose<G    
169                                                   
170   return ModelAndMessengers(model, messengers)    
171 }                                                 
172                                                   
173 //Draw by encountered volume                      
174 G4TrajectoryDrawByEncounteredVolumeFactory::G4    
175 :G4VModelFactory<G4VTrajectoryModel>("drawByEn    
176 {}                                                
177                                                   
178 G4TrajectoryDrawByEncounteredVolumeFactory::~G    
179                                                   
180 ModelAndMessengers                                
181 G4TrajectoryDrawByEncounteredVolumeFactory::Cr    
182 {                                                 
183   Messengers messengers;                          
184                                                   
185   // Create default context and model             
186   G4VisTrajContext* context = new G4VisTrajCon    
187   G4TrajectoryDrawByEncounteredVolume* model =    
188                                                   
189   // Create messengers for default context con    
190   G4ModelCommandUtils::AddContextMsgrs(context    
191                                                   
192   // Create messengers for drawer                 
193   messengers.push_back(new G4ModelCmdSetString    
194   messengers.push_back(new G4ModelCmdSetDefaul    
195   messengers.push_back(new G4ModelCmdVerbose<G    
196                                                   
197   return ModelAndMessengers(model, messengers)    
198 }                                                 
199