46 std::chrono::duration<double> retrieving_MM_TDO_A{};
47 std::chrono::duration<double> retrieving_MM_TDO_C{};
48 std::chrono::duration<double> retrieving_MM_PDO_A{};
49 std::chrono::duration<double> retrieving_MM_PDO_C{};
50 std::chrono::duration<double> retrieving_MM_VMM_A{};
51 std::chrono::duration<double> retrieving_MM_VMM_C{};
52 std::chrono::duration<double> retrieving_STGC_TDO_A{};
53 std::chrono::duration<double> retrieving_STGC_TDO_C{};
54 std::chrono::duration<double> retrieving_STGC_PDO_A{};
55 std::chrono::duration<double> retrieving_STGC_PDO_C{};
56 std::chrono::duration<double> retrieving_STGC_VMM_A{};
57 std::chrono::duration<double> retrieving_STGC_VMM_C{};
58 std::chrono::duration<double> retrieving_T0{};
77 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_TDO_A).
count() * 1.0) <<
"s ");
79 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_TDO_C).
count() * 1.0) <<
"s ");
81 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_PDO_A).
count() * 1.0) <<
"s ");
83 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_PDO_C).
count() * 1.0) <<
"s ");
86 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_VMM_A).
count() * 1.0) <<
"s ");
88 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_MM_VMM_C).
count() * 1.0) <<
"s ");
91 ATH_MSG_INFO(
"Retrieving time for (STGC, TDO, Side A) = "
92 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_TDO_A).
count() * 1.0) <<
"s ");
93 ATH_MSG_INFO(
"Retrieving time for (STGC, TDO, Side C) = "
94 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_TDO_C).
count() * 1.0) <<
"s ");
95 ATH_MSG_INFO(
"Retrieving time for (STGC, PDO, Side A) = "
96 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_PDO_A).
count() * 1.0) <<
"s ");
97 ATH_MSG_INFO(
"Retrieving time for (STGC, PDO, Side C) = "
98 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_PDO_C).
count() * 1.0) <<
"s ");
100 ATH_MSG_INFO(
"Retrieving time for (STGC, VMM, Side A) = "
101 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_VMM_A).
count() * 1.0) <<
"s ");
102 ATH_MSG_INFO(
"Retrieving time for (STGC, VMM, Side C) = "
103 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_STGC_VMM_C).
count() * 1.0) <<
"s ");
108 << (std::chrono::duration_cast<std::chrono::microseconds>(retrieving_T0).
count() * 1.0) <<
"s ");
112 return StatusCode::SUCCESS;
117 const std::string& side, std::chrono::duration<double>& timer)
const {
119 auto start1 = std::chrono::high_resolution_clock::now();
129 return StatusCode::FAILURE;
133 if (!readHandle.
range(range)) {
134 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle.
key());
135 return StatusCode::FAILURE;
139 rangeW = EventIDRange::intersect(range, rangeW);
143 ATH_MSG_INFO(
"Found data for " << channelIds.size() <<
" channels!");
146 std::stringstream sstr{};
147 if (!channelIds.empty()) {
151 ATH_MSG_INFO(
"Checking channel 0 (Id = " << channel.get_compact() <<
") "<<calib_data);
153 for (
const Identifier& chan_id : channelIds) {
155 sstr<<
m_idHelperSvc->toString(chan_id)<<
" "<<calib_data<<std::endl;
160 sstr<<
"Dummy calib channel "<<calib_data<<std::endl;
164 std::ofstream ostr{
m_logName+
"_"+ (
data == TimeChargeType::TDO ?
"TDO" :
"PDO") +
"_"+tech+side+
".txt"};
165 ostr<<sstr.str()<<std::endl;
170 auto end1 = std::chrono::high_resolution_clock::now();
171 timer += end1 - start1;
173 return StatusCode::SUCCESS;
178 std::chrono::duration<double>& timer)
const {
180 auto start1 = std::chrono::high_resolution_clock::now();
190 return StatusCode::FAILURE;
194 if (!readHandle.
range(range)) {
195 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle.
key());
196 return StatusCode::FAILURE;
200 rangeW = EventIDRange::intersect(range, rangeW);
203 std::vector<Identifier> channelIds = readCdo->
getChannelIds(tech, side);
204 ATH_MSG_INFO(
"Found data for " << channelIds.size() <<
" channels!");
207 std::stringstream sstr {};
208 if (!channelIds.empty()) {
220 std::ofstream ostr{
m_logName+
"_THRESH_"+tech+side+
".txt"};
221 ostr<<sstr.str()<<std::endl;
224 auto end1 = std::chrono::high_resolution_clock::now();
225 timer += end1 - start1;
227 return StatusCode::SUCCESS;
232 std::chrono::duration<double>& timer)
const {
234 auto start1 = std::chrono::high_resolution_clock::now();
244 return StatusCode::FAILURE;
248 if (!readHandle.
range(range)) {
249 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle.
key());
250 return StatusCode::FAILURE;
254 rangeW = EventIDRange::intersect(range, rangeW);
256 std::stringstream sstr {};
260 for(
int i_layer=id_helper.
gasGapMin(*it); i_layer <= id_helper.
gasGapMax(*it); i_layer++){
262 for(
int i_channel=id_helper.
channelMin(layerId); i_channel < id_helper.
channelMax(layerId); i_channel++){
265 if(!readCdo->
getT0(channelId, t0)){
267 return StatusCode::FAILURE;
270 sstr<<
m_idHelperSvc->toString(channelId)<<
" T0 "<< t0 <<std::endl;
278 ostr<<sstr.str()<<std::endl;
281 auto end1 = std::chrono::high_resolution_clock::now();
282 timer += end1 - start1;
284 return StatusCode::SUCCESS;
288 auto now = std::chrono::system_clock::now();
289 std::time_t time_now = std::chrono::system_clock::to_time_t(now);
291 localtime_r(&time_now, &local_tm);
292 auto duration_since_epoch = now.time_since_epoch();
293 auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(duration_since_epoch) % 1000;
294 std::ostringstream oss;
295 oss << std::put_time(&local_tm,
"%H:%M:%S") <<
'.' << std::setw(3) << std::setfill(
'0') << milliseconds.count();