18 #include "GaudiKernel/StatusCode.h"
19 #include "Identifier/Identifier.h"
32 return StatusCode::SUCCESS;
40 std::chrono::duration<double> retrieving_MMG_HV_A{};
41 std::chrono::duration<double> retrieving_MMG_HV_C{};
42 std::chrono::duration<double> retrieving_MMD_HV_A{};
43 std::chrono::duration<double> retrieving_MMD_HV_C{};
44 std::chrono::duration<double> retrieving_STG_HV_A{};
45 std::chrono::duration<double> retrieving_STG_HV_C{};
57 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MMG_HV_A).
count() * 0.001) <<
"s ");
59 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MMG_HV_C).
count() * 0.001) <<
"s ");
61 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MMD_HV_A).
count() * 0.001) <<
"s ");
63 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MMD_HV_C).
count() * 0.001) <<
"s ");
65 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STG_HV_A).
count() * 0.001) <<
"s ");
67 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STG_HV_C).
count() * 0.001) <<
"s ");
70 return StatusCode::SUCCESS;
75 const std::string&
side, std::chrono::duration<double>&
timer)
const {
77 std::string sdata =
data == DcsDataType::HV ?
"HV" :
"LV";
90 return StatusCode::FAILURE;
94 if (!readHandle.range(
range)) {
95 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle.key());
96 return StatusCode::FAILURE;
103 std::vector<Identifier> channelIds = readCdo->getChannelIdsHv(tech,
side);
104 ATH_MSG_INFO(
"Found data for " << channelIds.size() <<
" channels!");
107 std::stringstream sstr{};
108 if (!channelIds.empty()) {
113 for (
const Identifier& chan_id : channelIds) {
115 bool permanentlyDisabled{
false};
116 sstr<<
m_idHelperSvc->toString(chan_id)<<
" "<<thedata<<
" "<<readCdo->isGood(ctx, chan_id)<<
" " << readCdo->isGoodTDaq(ctx,chan_id, permanentlyDisabled) <<std::endl;
122 std::ofstream ostr{
m_logName+
"_"+sdata+
"_"+stech+
"_"+
side+
".txt"};
123 ostr<<sstr.str()<<std::endl;
129 timer += end1 - start1;
131 return StatusCode::SUCCESS;
136 std::time_t time_now = std::chrono::system_clock::to_time_t(
now);
138 localtime_r(&time_now, &local_tm);
139 auto duration_since_epoch =
now.time_since_epoch();
140 auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(duration_since_epoch) % 1000;
141 std::ostringstream oss;
142 oss << std::put_time(&local_tm,
"%H:%M:%S") <<
'.' << std::setw(3) << std::setfill(
'0') << milliseconds.count();