Implementation file for uploading to DB on CAF.
More...
#include "SCT_CalibAlgs/SCTCalibWriteTool.h"
#include "AthenaKernel/IAthenaOutputStreamTool.h"
#include "CoralBase/Attribute.h"
#include "Identifier/IdentifierHash.h"
#include "Identifier/Identifier.h"
#include "InDetIdentifier/SCT_ID.h"
#include "PathResolver/PathResolver.h"
#include "GaudiKernel/StatusCode.h"
#include "GaudiKernel/IToolSvc.h"
#include <sstream>
Go to the source code of this file.
|
StatusCode SCTCalibWriteTool::createCondObjects | ATLAS_NOT_THREAD_SAFE (const Identifier &wafer_id, const SCT_ID *sctId, const int samplesize, const std::string &defectType, const float threshold, const std::string &defectList) const |
|
StatusCode SCTCalibWriteTool::createListEff | ATLAS_NOT_THREAD_SAFE (const Identifier &wafer_id, const SCT_ID *sctId, const int samplesize, const float eff) const |
|
StatusCode SCTCalibWriteTool::createListBSErr | ATLAS_NOT_THREAD_SAFE (const Identifier &wafer_id, const SCT_ID *sctId, const int samplesize, const std::string &errorList, const std::string &probList) const |
|
StatusCode SCTCalibWriteTool::createListLA | ATLAS_NOT_THREAD_SAFE (const Identifier &wafer_id, const SCT_ID *sctId, const int samplesize, int module, const float lorentz, const float err_lorentz, const float chisq, const float fitParam_a, const float err_a, const float fitParam_b, const float err_b, const float fitParam_sigma, const float err_sigma, const float MCW, const float err_MCW) const |
|
Implementation file for uploading to DB on CAF.
- Author
- Jose E. Garcia
Definition in file SCTCalibWriteTool.cxx.
◆ ATLAS_NOT_THREAD_SAFE() [1/4]
Definition at line 245 of file SCTCalibWriteTool.cxx.
247 if (!m_writeCondObjs) {
248 return StatusCode::SUCCESS;
252 attrSpec->extend(
"Efficiency",
"float");
253 if (!attrSpec->size()) {
255 return StatusCode::FAILURE;
260 attrList0[
"Efficiency"].setValue(
static_cast<float>(
eff));
262 std::ostringstream attrStr2;
263 attrList0.toOutputStream(attrStr2);
266 return StatusCode::SUCCESS;
◆ ATLAS_NOT_THREAD_SAFE() [2/4]
StatusCode SCTCalibWriteTool::createListChip ATLAS_NOT_THREAD_SAFE |
( |
const Identifier & |
wafer_id, |
|
|
const SCT_ID * |
sctId, |
|
|
const int |
samplesize, |
|
|
const std::string & |
defectType, |
|
|
const float |
threshold, |
|
|
const std::string & |
defectList |
|
) |
| const |
Definition at line 150 of file SCTCalibWriteTool.cxx.
152 if (!m_writeCondObjs) {
153 return StatusCode::SUCCESS;
155 coral::AttributeListSpecification* attrSpec{createBasicDbSpec(
becCapsFormat)};
156 attrSpec->extend(
"DefectType",
"string");
157 attrSpec->extend(
"Threshold",
"float");
158 attrSpec->extend(
"DefectList",
"string");
160 if (!attrSpec->size()) {
162 return StatusCode::FAILURE;
166 setBasicValues(attrList0, wafer_id, samplesize,sctId,
becCapsFormat);
167 attrList0[
"DefectType"].setValue(
static_cast<std::string
>(defectType));
168 attrList0[
"Threshold"].setValue(
static_cast<float>(
threshold));
169 attrList0[
"DefectList"].setValue(
static_cast<std::string
>(defectList));
170 std::ostringstream attrStr2;
171 attrList0.toOutputStream(attrStr2);
173 return StatusCode::SUCCESS;
◆ ATLAS_NOT_THREAD_SAFE() [3/4]
StatusCode SCTCalibWriteTool::createListBSErr ATLAS_NOT_THREAD_SAFE |
( |
const Identifier & |
wafer_id, |
|
|
const SCT_ID * |
sctId, |
|
|
const int |
samplesize, |
|
|
const std::string & |
errorList, |
|
|
const std::string & |
probList |
|
) |
| const |
Definition at line 325 of file SCTCalibWriteTool.cxx.
327 if (!m_writeCondObjs) {
328 return StatusCode::SUCCESS;
332 attrSpec->extend(
"BSErrors",
"string");
333 attrSpec->extend(
"BadFraction",
"string");
335 if (!attrSpec->size()) {
337 return StatusCode::FAILURE;
342 attrList0[
"BSErrors"].setValue(
static_cast<std::string
>(errorList));
343 attrList0[
"BadFraction"].setValue(
static_cast<std::string
>(probList));
345 std::ostringstream attrStr2;
346 attrList0.toOutputStream(attrStr2);
348 return StatusCode::SUCCESS;
◆ ATLAS_NOT_THREAD_SAFE() [4/4]
StatusCode SCTCalibWriteTool::createListLA ATLAS_NOT_THREAD_SAFE |
( |
const Identifier & |
wafer_id, |
|
|
const SCT_ID * |
sctId, |
|
|
const int |
samplesize, |
|
|
int |
module, |
|
|
const float |
lorentz, |
|
|
const float |
err_lorentz, |
|
|
const float |
chisq, |
|
|
const float |
fitParam_a, |
|
|
const float |
err_a, |
|
|
const float |
fitParam_b, |
|
|
const float |
err_b, |
|
|
const float |
fitParam_sigma, |
|
|
const float |
err_sigma, |
|
|
const float |
MCW, |
|
|
const float |
err_MCW |
|
) |
| const |
Definition at line 354 of file SCTCalibWriteTool.cxx.
356 if (!m_writeCondObjs)
return StatusCode::SUCCESS;
357 int barrel_ec{sctId->
barrel_ec(wafer_id)};
361 coral::AttributeListSpecification* attrSpec{
new coral::AttributeListSpecification{}};
362 attrSpec->extend(
"SampleSize",
"int");
363 attrSpec->extend(
"barrel_endcap",
"int");
364 attrSpec->extend(
"Layer",
"int");
365 attrSpec->extend(
"Side",
"int");
366 attrSpec->extend(
"moduleType",
"int");
367 attrSpec->extend(
"lorentzAngle",
"float");
368 attrSpec->extend(
"err_lorentzAngle",
"float");
369 attrSpec->extend(
"chisq",
"float");
370 attrSpec->extend(
"fitParam_a",
"float");
371 attrSpec->extend(
"err_a",
"float");
372 attrSpec->extend(
"fitParam_b",
"float");
373 attrSpec->extend(
"err_b",
"float");
374 attrSpec->extend(
"fitParam_sigma",
"float");
375 attrSpec->extend(
"err_sigma",
"float");
376 attrSpec->extend(
"minClusterWidth",
"float");
377 attrSpec->extend(
"err_minClusterWidth",
"float");
379 if (!attrSpec->size()) {
381 return StatusCode::FAILURE;
386 attrList0[
"SampleSize"].setValue(
static_cast<int>(samplesize));
387 attrList0[
"barrel_endcap"].setValue(
static_cast<int>(barrel_ec));
388 attrList0[
"Layer"].setValue(
static_cast<int>(
layer));
389 attrList0[
"Side"].setValue(
static_cast<int>(
side));
390 attrList0[
"moduleType"].setValue(
static_cast<int>(
module));
391 attrList0[
"lorentzAngle"].setValue(
static_cast<float>(lorentz));
392 attrList0[
"err_lorentzAngle"].setValue(
static_cast<float>(err_lorentz));
393 attrList0[
"chisq"].setValue(
static_cast<float>(chisq));
394 attrList0[
"fitParam_a"].setValue(
static_cast<float>(fitParam_a));
395 attrList0[
"err_a"].setValue(
static_cast<float>(err_a));
396 attrList0[
"fitParam_b"].setValue(
static_cast<float>(fitParam_b));
397 attrList0[
"err_b"].setValue(
static_cast<float>(err_b));
398 attrList0[
"fitParam_sigma"].setValue(
static_cast<float>(fitParam_sigma));
399 attrList0[
"err_sigma"].setValue(
static_cast<float>(err_sigma));
400 attrList0[
"minClusterWidth"].setValue(
static_cast<float>(MCW));
401 attrList0[
"err_minClusterWidth"].setValue(
static_cast<float>(err_MCW));
403 std::ostringstream attrStr2;
404 attrList0.toOutputStream(attrStr2);
407 return StatusCode::SUCCESS;
◆ becCapsFormat
const bool becCapsFormat {true} |
◆ becUnderscoreFormat
const bool becUnderscoreFormat {false} |