18 #include <cdc/dataobjects/WireID.h>
29 class CDCBadWires:
public TObject {
42 void setWire(
const WireID& wid,
double eff = 0)
44 m_wires.insert(std::pair(wid.getEWire(), eff));
53 void setWire(
unsigned short iCLayer,
unsigned short iWire,
double eff = 0)
55 m_wires.insert(std::pair(
WireID(iCLayer, iWire).getEWire(), eff));
69 std::map<unsigned short, float>
getWires()
const
81 std::map<unsigned short, float>::const_iterator it =
m_wires.find(wid.
getEWire());
82 if (it !=
m_wires.end() && it->second == 0.) {
96 std::map<unsigned short, float>::const_iterator it =
m_wires.find(wid.
getEWire());
97 if (it !=
m_wires.end() && 0. <= it->second && it->second < 1.) {
112 std::map<unsigned short, float>::const_iterator it =
m_wires.find(wid.getEWire());
113 if (it !=
m_wires.end() && it->second > 1.) {
125 std::cout <<
" " << std::endl;
126 std::cout <<
"Bad wire list" << std::endl;
127 std::cout <<
"#entries= " <<
m_wires.size() << std::endl;
128 std::cout <<
"in order of ICLayer and IWire and EWire" << std::endl;
130 for (
auto const ent :
m_wires) {
140 std::ofstream fout(fileName);
143 B2ERROR(
"Specified output file could not be opened!");
145 for (
auto const ent :
m_wires) {
147 ent.first).
getIWire() <<
" " << ent.second << std::endl;
154 std::map<unsigned short, float>
m_wires;