17 static const std::string m_total_entries_key =
"total_entries";
18 static const std::string m_layer_id_key =
"layer_id";
20 static const std::string m_strip_id_key =
"strip_id";
26 out <<
"MicromegasHotChannelMapData" << std::endl;
30 { out <<
" " << channel_id << std::endl; }
38 std::cout <<
"MicromegasHotChannelMapData::read - filename: " << filename << std::endl;
44 if( !std::ifstream( filename.c_str() ).good() )
46 std::cout <<
"MicromegasHotChannelMapData::read -"
47 <<
" filename: " << filename <<
" does not exist."
48 <<
" No calibration loaded" << std::endl;
58 for(
int i = 0;
i < m_total_entries; ++
i )
61 const int layer_id = cdbttree.
GetIntValue(
i, m_layer_id_key );
62 const int tile_id = cdbttree.
GetIntValue(
i, m_tile_id_key );
63 const int strip_id = cdbttree.
GetIntValue(
i, m_strip_id_key );
64 if( std::isnan(layer_id) || std::isnan(tile_id) || std::isnan(strip_id) )
70 std::cout <<
"MicromegasHotChannelMapData::read - total entries: " <<
m_hot_channel_map.size() << std::endl;
81 std::cout <<
"MicromegasHotChannelMapData::write - filename: " << filename << std::endl;
91 cdbttree.
SetIntValue( index, m_layer_id_key, channel_id.m_layer );
92 cdbttree.
SetIntValue( index, m_tile_id_key, channel_id.m_tile );
93 cdbttree.
SetIntValue( index, m_strip_id_key, channel_id.m_strip );