/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DetectorDescription/Core/interface/DDComparator.h
53 строки
1 KB
Cms Build
Clang-Format
29 май 2019, 08:28
29 май 2019, 08:28
96591f2
Код
Авторство
О чём код?
#ifndef DETECTOR_DESCRIPTION_CORE_DD_COMPARATOR_H #define DETECTOR_DESCRIPTION_CORE_DD_COMPARATOR_H #include <vector> #include "DetectorDescription/Core/interface/DDExpandedNode.h" #include "DetectorDescription/Core/interface/DDExpandedView.h" #include "DetectorDescription/Core/interface/DDLogicalPart.h" #include "DetectorDescription/Core/interface/DDPartSelection.h" //! compares a given geometrical-history whether it corresponds to the given part-selector /** This is a function-object. */ class DDCompareEqual { public: DDCompareEqual(const DDGeoHistory &h, const DDPartSelection &s) : hist_(h), partsel_(s), hMax_(h.size()), hIndex_(0), sMax_(s.size()), sIndex_(0), sLp_(), sCopyno_(0), absResult_(hMax_ > 0 && sMax_ > 0) { // it makes only sense to compare if both std::vectors have at least one entry each. } DDCompareEqual() = delete; bool operator()(const DDGeoHistory &, const DDPartSelection &); bool operator()(); protected: inline bool nextAnylogp(); inline bool nextAnyposp(); inline bool nextChildlogp(); inline bool nextChildposp(); private: const DDGeoHistory &hist_; const DDPartSelection &partsel_; DDGeoHistory::size_type const hMax_; DDGeoHistory::size_type hIndex_; DDPartSelection::size_type const sMax_; DDPartSelection::size_type sIndex_; DDLogicalPart sLp_; int sCopyno_; bool absResult_; }; #endif