ATLAS Offline Software
Loading...
Searching...
No Matches
VP1JobConfigInfo::Imp Class Reference
Collaboration diagram for VP1JobConfigInfo::Imp:

Static Public Member Functions

static void ensureInit ()
static bool actualInit (StoreGateSvc *detStore)
static void turnOffAll ()

Static Public Attributes

static bool initialised = false
static GeoPVConstLink geoModelWorld
static bool hasGeoModelExperiment = false
static bool hasITkGeometry = false
static bool hasPixelGeometry = false
static bool hasSCTGeometry = false
static bool hasTRTGeometry = false
static bool hasHGTDGeometry = false
static bool hasInDetServiceMaterialGeometry = false
static bool hasBeamPipeGeometry = false
static bool hasLArGeometry = false
static bool hasTileGeometry = false
static bool hasMuonGeometry = false
static bool hasMuonNSWGeometry = false
static bool hasLUCIDGeometry = false
static bool hasBCMGeometry = false
static bool hasCavernInfraGeometry = false

Detailed Description

Definition at line 29 of file VP1JobConfigInfo.cxx.

Member Function Documentation

◆ actualInit()

bool VP1JobConfigInfo::Imp::actualInit ( StoreGateSvc * detStore)
static

Definition at line 145 of file VP1JobConfigInfo.cxx.

146{
147 if (!detStore)
148 return false;
149
150 VP1SGContentsHelper sg_contents(detStore);
151 const QString geomodelkey = "ATLAS";
152 if (!sg_contents.contains<GeoModelExperiment>(geomodelkey)) {
153 if (VP1Msg::verbose())
154 VP1Msg::messageVerbose("VP1JobConfigInfo: No GeoModelExperiment in detectorStore. Concluding all subsystems are off.");
155 turnOffAll();
156 return true;
157 }
158
159 VP1SGAccessHelper sg_access(detStore);
160
161 const GeoModelExperiment * theExpt;
162 if (!sg_access.retrieve(theExpt,geomodelkey)) {
163 if (VP1Msg::verbose())
164 VP1Msg::messageVerbose("VP1JobConfigInfo: No GeoModelExperiment in detectorStore. Concluding all subsystems are off.");
165 turnOffAll();
166 return true;
167 }
168 if (VP1Msg::verbose())
169 VP1Msg::messageVerbose("VP1JobConfigInfo: Retrieved GeoModelExperiment/"+geomodelkey);
170
171 const GeoPhysVol * worldPhysVol = theExpt->getPhysVol();
172 if (!worldPhysVol) {
173 VP1Msg::message("VP1JobConfigInfo: ERROR: GeoModelExperiment has null physical volume.");
174 turnOffAll();
175 return false;
176 }
177 if (VP1Msg::verbose())
178 VP1Msg::messageVerbose("VP1JobConfigInfo: Retrieved GeoModelExperiment physical volumes");
179
181 PVConstLink world(worldPhysVol);
182
183 GeoVolumeCursor av(world);
184
185
186 while (!av.atEnd()) {
187 std::string name = av.getName();
188
189 if ( !hasITkGeometry && name=="ITkPixel") { hasITkGeometry = true; }
190 if ( !hasITkGeometry && name=="ITkStrip") { hasITkGeometry = true; }
191 if ( !hasHGTDGeometry && name=="HGTD") { hasHGTDGeometry = true; }
192 if ( !hasPixelGeometry && name=="Pixel") {
193 hasPixelGeometry = true;
194 if (not hasITkGeometry and name == "ITkPixel") {
195 VP1Msg::messageWarningAllRed("WARNING!!! --- The GeoVolume has name 'ITkPixel' but the flag 'hasITkGeometry' is false ---> CHECK IT!!");
196 }
197 if ( !hasBCMGeometry ) {
198 //Loop under the top Pixel volume to check if there are BCM volumes
199 //present in the current config:
200 GeoVolumeCursor pv(av.getVolume());
201 while (!pv.atEnd()) {
202 if (pv.getVolume()->getLogVol()->getName()=="bcmModLog") {
203 hasBCMGeometry = true;
204 break;
205 }
206 pv.next();
207 }
208 }
209 }
210 if ( !hasSCTGeometry && name=="SCT" ) {
211 hasSCTGeometry = true;
212 if (not hasITkGeometry and name == "ITkStrip") {
213 VP1Msg::messageWarningAllRed("WARNING!!! --- The GeoVolume has name 'ITkStrip' but the flag 'hasITkGeometry' is false ---> CHECK IT!!");
214 }
215 }
216 if ( !hasTRTGeometry && name=="TRT") hasTRTGeometry = true;
217 if ( !hasInDetServiceMaterialGeometry && name=="InDetServMat") hasInDetServiceMaterialGeometry = true;
218 if ( !hasBeamPipeGeometry && name=="BeamPipe") hasBeamPipeGeometry = true;
219 if ( !hasLArGeometry && name=="LArBarrel") hasLArGeometry = true;
220 if ( !hasLArGeometry && name=="LArEndcapPos") hasLArGeometry = true;
221 if ( !hasLArGeometry && name=="LArEndcapNeg") hasLArGeometry = true;
222 if ( !hasTileGeometry && name=="Tile") hasTileGeometry = true;
223 if ( !hasMuonGeometry && name=="Muon") {
224 hasMuonGeometry = true;
225 if ( !hasMuonNSWGeometry ) {
226 //Loop under the top Muon volume to check if there are NSW volumes
227 //present in the current config:
228 GeoVolumeCursor pv(av.getVolume());
229 while (!pv.atEnd()) {
230 if (pv.getVolume()->getLogVol()->getName()=="NewSmallWheel") {
231 hasMuonNSWGeometry = true;
232 break;
233 }
234 pv.next();
235 }
236 }
237 }
238 if ( !hasLUCIDGeometry && (name=="LucidSideA"||name=="LucidSideC")) hasLUCIDGeometry = true;
239 //FIXME: Look for CavernInfra as well!!!
240
241 av.next(); // increment volume cursor.
242 }
243
244 Imp::geoModelWorld = worldPhysVol;
245
246 return true;
247}
GeoPhysVol * getPhysVol()
Destructor.
static bool hasInDetServiceMaterialGeometry
static GeoPVConstLink geoModelWorld
static void messageVerbose(const QString &)
Definition VP1Msg.cxx:84
static bool verbose()
Definition VP1Msg.h:31
static void message(const QString &, IVP1System *sys=0)
Definition VP1Msg.cxx:30
static void messageWarningAllRed(const QString &str, IVP1System *sys=0)
Definition VP1Msg.cxx:70

