|
ATLAS Offline Software
|
#include <CalibT0DbOperations.h>
|
| CalibT0DbOperations (CalibDbConnection &db_conn) |
|
virtual | ~CalibT0DbOperations ()=default |
|
MdtStationT0Container * | LoadT0Calibration (const NtupleStationId &id, int head_id, std::string &site_name) |
|
MdtTubeFitContainer * | LoadT0Validation (const NtupleStationId &id, int head_id, std::string &site_name) |
|
bool | WriteT0Chamber (const NtupleStationId &id, const MdtTubeFitContainer *t0, std::vector< int > &validation_flag, int head_id, const std::string &site_name) |
|
bool | ReadForConditions (const std::string &site_name, int head_id, IConditionsStorage &storage) |
|
bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More...
|
|
MsgStream & | msg () const |
| The standard message stream. More...
|
|
MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More...
|
|
void | setLevel (MSG::Level lvl) |
| Change the current logging level. More...
|
|
|
void | initRowBuffer (std::vector< coral::AttributeList > &rowBuffer, const NtupleStationId &id, const int head_id, const std::string &site_name, const MdtTubeFitContainer *t0) |
|
void | fillRowBuffer (std::vector< coral::AttributeList > &rowBuffer, const MdtTubeFitContainer *t0, const int ml1, const int ly, const int ml2, const MuonFixedId &fixId) |
|
bool | setValidFlag (const std::string &site_name, const int head_id, const int tube_id, const int new_validflag, coral::ITableDataEditor &editor) |
|
bool | insertTubes (const std::string &site_name, int head_id, const NtupleStationId &id, const MdtTubeFitContainer *t0, const std::vector< int > &validation_flag, coral::ITableDataEditor *editor[]) |
|
bool | setValidationFlag (const std::string &site_name, int head_id, const NtupleStationId &id, int from, int to, coral::ITableDataEditor &editor) |
|
bool | checkTubesPresent (const int head_id, const std::string &site_name, const NtupleStationId &id, const std::vector< int > &validflag) |
|
void | initMessaging () const |
| Initialize our message level and MessageSvc. More...
|
|
Definition at line 29 of file CalibT0DbOperations.h.
◆ CalibT0DbOperations()
◆ ~CalibT0DbOperations()
virtual MuonCalib::CalibT0DbOperations::~CalibT0DbOperations |
( |
| ) |
|
|
virtualdefault |
◆ checkTubesPresent()
Definition at line 560 of file CalibT0DbOperations.cxx.
565 m_query->addToTableList(
"MDT_TUBE");
567 conditionData.extend<
int>(
"hid");
568 conditionData[0].data<
int>() =
head_id;
570 std::ostringstream ostr;
571 ostr <<
id.FixedId();
572 conditionData.extend<std::string>(
"chamb");
573 conditionData[1].data<std::string>() = ostr.str();
574 std::string
condition =
"MDT_TUBE.HEAD_ID = :hid and MDT_TUBE.CHAMBER = :chamb";
576 m_query->addToOutputList(
"count(MDT_TUBE.TUBE_ID)",
"N_TUBES");
577 m_query->addToOutputList(
"MDT_TUBE.VALIDFLAG",
"VALIDFLAG");
578 m_query->groupBy(
"MDT_TUBE.VALIDFLAG");
580 bool has_unvalidated(
false), has_validated(
false);
583 if (al[
"VALIDFLAG"].data<short>() > 0) {
584 if (al[
"N_TUBES"].data<double>() > 0) { has_validated =
true; }
586 if (al[
"N_TUBES"].data<double>() > 0) { has_unvalidated =
true; }
590 if (validflag.size() == 0)
return !has_unvalidated;
591 for (
int it : validflag) {
592 if (
it > 0 && has_validated)
return false;
593 if (
it == 0 && has_unvalidated)
return false;
◆ fillRowBuffer()
Definition at line 417 of file CalibT0DbOperations.cxx.
420 const Identifier channelID = idHelper.channelID(fixId.stationName(),
425 for (
unsigned int i = 0;
i < 3;
i++) { rowBuffer[
i][
"TUBE_ID"].data<
int>() = fixId.getIdInt(); }
426 rowBuffer[1][
"ENTRIES"].data<
int>() =
t0->getFit(channelID)->statistics;
427 rowBuffer[1][
"CHISQUARE_1"].data<
float>() =
t0->getFit(channelID)->chi2Tdc;
428 rowBuffer[1][
"CHISQUARE_2"].data<
float>() =
t0->getFit(channelID)->chi2TdcEnd;
429 rowBuffer[1][
"TUBE_GROUPING"].data<std::string>() =
t0->getFit(channelID)->group_by;
430 for (
int i = 0;
i < 8;
i++) {
431 double val =
t0->getFit(channelID)->par[
i];
432 if (std::isnan(
val))
val = -99999.;
433 std::ostringstream ostr2;
436 rowBuffer[0][ostr2.str()].data<
float>() =
val;
438 rowBuffer[1][ostr2.str()].data<
float>() =
val;
440 val =
t0->getFit(channelID)->cov[
i];
441 if (std::isnan(
val))
val = -99999.;
443 rowBuffer[1][ostr2.str()].data<
float>() =
val;
445 rowBuffer[2][ostr2.str()].data<
float>() =
val;
447 for (
int i = 0;
i < 4;
i++) {
448 std::ostringstream ostr2;
449 ostr2 <<
"ADC_" <<
i;
450 rowBuffer[0][ostr2.str()].data<
float>() =
t0->getFit(channelID)->adc_par[
i];
452 rowBuffer[2][ostr2.str()].data<
float>() =
t0->getFit(channelID)->adc_err[
i];
454 rowBuffer[2][
"ADC_CHISQUARE"].data<
float>() =
t0->getFit(channelID)->adc_chi2;
455 rowBuffer[0][
"NHITS"].data<
int>() =
t0->getFit(channelID)->n_hits;
456 if (
t0->getFit(channelID)->n_hits > 999999) rowBuffer[0][
"NHITS"].data<int>() = 999999;
457 rowBuffer[0][
"NHITS_ABOVE_ADC_CUT"].data<
int>() =
t0->getFit(channelID)->n_hits_above_adc_cut;
458 if (
t0->getFit(channelID)->n_hits_above_adc_cut > 999999) rowBuffer[0][
"NHITS_ABOVE_ADC_CUT"].data<int>() = 999999;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ initRowBuffer()
!!!!!ADC_0 should be moved to MDT_TUBE
Definition at line 367 of file CalibT0DbOperations.cxx.
369 for (
unsigned int i = 0;
i < 3;
i++) {
370 rowBuffer[
i].extend<
int>(
"TUBE_ID");
371 rowBuffer[
i].extend<
int>(
"HEAD_ID");
372 rowBuffer[
i][
"HEAD_ID"].data<
int>() =
head_id;
373 rowBuffer[
i].extend<
int>(
"CALIBFLAG");
375 rowBuffer[0].extend<
int>(
"CHAMBER");
376 rowBuffer[0][
"CHAMBER"].data<
int>() =
id.FixedId();
377 rowBuffer[0].extend<
int>(
"VALIDFLAG");
378 rowBuffer[1].extend<
int>(
"ENTRIES");
379 rowBuffer[1].extend<
float>(
"CHISQUARE_1");
380 rowBuffer[1].extend<
float>(
"CHISQUARE_2");
381 for (
int i = 0;
i < 8;
i++) {
382 std::ostringstream ostr2;
385 rowBuffer[0].extend<
float>(ostr2.str());
387 rowBuffer[1].extend<
float>(ostr2.str());
390 rowBuffer[1].extend<
float>(ostr2.str());
392 rowBuffer[2].extend<
float>(ostr2.str());
394 for (
int i = 0;
i < 4;
i++) {
395 std::ostringstream ostr2;
396 ostr2 <<
"ADC_" <<
i;
398 rowBuffer[0].extend<
float>(ostr2.str());
400 rowBuffer[2].extend<
float>(ostr2.str());
402 rowBuffer[2].extend<
float>(
"ADC_CHISQUARE");
403 rowBuffer[0].extend<
int>(
"NHITS");
404 rowBuffer[0].extend<
int>(
"NHITS_ABOVE_ADC_CUT");
405 rowBuffer[1].extend<std::string>(
"ALGO_FLAG");
406 if (
t0->implementation() ==
"T0CalibrationClassic") {
407 rowBuffer[1][
"ALGO_FLAG"].data<std::string>() =
"T0Classic";
408 }
else if (
t0->implementation() ==
"T0CalibrationMT") {
409 rowBuffer[1][
"ALGO_FLAG"].data<std::string>() =
"T0MT";
411 rowBuffer[1][
"ALGO_FLAG"].data<std::string>() =
"Unknown";
413 rowBuffer[1].extend<std::string>(
"TUBE_GROUPING");
414 rowBuffer[1][
"TUBE_GROUPING"].data<std::string>() =
"UNKNOWN";
◆ insertTubes()
Definition at line 478 of file CalibT0DbOperations.cxx.
481 std::vector<coral::AttributeList> rowBuffer(3);
482 std::vector<coral::IBulkOperation *> bulk_inserter(3);
483 bool row_buffer_initialized(
false);
484 unsigned int nml =
t0->numMultilayers();
485 unsigned int nly =
t0->numLayers();
486 unsigned int ntb =
t0->numTubes();
490 const Identifier elementID = idHelper.elementID(
id.GetStation(),
id.GetEta(),
id.GetPhi());
491 for (
unsigned int ml = 1; ml <= nml; ml++) {
492 for (
unsigned int ly = 1; ly <= nly; ly++) {
493 for (
unsigned int tb = 1;
tb <= ntb;
tb++) {
494 const Identifier channelID = idHelper.channelID(elementID, ml, ly,
tb);
495 if (
t0->getFit(channelID)->statistics > 0) {
506 MuonFixedId fixId(0);
507 fixId.setTechnology(0);
508 fixId.setStationName(
id.GetStation());
509 fixId.setStationEta(
id.GetEta());
510 fixId.setStationPhi(
id.GetPhi());
511 for (
unsigned int ml = 1; ml <= nml; ml++) {
512 for (
unsigned int ly = 1; ly <= nly; ly++) {
513 for (
unsigned int tb = 1;
tb <= ntb;
tb++) {
514 int tb_index = (
tb -1) + ntb * (ly -1) + ntb * nly * (ml -1);
515 fixId.setMdtTube(
tb);
516 fixId.setMdtTubeLayer(ly);
517 fixId.setMdtMultilayer(ml);
519 if (
static_cast<int>(validation_flag.size()) > tb_index) { v_flag = validation_flag[tb_index]; }
520 if (!row_buffer_initialized) {
522 for (
int i = 0;
i < 3;
i++) { bulk_inserter[
i] = editor[
i]->bulkInsert(rowBuffer[
i], 432); }
523 row_buffer_initialized =
true;
526 rowBuffer[0][
"VALIDFLAG"].data<
int>() = v_flag;
527 for (
unsigned int i = 0;
i < 3;
i++) {
528 rowBuffer[
i][
"CALIBFLAG"].data<
int>() =
static_cast<int>(v_flag > 3);
529 bulk_inserter[
i]->processNextIteration();
534 for (
unsigned int i = 0;
i < 3;
i++) {
535 bulk_inserter[
i]->flush();
536 delete bulk_inserter[
i];
◆ LoadT0Calibration()
Definition at line 39 of file CalibT0DbOperations.cxx.
46 m_query->addToTableList(
"MDT_TUBE");
48 conditionData.extend<
int>(
"hid");
49 conditionData[0].data<
int>() =
head_id;
51 conditionData.extend<
int>(
"chamb");
52 conditionData[1].data<
int>() =
id.FixedId();
53 std::string
condition =
"MDT_TUBE.HEAD_ID = :hid and MDT_TUBE.CHAMBER = :chamb and MDT_TUBE.VALIDFLAG>1";
55 m_query->addToOutputList(
"MDT_TUBE.TUBE_ID",
"TUBE_ID");
56 m_query->addToOutputList(
"MDT_TUBE.P4",
"T0");
57 m_query->addToOutputList(
"MDT_TUBE.ADC_1",
"ADC_1");
63 MuonFixedId fid(al[0].data<int>());
64 ret->Sett0(fid.mdtMultilayer(), fid.mdtTubeLayer(), fid.mdtTube(), al[1].data<
float>(), al[2].data<
float>());
74 catch (coral::SchemaException &
e) {
◆ LoadT0Validation()
Definition at line 80 of file CalibT0DbOperations.cxx.
86 m_query->addToTableList(
"MDT_TUBE");
87 m_query->addToTableList(
"MDT_TUBE_V");
89 conditionData.extend<
int>(
"hid");
90 conditionData[0].data<
int>() =
head_id;
92 std::ostringstream ostr;
94 conditionData.extend<std::string>(
"chamb");
95 conditionData[1].data<std::string>() = ostr.str();
97 "MDT_TUBE.HEAD_ID = :hid and MDT_TUBE.CHAMBER = :chamb and MDT_TUBE.VALIDFLAG=0 and MDT_TUBE_V.HEAD_ID=:hid and "
98 "MDT_TUBE_V.TUBE_ID = MDT_TUBE.TUBE_ID and MDT_TUBE_V.CALIBFLAG=MDT_TUBE.CALIBFLAG";
100 m_query->addToOutputList(
"MDT_TUBE.TUBE_ID",
"TUBE_ID");
101 m_query->addToOutputList(
"MDT_TUBE.P4",
"T0");
102 m_query->addToOutputList(
"MDT_TUBE_V.ENTRIES",
"ENTRIES");
103 m_query->addToOutputList(
"MDT_TUBE_V.CHISQUARE_1",
"CHISQUARE_1");
104 m_query->addToOutputList(
"MDT_TUBE_V.CHISQUARE_2",
"CHISQUARE_2");
105 for (
int i = 0;
i < 7;
i++) {
106 std::ostringstream ostr;
108 ostr <<
"MDT_TUBE.P4";
110 ostr <<
"MDT_TUBE_V.P" <<
i;
112 std::ostringstream ostr2;
114 m_query->addToOutputList(ostr.str(), ostr2.str());
115 if (
i > 3 &&
i < 7) {
117 m_query->addToOutputList(
"MDT_TUBE_V.P4_ERR",
"P4_ERR");
121 m_query->addToOutputList(ostr.str(), ostr2.str());
125 m_query->addToOutputList(
"MDT_TUBE.NHITS",
"NHITS");
126 m_query->addToOutputList(
"MDT_TUBE.NHITS_ABOVE_ADC_CUT",
"NHITS_ABOVE_ADC_CUT");
127 m_query->addToOutputList(
"MDT_TUBE_V.ALGO_FLAG",
"ALGO_FLAG");
128 m_query->addToOutputList(
"MDT_TUBE_V.TUBE_GROUPING",
"TUBE_GROUPING");
130 int n_tubes(0), n_layers(0), n_ml(0);
131 std::map<MuonFixedId, MdtTubeFitContainer::SingleTubeFit> fits;
132 std::map<MuonFixedId, MdtTubeFitContainer::SingleTubeCalib> calibs;
133 std::string alg_flg, tb_grp;
137 MuonFixedId fid(al[
"TUBE_ID"].data<int>());
139 calib.t0 = al[
"P4"].data<
float>();
142 fit.statistics = al[
"ENTRIES"].data<
int>();
143 fit.n_hits = al[
"NHITS"].data<
int>();
144 fit.n_hits_above_adc_cut = al[
"NHITS_ABOVE_ADC_CUT"].data<
int>();
146 fit.chi2TdcEnd = 0.0;
147 for (
int i = 0;
i < 7;
i++) {
148 std::ostringstream ostr2;
150 fit.par[
i] = al[ostr2.str()].data<
float>();
151 if (
i > 3 &&
i < 7) {
153 fit.cov[
i] = al[ostr2.str()].data<
float>();
159 if (n_layers < fid.mdtTubeLayer()) n_layers = fid.mdtTubeLayer();
160 if (n_ml < fid.mdtMultilayer()) n_ml = fid.mdtMultilayer();
162 alg_flg = al[
"ALGO_FLAG"].data<std::string>();
163 tb_grp = al[
"TUBE_GROUPING"].data<std::string>();
169 const Identifier moduleID = idHelper.elementID(
id.GetStation(),
id.GetEta(),
id.GetPhi());
170 MdtTubeFitContainer *ret =
new MdtTubeFitContainer(
m_idHelperSvc.get(), moduleID);
171 for (
auto& [tubeId, tubeFit] : fits) {
172 const Identifier thisId = idHelper.channelID(moduleID,
173 tubeId.mdtMultilayer(),
174 tubeId.mdtTubeLayer(),
176 ret->setFit(std::move(tubeFit), thisId,
msg());
177 ret->setCalib(std::move(calibs[tubeId]), thisId,
msg());
179 ret->setGroupBy(tb_grp);
180 ret->setImplementation(alg_flg);
183 catch (coral::SchemaException &
e) {
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ ReadForConditions()
bool MuonCalib::CalibT0DbOperations::ReadForConditions |
( |
const std::string & |
site_name, |
|
|
int |
head_id, |
|
|
IConditionsStorage & |
storage |
|
) |
| |
Definition at line 301 of file CalibT0DbOperations.cxx.
306 m_query->addToTableList(
"MDT_TUBE");
307 m_query->addToOutputList(
"MDT_TUBE.CHAMBER",
"CHAMBER");
308 m_query->addToOutputList(
"MDT_TUBE.TUBE_ID",
"TUBE_ID");
309 m_query->setRowCacheSize(10000);
310 const std::vector<std::string> &rows_tube_table(storage.RowsFromMdtTubeTable());
311 for (
const auto &
it : rows_tube_table) {
312 if (
it ==
"CHAMBER" ||
it ==
"TUBE_ID")
continue;
313 m_query->addToOutputList(std::string(
"MDT_TUBE.") +
it,
it);
315 const std::vector<std::string> &rows_tube_v_table(storage.RowsFromMdtTubeVTable());
316 if (rows_tube_v_table.size() != 0) {
317 m_query->addToTableList(
"MDT_TUBE_V");
318 for (
const auto &
it : rows_tube_v_table) {
319 m_query->addToOutputList(std::string(
"MDT_TUBE_V.") +
it,
it);
322 const std::vector<std::string> &rows_tube_c_table(storage.RowsFromMdtTubeCTable());
323 if (rows_tube_c_table.size() != 0) {
324 m_query->addToTableList(
"MDT_TUBE_C");
325 for (
const auto &
it : rows_tube_c_table) {
326 m_query->addToOutputList(std::string(
"MDT_TUBE_C.") +
it,
it);
330 conditionData.extend<
int>(
"HEAD_ID");
331 conditionData[
"HEAD_ID"].data<
int>() =
head_id;
332 std::string
condition =
"MDT_TUBE.HEAD_ID = :HEAD_ID and MDT_TUBE.VALIDFLAG>1 ";
333 if (rows_tube_v_table.size() != 0)
335 " and MDT_TUBE.HEAD_ID = MDT_TUBE_V.HEAD_ID and MDT_TUBE.TUBE_ID=MDT_TUBE_V.TUBE_ID and "
336 "MDT_TUBE.CALIBFLAG=MDT_TUBE_V.CALIBFLAG";
337 if (rows_tube_c_table.size() != 0)
339 " and MDT_TUBE.HEAD_ID = MDT_TUBE_C.HEAD_ID and MDT_TUBE.TUBE_ID=MDT_TUBE_C.TUBE_ID and "
340 "MDT_TUBE.CALIBFLAG=MDT_TUBE_C.CALIBFLAG";
342 m_query->addToOrderList(
"MDT_TUBE.CHAMBER");
344 int old_chamber_id(-1);
345 std::map<IConditionsStorage::TubeId, coral::AttributeList> rows_of_a_chamber;
350 if (old_chamber_id != al[
"CHAMBER"].data<int>() && rows_of_a_chamber.size() != 0) {
351 if (!storage.StoreT0Chamber(old_chamber_id, rows_of_a_chamber)) {
return false; }
352 rows_of_a_chamber.clear();
355 IConditionsStorage::TubeId
id(al[
"TUBE_ID"].data<int>());
356 rows_of_a_chamber[
id] = al;
357 old_chamber_id = al[
"CHAMBER"].data<
int>();
359 if (!storage.StoreT0Chamber(old_chamber_id, rows_of_a_chamber)) {
return false; }
361 }
catch (coral::SchemaException &
e) {
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setValidationFlag()
bool MuonCalib::CalibT0DbOperations::setValidationFlag |
( |
const std::string & |
site_name, |
|
|
int |
head_id, |
|
|
const NtupleStationId & |
id, |
|
|
int |
from, |
|
|
int |
to, |
|
|
coral::ITableDataEditor & |
editor |
|
) |
| |
|
private |
Definition at line 541 of file CalibT0DbOperations.cxx.
543 std::string updateAction =
"validflag = :newval";
544 std::string updateCondition =
"head_id=:hid and chamber=:cham and validflag=:old_val";
546 updateData.extend<
int>(
"hid");
547 updateData[0].data<
int>() =
head_id;
548 updateData.extend<std::string>(
"cham");
549 std::ostringstream ostr;
550 ostr <<
id.FixedId();
551 updateData[1].data<std::string>() = ostr.str();
552 updateData.extend<
int>(
"newval");
553 updateData[2].data<
int>() =
to;
554 updateData.extend<
int>(
"old_val");
555 updateData[3].data<
int>() = from;
556 long rowsUpdated = editor.updateRows(updateAction, updateCondition, updateData);
557 return (rowsUpdated <= 432);
◆ setValidFlag()
bool MuonCalib::CalibT0DbOperations::setValidFlag |
( |
const std::string & |
site_name, |
|
|
const int |
head_id, |
|
|
const int |
tube_id, |
|
|
const int |
new_validflag, |
|
|
coral::ITableDataEditor & |
editor |
|
) |
| |
|
private |
Definition at line 461 of file CalibT0DbOperations.cxx.
463 std::string updateAction =
"validflag = :newval";
464 std::string updateCondition =
"head_id=:hid and tube_id=:tid and validflag=0";
466 updateData.extend<
int>(
"hid");
467 updateData[0].data<
int>() =
head_id;
468 updateData.extend<
int>(
"tid");
469 updateData[1].data<
int>() =
tube_id;
472 updateData.extend<
int>(
"newval");
473 updateData[2].data<
int>() = new_validflag;
474 long rowsUpdated = editor.updateRows(updateAction, updateCondition, updateData);
◆ WriteT0Chamber()
Definition at line 189 of file CalibT0DbOperations.cxx.
194 ATH_MSG_WARNING(
"Trying to insert data for chamber " <<
id.regionId() <<
" header " <<
head_id << site_name
195 <<
" which already exists!" );
203 if (validation_flag.size() == 0) {
212 bool all_new(
true), all_good(
true);
213 for (
int it : validation_flag) {
214 if (
it != 0) all_new =
false;
215 if (
it != 3) all_good =
false;
216 if (!all_new && !all_good)
break;
237 std::vector<coral::AttributeList> rowBuffer(3);
238 bool row_buffer_initialized(
false);
239 unsigned int nml =
t0->numMultilayers();
240 unsigned int nly =
t0->numLayers();
241 unsigned int ntb =
t0->numTubes();
242 MuonFixedId fixId(0);
243 fixId.setTechnology(0);
244 fixId.setStationName(
id.GetStation());
245 fixId.setStationEta(
id.GetEta());
246 fixId.setStationPhi(
id.GetPhi());
247 for (
unsigned int ml = 1; ml <= nml; ml++) {
248 for (
unsigned int ly = 1; ly <= nly; ly++) {
249 for (
unsigned int tb = 1;
tb <= ntb;
tb++) {
250 int tb_index = (
tb -1) + ntb * (ly -1) + ntb * nly * (ml -1);
251 if (validation_flag[tb_index] == 3)
continue;
252 fixId.setMdtTube(
tb);
253 fixId.setMdtTubeLayer(ly);
254 fixId.setMdtMultilayer(ml);
257 if (validation_flag[tb_index] == 5)
262 if (rowsUpdated != 1) {
264 <<
": " << rowsUpdated <<
" Rows to be updated! This is wrong! Check database!" );
268 if (validation_flag[tb_index] != 5) {
270 if (!row_buffer_initialized) {
272 row_buffer_initialized =
true;
276 rowBuffer[0][
"VALIDFLAG"].data<
int>() = validation_flag[tb_index];
278 for (
unsigned int i = 0;
i < 3;
i++) {
279 rowBuffer[
i][
"CALIBFLAG"].data<
int>() =
static_cast<int>(validation_flag[tb_index] > 3);
280 editor[
i]->insertRow(rowBuffer[
i]);
294 catch (coral::SchemaException &
e) {
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_db_conn
◆ m_idHelperSvc
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_query
coral::IQuery* MuonCalib::CalibT0DbOperations::m_query {nullptr} |
|
private |
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MdtTubeFitContainer::SingleTubeFit SingleTubeFit
std::vector< ALFA_RawData_p1 > t0
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
bool insertTubes(const std::string &site_name, int head_id, const NtupleStationId &id, const MdtTubeFitContainer *t0, const std::vector< int > &validation_flag, coral::ITableDataEditor *editor[])
IMessageSvc * getMessageSvc(bool quiet=false)
CalibDbConnection & m_db_conn
coral::IQuery * GetQuery()
bool checkTubesPresent(const int head_id, const std::string &site_name, const NtupleStationId &id, const std::vector< int > &validflag)
Class to provide easy MsgStream access and capabilities.
bool setValidFlag(const std::string &site_name, const int head_id, const int tube_id, const int new_validflag, coral::ITableDataEditor &editor)
MsgStream & msg() const
The standard message stream.
void initRowBuffer(std::vector< coral::AttributeList > &rowBuffer, const NtupleStationId &id, const int head_id, const std::string &site_name, const MdtTubeFitContainer *t0)
#define ATH_MSG_WARNING(x)
std::string m_nm
Message source name.
bool setValidationFlag(const std::string &site_name, int head_id, const NtupleStationId &id, int from, int to, coral::ITableDataEditor &editor)
void initMessaging() const
Initialize our message level and MessageSvc.
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void fillRowBuffer(std::vector< coral::AttributeList > &rowBuffer, const MdtTubeFitContainer *t0, const int ml1, const int ly, const int ml2, const MuonFixedId &fixId)
coral::ITableDataEditor & GetTableEditor(const std::string &table_name)