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 <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 284 of file SCTCalibWriteTool.cxx.
286 if (!m_writeCondObjs) {
287 return StatusCode::SUCCESS;
291 attrSpec->extend(
"Efficiency",
"float");
292 if (!attrSpec->size()) {
294 return StatusCode::FAILURE;
299 attrList0[
"Efficiency"].setValue(
static_cast<float>(
eff));
301 std::ostringstream attrStr2;
302 attrList0.toOutputStream(attrStr2);
305 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 189 of file SCTCalibWriteTool.cxx.
191 if (!m_writeCondObjs) {
192 return StatusCode::SUCCESS;
194 coral::AttributeListSpecification* attrSpec{createBasicDbSpec(
becCapsFormat)};
195 attrSpec->extend(
"DefectType",
"string");
196 attrSpec->extend(
"Threshold",
"float");
197 attrSpec->extend(
"DefectList",
"string");
199 if (!attrSpec->size()) {
201 return StatusCode::FAILURE;
205 setBasicValues(attrList0, wafer_id, samplesize,sctId,
becCapsFormat);
206 attrList0[
"DefectType"].setValue(
static_cast<std::string
>(defectType));
207 attrList0[
"Threshold"].setValue(
static_cast<float>(
threshold));
208 attrList0[
"DefectList"].setValue(
static_cast<std::string
>(defectList));
209 std::ostringstream attrStr2;
210 attrList0.toOutputStream(attrStr2);
212 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 364 of file SCTCalibWriteTool.cxx.
366 if (!m_writeCondObjs) {
367 return StatusCode::SUCCESS;
371 attrSpec->extend(
"BSErrors",
"string");
372 attrSpec->extend(
"BadFraction",
"string");
374 if (!attrSpec->size()) {
376 return StatusCode::FAILURE;
381 attrList0[
"BSErrors"].setValue(
static_cast<std::string
>(errorList));
382 attrList0[
"BadFraction"].setValue(
static_cast<std::string
>(probList));
384 std::ostringstream attrStr2;
385 attrList0.toOutputStream(attrStr2);
387 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 393 of file SCTCalibWriteTool.cxx.
395 if (!m_writeCondObjs)
return StatusCode::SUCCESS;
396 int barrel_ec{sctId->
barrel_ec(wafer_id)};
400 coral::AttributeListSpecification* attrSpec{
new coral::AttributeListSpecification{}};
401 attrSpec->extend(
"SampleSize",
"int");
402 attrSpec->extend(
"barrel_endcap",
"int");
403 attrSpec->extend(
"Layer",
"int");
404 attrSpec->extend(
"Side",
"int");
405 attrSpec->extend(
"moduleType",
"int");
406 attrSpec->extend(
"lorentzAngle",
"float");
407 attrSpec->extend(
"err_lorentzAngle",
"float");
408 attrSpec->extend(
"chisq",
"float");
409 attrSpec->extend(
"fitParam_a",
"float");
410 attrSpec->extend(
"err_a",
"float");
411 attrSpec->extend(
"fitParam_b",
"float");
412 attrSpec->extend(
"err_b",
"float");
413 attrSpec->extend(
"fitParam_sigma",
"float");
414 attrSpec->extend(
"err_sigma",
"float");
415 attrSpec->extend(
"minClusterWidth",
"float");
416 attrSpec->extend(
"err_minClusterWidth",
"float");
418 if (!attrSpec->size()) {
420 return StatusCode::FAILURE;
425 attrList0[
"SampleSize"].setValue(
static_cast<int>(samplesize));
426 attrList0[
"barrel_endcap"].setValue(
static_cast<int>(barrel_ec));
427 attrList0[
"Layer"].setValue(
static_cast<int>(
layer));
428 attrList0[
"Side"].setValue(
static_cast<int>(
side));
429 attrList0[
"moduleType"].setValue(
static_cast<int>(
module));
430 attrList0[
"lorentzAngle"].setValue(
static_cast<float>(lorentz));
431 attrList0[
"err_lorentzAngle"].setValue(
static_cast<float>(err_lorentz));
432 attrList0[
"chisq"].setValue(
static_cast<float>(chisq));
433 attrList0[
"fitParam_a"].setValue(
static_cast<float>(fitParam_a));
434 attrList0[
"err_a"].setValue(
static_cast<float>(err_a));
435 attrList0[
"fitParam_b"].setValue(
static_cast<float>(fitParam_b));
436 attrList0[
"err_b"].setValue(
static_cast<float>(err_b));
437 attrList0[
"fitParam_sigma"].setValue(
static_cast<float>(fitParam_sigma));
438 attrList0[
"err_sigma"].setValue(
static_cast<float>(err_sigma));
439 attrList0[
"minClusterWidth"].setValue(
static_cast<float>(MCW));
440 attrList0[
"err_minClusterWidth"].setValue(
static_cast<float>(err_MCW));
442 std::ostringstream attrStr2;
443 attrList0.toOutputStream(attrStr2);
446 return StatusCode::SUCCESS;
◆ becCapsFormat
const bool becCapsFormat {true} |
◆ becUnderscoreFormat
const bool becUnderscoreFormat {false} |