16#include <cdc/dataobjects/WireID.h>
51 void setWire(
unsigned short iCLayer,
unsigned short iWire,
double eff = 0)
53 m_wires.insert(std::pair(
WireID(iCLayer, iWire).getEWire(), eff));
67 std::map<unsigned short, float>
getWires()
const
79 std::map<unsigned short, float>::const_iterator it =
m_wires.find(wid.
getEWire());
80 if (it !=
m_wires.end() && it->second == 0.) {
95 std::map<unsigned short, float>::const_iterator it =
m_wires.find(wid.
getEWire());
96 if (it !=
m_wires.end() && 0. <= it->second && it->second < 1.) {
111 std::map<unsigned short, float>::const_iterator it =
m_wires.find(wid.
getEWire());
112 if (it !=
m_wires.end() && it->second > 1.) {
124 std::cout <<
" " << std::endl;
125 std::cout <<
"Bad wire list" << std::endl;
126 std::cout <<
"#entries= " <<
m_wires.size() << std::endl;
127 std::cout <<
"in order of ICLayer and IWire and EWire" << std::endl;
129 for (
auto const ent :
m_wires) {
139 std::ofstream fout(fileName);
142 B2ERROR(
"Specified output file could not be opened!");
144 for (
auto const ent :
m_wires) {
146 ent.first).
getIWire() <<
" " << ent.second << std::endl;
Database object for bad wires.
void outputToFile(std::string fileName) const
Output the contents in text file format.
void setWire(const WireID &wid, double eff=0)
Set the wire in the list.
bool isDeadWire(const WireID &wid, double &eff) const
Check if dead wire.
bool isBadWire(const WireID &wid) const
Check if the wire is totally-dead (eff=0); to be replaced by isDeadWire() in future....
std::map< unsigned short, float > getWires() const
Get the whole list.
ClassDef(CDCBadWires, 2)
ClassDef.
void setWire(unsigned short iCLayer, unsigned short iWire, double eff=0)
Set the wire in the list.
unsigned short getEntries() const
Get the no.
CDCBadWires()
Default constructor.
std::map< unsigned short, float > m_wires
badwire list
bool isHotWire(const WireID &wid) const
Check if the wire is hot/noisy.
void dump() const
Print out contents.
Class to identify a wire inside the CDC.
unsigned short getICLayer() const
Getter for continuous layer numbering.
unsigned short getIWire() const
Getter for wire within the layer.
unsigned short getEWire() const
Getter for encoded wire number.
Abstract base class for different kinds of events.