10 #include <boost/date_time/posix_time/posix_time.hpp>
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;
135 const boost::posix_time::ptime
now = boost::posix_time::microsec_clock::local_time();
136 const boost::posix_time::time_duration td =
now.time_of_day();
137 const long hours = td.hours();
138 const long minutes = td.minutes();
139 const long seconds = td.seconds();
140 const long milliseconds = td.total_milliseconds() - ((
hours * 3600 + minutes * 60 +
seconds) * 1000);
142 sprintf(buf,
"%02ld:%02ld:%02ld.%03ld",
hours, minutes,
seconds, milliseconds);