ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_DetectorTool.cxx File Reference

Go to the source code of this file.

Functions

StatusCode TRT_DetectorTool::registerCallback ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options.
StatusCode TRT_DetectorTool::align ATLAS_NOT_THREAD_SAFE (IOVSVC_CALLBACK_ARGS_P(I, keys))

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

StatusCode TRT_DetectorTool::registerCallback ATLAS_NOT_THREAD_SAFE ( void )
inline

Install fatal handler with default options.

This is meant to be easy to call from python via ctypes.

Install fatal handler with default options.

getLorentzAngle() Read LorentzAngle from HIST and write out into local DB

getBSErrors() Read BSErrors from Monitoring HIST and write out into local DB

getEfficiency() Read Efficiency from Monitoring HIST and write out into local DB

getRawOccupancy() Read RawOccupancy from Monitoring HIST and write out into local DB

getNoiseOccupancy() Read NoiseOccupancy from HIST and write out into local DB

getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats

Definition at line 164 of file TRT_DetectorTool.cxx.

165{
166 // This callback is kept because the folder never changes.
167
168 MsgStream log(msgSvc(), name());
169
170 // If we fail to register any callbacks we return FAILURE. This just tells GeoModelSvc that
171 // no callbacks were registered. It will continue normally but without any alignments.
172 StatusCode sc = StatusCode::FAILURE;
173
174 if (m_alignable) {
175
176
177 if (m_useDynamicAlignFolders){ // Regular alignment new schema
178 std::string folderName = "/TRT/AlignL1/TRT";
179 if (detStore()->contains<CondAttrListCollection>(folderName)) {
180 msg(MSG::DEBUG) << "Registering callback on global Container with folder " << folderName << endmsg;
182 StatusCode trttmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), calc, folderName);
183 // We don't expect this to fail as we have already checked that the detstore contains the object.
184 if (trttmp.isFailure()) {
185 msg(MSG::ERROR) << "Problem when register callback on global Container with folder " << folderName <<endmsg;
186 } else {
187 sc = StatusCode::SUCCESS;
188 }
189 } else {
190 msg(MSG::WARNING) << "Unable to register callback on global Container with folder " << folderName <<endmsg;
191 return StatusCode::FAILURE;
192 }
193
194 folderName = "/TRT/AlignL2";
196 if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endmsg;
198 StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
199 if(sctmp.isFailure()) {
200 msg(MSG::ERROR) << "Problem when register callback on AlignableTransformContainer with folder " << folderName <<endmsg;
201 } else {
202 sc = StatusCode::SUCCESS;
203 }
204 }
205 else {
206 msg(MSG::WARNING) << "Unable to register callback on AlignableTransformContainer with folder "
207 << folderName << endmsg;
208 return StatusCode::FAILURE;
209 }
210 }
211 else { // Regular alignment old schema
212 std::string folderName = "/TRT/Align";
214 msg(MSG::DEBUG) << "Registering callback on AlignableTransformContainer with folder " << folderName << endmsg;
216 StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), atc, folderName);
217 // We don't expect this to fail as we have already checked that the detstore contains the object.
218 if (sctmp.isFailure()) {
219 msg(MSG::ERROR) << "Problem when register callback on AlignableTransformContainer with folder " << folderName <<endmsg;
220 } else {
221 sc = StatusCode::SUCCESS;
222 }
223 } else {
224 msg(MSG::WARNING) << "Unable to register callback on AlignableTransformContainer with folder "
225 << folderName << ", Alignments disabled! (Only if no Run2 schema is loaded)" << endmsg;
226 }
227 }
228
229
230 // Fine alignment
231 {
232 std::string folderName = "/TRT/Calib/DX";
234 msg(MSG::DEBUG) << "Registering callback on StrawDxContainer with folder " << folderName << endmsg;
236 StatusCode sctmp = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool*>(this), sdc, folderName);
237 // We don't expect this to fail as we have already checked that the detstore contains the object.
238 if (sctmp.isFailure()) {
239 msg(MSG::ERROR) << "Problem when register callback on StrawDxContainer with folder " << folderName <<endmsg;
240 } else {
241 sc = StatusCode::SUCCESS;
242 }
243 } else {
244 msg(MSG::DEBUG) << "Unable to register callback on StrawDxContainer with folder " << folderName <<endmsg;
245 }
246 }
247
248 } else {
249 msg(MSG::INFO) << "Alignment disabled. No callback registered" << endmsg;
250 // We return failure otherwise it will try and register
251 // a GeoModelSvc callback associated with this callback.
252 }
253
254 return sc;
255}
#define endmsg
static Double_t sc
an iterator over instances of a given type in StoreGateSvc.
Definition DataHandle.h:43
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36
MsgStream & msg
Definition testRead.cxx:32

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

StatusCode TRT_DetectorTool::align ATLAS_NOT_THREAD_SAFE ( IOVSVC_CALLBACK_ARGS_P(I, keys) )

Definition at line 269 of file TRT_DetectorTool.cxx.

271{
272 MsgStream log(msgSvc(), name());
273 if (!m_manager) {
274 msg(MSG::WARNING) << "Manager does not exist" << endmsg;
275 return StatusCode::FAILURE;
276 }
277 if (m_alignable) {
278 return const_cast<InDetDD::TRT_DetectorManager*>(m_manager)->align(I,keys);
279 } else {
280 msg(MSG::DEBUG) << "Alignment disabled. No alignments applied" << endmsg;
281 return StatusCode::SUCCESS;
282 }
283}
#define I(x, y, z)
Definition MD5.cxx:116
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...