Implementation file for uploading to DB on CAF.
More...
#include "SCT_CalibAlgs/SCTCalibWriteTool.h"
#include "RegistrationServices/IIOVRegistrationSvc.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 <fstream>
#include <iostream>
#include <istream>
#include <iterator>
#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 294 of file SCTCalibWriteTool.cxx.
296 if (!m_writeCondObjs) {
297 return StatusCode::SUCCESS;
301 attrSpec->extend(
"Efficiency",
"float");
302 if (!attrSpec->size()) {
304 return StatusCode::FAILURE;
309 attrList0[
"Efficiency"].setValue(
static_cast<float>(
eff));
311 std::ostringstream attrStr2;
312 attrList0.toOutputStream(attrStr2);
315 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 199 of file SCTCalibWriteTool.cxx.
201 if (!m_writeCondObjs) {
202 return StatusCode::SUCCESS;
204 coral::AttributeListSpecification* attrSpec{createBasicDbSpec(
becCapsFormat)};
205 attrSpec->extend(
"DefectType",
"string");
206 attrSpec->extend(
"Threshold",
"float");
207 attrSpec->extend(
"DefectList",
"string");
209 if (!attrSpec->size()) {
211 return StatusCode::FAILURE;
215 setBasicValues(attrList0, wafer_id, samplesize,sctId,
becCapsFormat);
216 attrList0[
"DefectType"].setValue(
static_cast<std::string
>(defectType));
217 attrList0[
"Threshold"].setValue(
static_cast<float>(
threshold));
218 attrList0[
"DefectList"].setValue(
static_cast<std::string
>(defectList));
219 std::ostringstream attrStr2;
220 attrList0.toOutputStream(attrStr2);
222 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 374 of file SCTCalibWriteTool.cxx.
376 if (!m_writeCondObjs) {
377 return StatusCode::SUCCESS;
381 attrSpec->extend(
"BSErrors",
"string");
382 attrSpec->extend(
"BadFraction",
"string");
384 if (!attrSpec->size()) {
386 return StatusCode::FAILURE;
391 attrList0[
"BSErrors"].setValue(
static_cast<std::string
>(errorList));
392 attrList0[
"BadFraction"].setValue(
static_cast<std::string
>(probList));
394 std::ostringstream attrStr2;
395 attrList0.toOutputStream(attrStr2);
397 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 403 of file SCTCalibWriteTool.cxx.
405 if (!m_writeCondObjs)
return StatusCode::SUCCESS;
406 int barrel_ec{sctId->
barrel_ec(wafer_id)};
410 coral::AttributeListSpecification* attrSpec{
new coral::AttributeListSpecification{}};
411 attrSpec->extend(
"SampleSize",
"int");
412 attrSpec->extend(
"barrel_endcap",
"int");
413 attrSpec->extend(
"Layer",
"int");
414 attrSpec->extend(
"Side",
"int");
415 attrSpec->extend(
"moduleType",
"int");
416 attrSpec->extend(
"lorentzAngle",
"float");
417 attrSpec->extend(
"err_lorentzAngle",
"float");
418 attrSpec->extend(
"chisq",
"float");
419 attrSpec->extend(
"fitParam_a",
"float");
420 attrSpec->extend(
"err_a",
"float");
421 attrSpec->extend(
"fitParam_b",
"float");
422 attrSpec->extend(
"err_b",
"float");
423 attrSpec->extend(
"fitParam_sigma",
"float");
424 attrSpec->extend(
"err_sigma",
"float");
425 attrSpec->extend(
"minClusterWidth",
"float");
426 attrSpec->extend(
"err_minClusterWidth",
"float");
428 if (!attrSpec->size()) {
430 return StatusCode::FAILURE;
435 attrList0[
"SampleSize"].setValue(
static_cast<int>(samplesize));
436 attrList0[
"barrel_endcap"].setValue(
static_cast<int>(barrel_ec));
437 attrList0[
"Layer"].setValue(
static_cast<int>(
layer));
438 attrList0[
"Side"].setValue(
static_cast<int>(
side));
439 attrList0[
"moduleType"].setValue(
static_cast<int>(
module));
440 attrList0[
"lorentzAngle"].setValue(
static_cast<float>(lorentz));
441 attrList0[
"err_lorentzAngle"].setValue(
static_cast<float>(err_lorentz));
442 attrList0[
"chisq"].setValue(
static_cast<float>(chisq));
443 attrList0[
"fitParam_a"].setValue(
static_cast<float>(fitParam_a));
444 attrList0[
"err_a"].setValue(
static_cast<float>(err_a));
445 attrList0[
"fitParam_b"].setValue(
static_cast<float>(fitParam_b));
446 attrList0[
"err_b"].setValue(
static_cast<float>(err_b));
447 attrList0[
"fitParam_sigma"].setValue(
static_cast<float>(fitParam_sigma));
448 attrList0[
"err_sigma"].setValue(
static_cast<float>(err_sigma));
449 attrList0[
"minClusterWidth"].setValue(
static_cast<float>(MCW));
450 attrList0[
"err_minClusterWidth"].setValue(
static_cast<float>(err_MCW));
452 std::ostringstream attrStr2;
453 attrList0.toOutputStream(attrStr2);
456 return StatusCode::SUCCESS;
◆ becCapsFormat
const bool becCapsFormat {true} |
◆ becUnderscoreFormat
const bool becUnderscoreFormat {false} |