◆ ensureInit()

void VP1JobConfigInfo::Imp::ensureInit ( )
static

Definition at line 94 of file VP1JobConfigInfo.cxx.

95{
96 if (initialised)
97 return;
98 if (VP1Msg::verbose())
99 VP1Msg::messageVerbose("VP1JobConfigInfo initialising");
100 initialised = true;
102 VP1Msg::message("VP1JobConfigInfo ERROR: Problems initialising. "
103 "Will assume all subsystems are off in this job!");
104 turnOffAll();
105 }
106 if (VP1Msg::verbose()) {
107 VP1Msg::messageVerbose("VP1JobConfigInfo => Found job configuration:");
108 VP1Msg::messageVerbose("VP1JobConfigInfo => hasGeoModelExperiment = "+QString(hasGeoModelExperiment?"On":"Off"));
109 VP1Msg::messageVerbose("VP1JobConfigInfo => hasITkGeometry = "+QString(hasITkGeometry?"On":"Off"));
110 VP1Msg::messageVerbose("VP1JobConfigInfo => hasHGTDGeometry = "+QString(hasHGTDGeometry?"On":"Off"));
111 VP1Msg::messageVerbose("VP1JobConfigInfo => hasPixelGeometry = "+QString(hasPixelGeometry?"On":"Off"));
112 VP1Msg::messageVerbose("VP1JobConfigInfo => hasSCTGeometry = "+QString(hasSCTGeometry?"On":"Off"));
113 VP1Msg::messageVerbose("VP1JobConfigInfo => hasTRTGeometry = "+QString(hasTRTGeometry?"On":"Off"));
114 VP1Msg::messageVerbose("VP1JobConfigInfo => hasInDetServiceMaterialGeometry = "+QString(hasInDetServiceMaterialGeometry?"On":"Off"));
115 VP1Msg::messageVerbose("VP1JobConfigInfo => hasBeamPipeGeometry = "+QString(hasBeamPipeGeometry?"On":"Off"));
116 VP1Msg::messageVerbose("VP1JobConfigInfo => hasLArGeometry = "+QString(hasLArGeometry?"On":"Off"));
117 VP1Msg::messageVerbose("VP1JobConfigInfo => hasTileGeometry = "+QString(hasTileGeometry?"On":"Off"));
118 VP1Msg::messageVerbose("VP1JobConfigInfo => hasMuonGeometry = "+QString(hasMuonGeometry?"On":"Off"));
119 VP1Msg::messageVerbose("VP1JobConfigInfo => hasMuonNSWGeometry = "+QString(hasMuonNSWGeometry?"On":"Off"));
120 VP1Msg::messageVerbose("VP1JobConfigInfo => hasLUCIDGeometry = "+QString(hasLUCIDGeometry?"On":"Off"));
121 VP1Msg::messageVerbose("VP1JobConfigInfo => hasBCMGeometry = "+QString(hasBCMGeometry?"On":"Off"));
122 VP1Msg::messageVerbose("VP1JobConfigInfo => hasCavernInfraGeometry = "+QString(hasCavernInfraGeometry?"On":"Off"));
123 }
124
125}
static StoreGateSvc * detectorStore()
static bool actualInit(StoreGateSvc *detStore)

