| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "na64calib/manager.hh" | ||
| 2 | |||
| 3 | namespace na64dp { | ||
| 4 | |||
| 5 | namespace util { | ||
| 6 | std::string | ||
| 7 | 71 | calib_id_to_str( const std::pair<std::type_index, std::string> & kp | |
| 8 | , bool forceNative | ||
| 9 | ) { | ||
| 10 |
1/2✓ Branch 0 taken 71 times.
✗ Branch 1 not taken.
|
71 | if(!forceNative){ |
| 11 |
1/1✓ Branch 1 taken 71 times.
|
71 | const auto & m = calib::CIDataAliases::self().name_by_type_id(); |
| 12 |
1/1✓ Branch 1 taken 71 times.
|
71 | auto it = m.find(kp); |
| 13 |
1/2✗ Branch 2 not taken.
✓ Branch 3 taken 71 times.
|
71 | if( it != m.end() ) { |
| 14 | ✗ | return format( "`%s'", it->second.c_str() ); | |
| 15 | } | ||
| 16 | } | ||
| 17 |
1/1✓ Branch 2 taken 71 times.
|
142 | return format( "{{%s;%s}}", demangle_cpp(kp.first.name()).get() |
| 18 | 142 | , kp.second.c_str() ); | |
| 19 | } | ||
| 20 | } // namespace ::na64dp::util | ||
| 21 | |||
| 22 | namespace errors { | ||
| 23 | |||
| 24 | 1 | NoCalibrationInfoEntry::NoCalibrationInfoEntry( const std::string & nm | |
| 25 | 1 | , const std::type_info & ti ) throw() | |
| 26 | : std::runtime_error( | ||
| 27 | 2 | util::format( "Calibration info of type %s is not known to" | |
| 28 | " dispatcher (no subscribers?)." | ||
| 29 | 2 | , util::calib_id_to_str(calib::Dispatcher::CIDataID(ti, nm)).c_str() | |
| 30 | ).c_str() ) | ||
| 31 | 1 | , _ti(ti) | |
| 32 | 3 | , _name(nm) {} | |
| 33 | |||
| 34 | 1 | PrematureDereferencing::PrematureDereferencing( const std::string & nm | |
| 35 | 1 | , const std::type_info & ti ) throw() | |
| 36 | : std::runtime_error( | ||
| 37 | 2 | util::format( "Calibration info %s entry was not loaded." | |
| 38 | 2 | , util::calib_id_to_str(calib::Dispatcher::CIDataID(ti, nm)).c_str() | |
| 39 | ).c_str() ) | ||
| 40 | 1 | , _ti(ti) | |
| 41 | 3 | , _name(nm) {} | |
| 42 | |||
| 43 | } | ||
| 44 | } | ||
| 45 | |||
| 46 |