#include <RPCReadOutMappingWithFastSearch.h>
Classes | |
struct | lessMap |
Public Member Functions | |
virtual RPCReadOutMapping::StripInDetUnit | detUnitFrame (const LinkBoardSpec &location, const LinkBoardPackedStrip &lbstrip) const |
convert strip location as in raw data (LB and LBchannel) to detUnit frame | |
void | init (const RPCReadOutMapping *arm) |
takes ownership of map | |
virtual const LinkBoardSpec * | location (const LinkBoardElectronicIndex &ele) const |
conversion between electronic and detector indexing | |
RPCReadOutMappingWithFastSearch () | |
virtual | ~RPCReadOutMappingWithFastSearch () |
Private Types | |
typedef std::map < LinkBoardElectronicIndex, const LinkBoardSpec *, lessMap > | LBMap |
Private Attributes | |
LBMap | theLBMap |
const RPCReadOutMapping * | theMapping |
std::string | theVersion |
Definition at line 8 of file RPCReadOutMappingWithFastSearch.h.
typedef std::map<LinkBoardElectronicIndex, const LinkBoardSpec*, lessMap> RPCReadOutMappingWithFastSearch::LBMap [private] |
Definition at line 29 of file RPCReadOutMappingWithFastSearch.h.
RPCReadOutMappingWithFastSearch::RPCReadOutMappingWithFastSearch | ( | ) |
Definition at line 22 of file RPCReadOutMappingWithFastSearch.cc.
: theMapping(0) {}
virtual RPCReadOutMappingWithFastSearch::~RPCReadOutMappingWithFastSearch | ( | ) | [inline, virtual] |
Definition at line 11 of file RPCReadOutMappingWithFastSearch.h.
{}
RPCReadOutMapping::StripInDetUnit RPCReadOutMappingWithFastSearch::detUnitFrame | ( | const LinkBoardSpec & | location, |
const LinkBoardPackedStrip & | packedStrip | ||
) | const [virtual] |
convert strip location as in raw data (LB and LBchannel) to detUnit frame
Reimplemented from RPCReadOutMapping.
Definition at line 71 of file RPCReadOutMappingWithFastSearch.cc.
References RPCReadOutMapping::detUnitFrame(), and theMapping.
{ return theMapping->detUnitFrame(location,lbstrip); }
void RPCReadOutMappingWithFastSearch::init | ( | const RPCReadOutMapping * | arm | ) |
takes ownership of map
Definition at line 26 of file RPCReadOutMappingWithFastSearch.cc.
References gather_cfg::cout, LinkBoardElectronicIndex::dccId, TriggerBoardSpec::dccInputChannelNum(), LinkBoardElectronicIndex::dccInputChannelNum, RPCReadOutMapping::dccList(), TriggerBoardSpec::enabledLinkConns(), DccSpec::id(), LinkBoardElectronicIndex::lbNumInLink, link(), LinkBoardSpec::linkBoardNumInLink(), LinkConnSpec::linkBoards(), splitter::LINKS, LinkBoardElectronicIndex::tbLinkInputNum, theLBMap, theMapping, theVersion, LinkConnSpec::triggerBoardInputNumber(), DccSpec::triggerBoards(), and RPCReadOutMapping::version().
Referenced by RPCUnpackingModule::beginRun().
{ if (theVersion==arm->version()) return; theVersion=arm->version(); theLBMap.clear(); theMapping = arm; typedef vector<const DccSpec*> DCCLIST; DCCLIST dccList = arm->dccList(); for (DCCLIST::const_iterator idcc = dccList.begin(), idccEnd = dccList.end(); idcc < idccEnd; ++idcc) { const DccSpec & dccSpec = **idcc; const std::vector<TriggerBoardSpec> & triggerBoards = dccSpec.triggerBoards(); for ( std::vector<TriggerBoardSpec>::const_iterator it = triggerBoards.begin(); it != triggerBoards.end(); it++) { const TriggerBoardSpec & triggerBoard = (*it); typedef std::vector<const LinkConnSpec* > LINKS; LINKS linkConns = triggerBoard.enabledLinkConns(); for ( LINKS::const_iterator ic = linkConns.begin(); ic != linkConns.end(); ic++) { const LinkConnSpec & link = **ic; const std::vector<LinkBoardSpec> & boards = link.linkBoards(); for ( std::vector<LinkBoardSpec>::const_iterator ib = boards.begin(); ib != boards.end(); ib++) { const LinkBoardSpec & board = (*ib); LinkBoardElectronicIndex eleIndex; eleIndex.dccId = dccSpec.id(); eleIndex.dccInputChannelNum = triggerBoard.dccInputChannelNum(); eleIndex.tbLinkInputNum = link.triggerBoardInputNumber(); eleIndex.lbNumInLink = board.linkBoardNumInLink(); LBMap::iterator inMap = theLBMap.find(eleIndex); if (inMap != theLBMap.end()) { cout <<"The element in map already exists!"<< endl; } else { theLBMap[eleIndex] = &board; } } } } } }
const LinkBoardSpec * RPCReadOutMappingWithFastSearch::location | ( | const LinkBoardElectronicIndex & | ele | ) | const [virtual] |
conversion between electronic and detector indexing
Reimplemented from RPCReadOutMapping.
Definition at line 77 of file RPCReadOutMappingWithFastSearch.cc.
References theLBMap.
Definition at line 30 of file RPCReadOutMappingWithFastSearch.h.
Referenced by init(), and location().
const RPCReadOutMapping* RPCReadOutMappingWithFastSearch::theMapping [private] |
Definition at line 23 of file RPCReadOutMappingWithFastSearch.h.
Referenced by detUnitFrame(), and init().
std::string RPCReadOutMappingWithFastSearch::theVersion [private] |
Reimplemented from RPCReadOutMapping.
Definition at line 22 of file RPCReadOutMappingWithFastSearch.h.
Referenced by init().