◆ turnOffAll()

void VP1JobConfigInfo::Imp::turnOffAll ( )
static

Definition at line 75 of file VP1JobConfigInfo.cxx.

76{
78 hasITkGeometry = false;
79 hasHGTDGeometry = false;
80 hasPixelGeometry = false;
81 hasSCTGeometry = false;
82 hasTRTGeometry = false;
84 hasBeamPipeGeometry = false;
85 hasLArGeometry = false;
86 hasTileGeometry = false;
87 hasMuonGeometry = false;
88 hasLUCIDGeometry = false;
89 hasBCMGeometry = false;
91}

Member Data Documentation

◆ geoModelWorld

GeoPVConstLink VP1JobConfigInfo::Imp::geoModelWorld
static

Definition at line 35 of file VP1JobConfigInfo.cxx.

◆ hasBCMGeometry

bool VP1JobConfigInfo::Imp::hasBCMGeometry = false
static

Definition at line 49 of file VP1JobConfigInfo.cxx.

◆ hasBeamPipeGeometry

bool VP1JobConfigInfo::Imp::hasBeamPipeGeometry = false
static

Definition at line 43 of file VP1JobConfigInfo.cxx.

◆ hasCavernInfraGeometry

bool VP1JobConfigInfo::Imp::hasCavernInfraGeometry = false
static

Definition at line 50 of file VP1JobConfigInfo.cxx.

◆ hasGeoModelExperiment

bool VP1JobConfigInfo::Imp::hasGeoModelExperiment = false
static

Definition at line 36 of file VP1JobConfigInfo.cxx.

◆ hasHGTDGeometry

bool VP1JobConfigInfo::Imp::hasHGTDGeometry = false
static

Definition at line 41 of file VP1JobConfigInfo.cxx.

◆ hasInDetServiceMaterialGeometry

bool VP1JobConfigInfo::Imp::hasInDetServiceMaterialGeometry = false
static

Definition at line 42 of file VP1JobConfigInfo.cxx.

◆ hasITkGeometry

bool VP1JobConfigInfo::Imp::hasITkGeometry = false
static

Definition at line 37 of file VP1JobConfigInfo.cxx.

◆ hasLArGeometry

bool VP1JobConfigInfo::Imp::hasLArGeometry = false
static

Definition at line 44 of file VP1JobConfigInfo.cxx.

◆ hasLUCIDGeometry

bool VP1JobConfigInfo::Imp::hasLUCIDGeometry = false
static

Definition at line 48 of file VP1JobConfigInfo.cxx.

◆ hasMuonGeometry

bool VP1JobConfigInfo::Imp::hasMuonGeometry = false
static

Definition at line 46 of file VP1JobConfigInfo.cxx.

◆ hasMuonNSWGeometry

bool VP1JobConfigInfo::Imp::hasMuonNSWGeometry = false
static

Definition at line 47 of file VP1JobConfigInfo.cxx.

◆ hasPixelGeometry

bool VP1JobConfigInfo::Imp::hasPixelGeometry = false
static

Definition at line 38 of file VP1JobConfigInfo.cxx.

◆ hasSCTGeometry

bool VP1JobConfigInfo::Imp::hasSCTGeometry = false
static

Definition at line 39 of file VP1JobConfigInfo.cxx.

◆ hasTileGeometry

bool VP1JobConfigInfo::Imp::hasTileGeometry = false
static

Definition at line 45 of file VP1JobConfigInfo.cxx.

◆ hasTRTGeometry

bool VP1JobConfigInfo::Imp::hasTRTGeometry = false
static

Definition at line 40 of file VP1JobConfigInfo.cxx.

◆ initialised

bool VP1JobConfigInfo::Imp::initialised = false
static

Definition at line 33 of file VP1JobConfigInfo.cxx.


The documentation for this class was generated from the following file: