#include <L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.h>
Public Member Functions | |
void | addInputMuon (std::string chipid, const L1MuRegionalCand &inMu) |
unsigned long | getEventNumber () const |
get the Event number | |
const L1MuRegionalCand * | getInputMuon (std::string chipid, unsigned index) const |
get [index]th input muon in chip [chipid] | |
const bool & | getIsoBit (unsigned etaIndex, unsigned phiIndex) |
const L1MuGMTMatrix< bool > & | getIsoBits () const |
const bool & | getMipBit (unsigned etaIndex, unsigned phiIndex) |
const L1MuGMTMatrix< bool > & | getMipBits () const |
get the MIP / ISO bits | |
unsigned long | getRunNumber () const |
get the Run number | |
bool | isEmpty () const |
is the event empty? | |
L1MuGMTInputEvent () | |
constructor, initializes everything to 0/false, apart from the ISO bits, which are initialized to true; | |
void | reset () |
resets everything to 0/false, apart from the ISO bits, which are all set to true; | |
void | setEventNumber (unsigned long eventnr) |
void | setIsoBit (unsigned etaIndex, unsigned phiIndex, bool val) |
void | setMipBit (unsigned etaIndex, unsigned phiIndex, bool val) |
void | setRunNumber (unsigned long runnr) |
virtual | ~L1MuGMTInputEvent () |
Private Attributes | |
unsigned long | m_evtnr |
std::map< std::string, std::vector< L1MuRegionalCand > > | m_inputmuons |
L1MuGMTMatrix< bool > | m_iso_bits |
L1MuGMTMatrix< bool > | m_mip_bits |
unsigned long | m_runnr |
Definition at line 43 of file L1MuGMTInputEvent.h.
L1MuGMTInputEvent::L1MuGMTInputEvent | ( | ) |
constructor, initializes everything to 0/false, apart from the ISO bits, which are initialized to true;
Definition at line 38 of file L1MuGMTInputEvent.cc.
References m_inputmuons, m_iso_bits, and m_mip_bits.
00038 : 00039 m_runnr(0L), m_evtnr(0L), m_mip_bits(14,18), m_iso_bits(14,18) { 00040 std::vector<L1MuRegionalCand> empty_vec; 00041 m_inputmuons["INC"] = empty_vec; 00042 m_inputmuons["IND"] = empty_vec; 00043 m_inputmuons["INB"] = empty_vec; 00044 m_inputmuons["INF"] = empty_vec; 00045 00046 // m_inputmuons["INC"].reserve(L1MuGMTConfig::MAXCSC); 00047 // m_inputmuons["IND"].reserve(L1MuGMTConfig::MAXDTBX); 00048 // m_inputmuons["INB"].reserve(L1MuGMTConfig::MAXRPC); 00049 // m_inputmuons["INF"].reserve(L1MuGMTConfig::MAXRPC); 00050 m_inputmuons["INC"].reserve(4); 00051 m_inputmuons["IND"].reserve(4); 00052 m_inputmuons["INB"].reserve(4); 00053 m_inputmuons["INF"].reserve(4); 00054 00055 m_mip_bits.init(false); 00056 m_iso_bits.init(true); //this is more useful when reading a standalone input file 00057 //since "not-quiet" bits are stored there 00058 }
L1MuGMTInputEvent::~L1MuGMTInputEvent | ( | ) | [virtual] |
void L1MuGMTInputEvent::addInputMuon | ( | std::string | chipid, | |
const L1MuRegionalCand & | inMu | |||
) |
Definition at line 69 of file L1MuGMTInputEvent.cc.
References m_inputmuons.
Referenced by L1MuGMTHWFileReader::readNextEvent().
00070 { 00071 if (m_inputmuons.count(chipid) == 0) 00072 throw std::runtime_error("L1MuGMTInputEvent::addInputMuon: invalid chipid:" + chipid); 00073 m_inputmuons[chipid].push_back(inMu); 00074 }
unsigned long L1MuGMTInputEvent::getEventNumber | ( | ) | const [inline] |
get the Event number
Definition at line 76 of file L1MuGMTInputEvent.h.
References m_evtnr.
Referenced by L1MuGMTHWFileReader::produce(), and L1MuGMTHWFileReader::setRunAndEventInfo().
00076 { return m_evtnr; };
const L1MuRegionalCand * L1MuGMTInputEvent::getInputMuon | ( | std::string | chipid, | |
unsigned | index | |||
) | const |
get [index]th input muon in chip [chipid]
chipid | is the input chip ID (IND, INC, INB, INF) | |
index | is the index of the muon in the input chip (starting with 0) |
Definition at line 89 of file L1MuGMTInputEvent.cc.
References m_inputmuons.
Referenced by L1MuGMTHWFileReader::produce().
00089 { 00090 00091 if (m_inputmuons.count(chipid) == 0 ) 00092 throw std::runtime_error("L1GMTInputEvent::getInputMuon: invalid chipid:" + chipid); 00093 00094 if (index >= m_inputmuons.find(chipid)->second.size()) return 0; 00095 return &(m_inputmuons.find(chipid)->second.at(index)); 00096 }
const bool& L1MuGMTInputEvent::getIsoBit | ( | unsigned | etaIndex, | |
unsigned | phiIndex | |||
) | [inline] |
Definition at line 93 of file L1MuGMTInputEvent.h.
Referenced by L1MuGMTHWFileReader::produce().
00093 { return m_iso_bits(etaIndex, phiIndex); };
const L1MuGMTMatrix<bool>& L1MuGMTInputEvent::getIsoBits | ( | ) | const [inline] |
Definition at line 90 of file L1MuGMTInputEvent.h.
References m_iso_bits.
00090 { return m_iso_bits; };
const bool& L1MuGMTInputEvent::getMipBit | ( | unsigned | etaIndex, | |
unsigned | phiIndex | |||
) | [inline] |
Definition at line 92 of file L1MuGMTInputEvent.h.
References m_mip_bits.
Referenced by L1MuGMTHWFileReader::produce().
00092 { return m_mip_bits(etaIndex, phiIndex); };
const L1MuGMTMatrix<bool>& L1MuGMTInputEvent::getMipBits | ( | ) | const [inline] |
get the MIP / ISO bits
Definition at line 88 of file L1MuGMTInputEvent.h.
References m_mip_bits.
00088 { return m_mip_bits; };
unsigned long L1MuGMTInputEvent::getRunNumber | ( | ) | const [inline] |
get the Run number
Definition at line 73 of file L1MuGMTInputEvent.h.
References m_runnr.
Referenced by L1MuGMTHWFileReader::produce(), and L1MuGMTHWFileReader::setRunAndEventInfo().
00073 { return m_runnr; };
bool L1MuGMTInputEvent::isEmpty | ( | ) | const [inline] |
resets everything to 0/false, apart from the ISO bits, which are all set to true;
Definition at line 76 of file L1MuGMTInputEvent.cc.
References it, L, m_evtnr, m_inputmuons, m_iso_bits, m_mip_bits, and m_runnr.
Referenced by L1MuGMTHWFileReader::readNextEvent().
00076 { 00077 m_runnr = 0L; 00078 m_evtnr = 0L; 00079 00080 std::map<std::string, std::vector<L1MuRegionalCand> >::iterator it = m_inputmuons.begin(); 00081 for (; it != m_inputmuons.end(); it++) { 00082 it->second.clear(); 00083 } 00084 00085 m_mip_bits.init(false); 00086 m_iso_bits.init(true); //see CTOR for info on this 00087 }
void L1MuGMTInputEvent::setEventNumber | ( | unsigned long | eventnr | ) | [inline] |
Definition at line 60 of file L1MuGMTInputEvent.h.
References m_evtnr.
Referenced by L1MuGMTHWFileReader::readNextEvent().
00060 { m_evtnr=eventnr; };
Definition at line 69 of file L1MuGMTInputEvent.h.
References m_iso_bits.
Referenced by L1MuGMTHWFileReader::readNextEvent().
00069 { 00070 m_iso_bits(etaIndex, phiIndex) = val; };
Definition at line 65 of file L1MuGMTInputEvent.h.
References m_mip_bits.
Referenced by L1MuGMTHWFileReader::readNextEvent().
00065 { 00066 m_mip_bits(etaIndex, phiIndex) = val; };
void L1MuGMTInputEvent::setRunNumber | ( | unsigned long | runnr | ) | [inline] |
Definition at line 58 of file L1MuGMTInputEvent.h.
References m_runnr.
Referenced by L1MuGMTHWFileReader::readNextEvent().
00058 { m_runnr=runnr; };
unsigned long L1MuGMTInputEvent::m_evtnr [private] |
Definition at line 99 of file L1MuGMTInputEvent.h.
Referenced by getEventNumber(), isEmpty(), reset(), and setEventNumber().
std::map<std::string, std::vector <L1MuRegionalCand> > L1MuGMTInputEvent::m_inputmuons [private] |
Definition at line 101 of file L1MuGMTInputEvent.h.
Referenced by addInputMuon(), getInputMuon(), L1MuGMTInputEvent(), and reset().
L1MuGMTMatrix<bool> L1MuGMTInputEvent::m_iso_bits [private] |
Definition at line 104 of file L1MuGMTInputEvent.h.
Referenced by getIsoBits(), L1MuGMTInputEvent(), reset(), and setIsoBit().
L1MuGMTMatrix<bool> L1MuGMTInputEvent::m_mip_bits [private] |
Definition at line 103 of file L1MuGMTInputEvent.h.
Referenced by getMipBit(), getMipBits(), L1MuGMTInputEvent(), reset(), and setMipBit().
unsigned long L1MuGMTInputEvent::m_runnr [private] |
Definition at line 93 of file L1MuGMTInputEvent.h.
Referenced by getRunNumber(), isEmpty(), reset(), and setRunNumber().