Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <PhiSectionWidget.h>
|
| PhiSectionWidget (QWidget *parent, IVP1System *sys=0) |
|
virtual | ~PhiSectionWidget () |
|
int | numberOfSectors () const |
|
void | setNumberOfSectors (int, bool forceAllEnabled=false) |
|
bool | allSectorsOn () const |
|
bool | allSectorsOff () const |
|
QList< VP1Interval > | enabledPhiRanges () const |
|
QString | enabledRangesToString () const |
|
QList< VP1Interval > | enabledPhiRanges (double phi_min, double phi_max) const |
|
QByteArray | state () const |
|
void | setState (QByteArray) |
|
void | launchContextMenu (QPoint) |
|
void | setSectorStatus (int, bool) |
|
bool | virtualSectorEnabled (int iSector, int nSectors) const |
|
QVector< bool > | virtualSectorsEnabled (int nSectors) const |
|
void | setAllowedNumberOfSectors (QList< int > allowedNSectors, bool allowCustom=false) |
|
void | setSystemBasePointer (IVP1System *sys) |
|
void | message (const QString &) const |
|
void | message (const QStringList &, const QString &addtoend="") const |
|
void | message (const QString &addtostart, const QStringList &, const QString &addtoend="") const |
|
void | messageDebug (const QString &) const |
|
void | messageDebug (const QStringList &, const QString &addtoend="") const |
|
void | messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const |
|
void | messageVerbose (const QString &) const |
|
void | messageVerbose (const QStringList &, const QString &addtoend="") const |
|
void | messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const |
|
IVP1System * | systemBase () const |
|
const QString & | helperClassName () const |
|
Definition at line 26 of file PhiSectionWidget.h.
◆ PhiSectionWidget()
PhiSectionWidget::PhiSectionWidget |
( |
QWidget * |
parent, |
|
|
IVP1System * |
sys = 0 |
|
) |
| |
Definition at line 95 of file PhiSectionWidget.cxx.
113 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
114 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
115 setRenderHint(QPainter::Antialiasing,
true);
128 setFocusPolicy(Qt::NoFocus);
129 setAcceptDrops(
true);
133 QList<int> defaultAllowedNSectors;
134 defaultAllowedNSectors << 4 << 5 << 6 << 8 << 9 << 10
135 << 12 << 16 << 24 << 32 << 36 << 48 << 64;
◆ ~PhiSectionWidget()
PhiSectionWidget::~PhiSectionWidget |
( |
| ) |
|
|
virtual |
◆ allSectorsOff()
bool PhiSectionWidget::allSectorsOff |
( |
| ) |
const |
◆ allSectorsOn()
bool PhiSectionWidget::allSectorsOn |
( |
| ) |
const |
◆ dragEnterEvent()
void PhiSectionWidget::dragEnterEvent |
( |
QDragEnterEvent * |
event | ) |
|
|
protected |
Definition at line 461 of file PhiSectionWidget.cxx.
463 if (
event->source()!=
this &&
event->mimeData()->hasFormat(
"vp1/enabledphisectors"))
464 event->acceptProposedAction();
◆ dragLeaveEvent()
void PhiSectionWidget::dragLeaveEvent |
( |
QDragLeaveEvent * |
event | ) |
|
|
protected |
◆ dragMoveEvent()
void PhiSectionWidget::dragMoveEvent |
( |
QDragMoveEvent * |
event | ) |
|
|
protected |
◆ dropEvent()
void PhiSectionWidget::dropEvent |
( |
QDropEvent * |
event | ) |
|
|
protected |
Definition at line 468 of file PhiSectionWidget.cxx.
470 QByteArray
data =
event->mimeData()->data(
"vp1/enabledphisectors");
471 event->acceptProposedAction();
◆ enabledPhiRanges() [1/2]
QList< VP1Interval > PhiSectionWidget::enabledPhiRanges |
( |
| ) |
const |
◆ enabledPhiRanges() [2/2]
QList< VP1Interval > PhiSectionWidget::enabledPhiRanges |
( |
double |
phi_min, |
|
|
double |
phi_max |
|
) |
| const |
Definition at line 576 of file PhiSectionWidget.cxx.
579 messageDebug(
"enabledPhiRanges(double phi_min,double phi_max)");
582 if (phi_min>=phi_max)
583 return QList<VP1Interval>();
584 if (phi_max-phi_min>=(2*
M_PI))
594 if (phi_max>(2*
M_PI)) {
609 if (
l.front().lower()<0.0) {
611 l.front().setLower(0.0);
619 for (
int i = 0;
i <
l.count(); ) {
622 if (b <= phi_min||a >= phi_max) {
626 l[
i].setLower(phi_min);
628 l[
i].setUpper(phi_max);
◆ enabledPhiRangesChanged
◆ enabledRangesToString()
QString PhiSectionWidget::enabledRangesToString |
( |
| ) |
const |
◆ helperClassName()
const QString& VP1HelperClassBase::helperClassName |
( |
| ) |
const |
|
inlineinherited |
◆ launchContextMenu()
void PhiSectionWidget::launchContextMenu |
( |
QPoint |
p | ) |
|
Definition at line 324 of file PhiSectionWidget.cxx.
331 QClipboard * clipboard = QApplication::clipboard();
333 &&clipboard->mimeData()->hasFormat(
"vp1/enabledphisectors"));
337 int nSectors = setNPhiAct->data().toInt(&ok);
346 QMimeData *mimeData =
new QMimeData;
347 mimeData->setData(
"vp1/enabledphisectors",
state());
349 clipboard->setMimeData(mimeData);
353 QByteArray
data = clipboard->mimeData()->data(
"vp1/enabledphisectors");
381 int nCustomSectors = QInputDialog::getInt(
this,
"Set number of phi sectors",
383 if (ok && nCustomSectors >= 4 && nCustomSectors <= 99 )
389 int nSectors = selAct->data().toInt(&ok);
◆ message() [1/3]
void VP1HelperClassBase::message |
( |
const QString & |
str | ) |
const |
|
inherited |
◆ message() [2/3]
void VP1HelperClassBase::message |
( |
const QString & |
addtostart, |
|
|
const QStringList & |
l, |
|
|
const QString & |
addtoend = "" |
|
) |
| const |
|
inherited |
Definition at line 131 of file VP1HelperClassBase.cxx.
133 if (addtostart.isEmpty()) {
137 if (addtoend.isEmpty()) {
138 for (
const QString&
s :
l)
141 for (
const QString&
s :
l)
◆ message() [3/3]
void VP1HelperClassBase::message |
( |
const QStringList & |
l, |
|
|
const QString & |
addtoend = "" |
|
) |
| const |
|
inherited |
Definition at line 91 of file VP1HelperClassBase.cxx.
93 if (addtoend.isEmpty()) {
94 for (
const QString&
s :
l)
97 for (
const QString&
s :
l)
◆ messageDebug() [1/3]
void VP1HelperClassBase::messageDebug |
( |
const QString & |
str | ) |
const |
|
inherited |
◆ messageDebug() [2/3]
void VP1HelperClassBase::messageDebug |
( |
const QString & |
addtostart, |
|
|
const QStringList & |
l, |
|
|
const QString & |
addtoend = "" |
|
) |
| const |
|
inherited |
Definition at line 147 of file VP1HelperClassBase.cxx.
151 if (addtostart.isEmpty()) {
155 if (addtoend.isEmpty()) {
156 for (
const QString&
s :
l)
159 for (
const QString&
s :
l)
◆ messageDebug() [3/3]
void VP1HelperClassBase::messageDebug |
( |
const QStringList & |
l, |
|
|
const QString & |
addtoend = "" |
|
) |
| const |
|
inherited |
Definition at line 103 of file VP1HelperClassBase.cxx.
107 if (addtoend.isEmpty()) {
108 for (
const QString&
s :
l)
111 for (
const QString&
s :
l)
◆ messageVerbose() [1/3]
void VP1HelperClassBase::messageVerbose |
( |
const QString & |
str | ) |
const |
|
inherited |
◆ messageVerbose() [2/3]
void VP1HelperClassBase::messageVerbose |
( |
const QString & |
addtostart, |
|
|
const QStringList & |
l, |
|
|
const QString & |
addtoend = "" |
|
) |
| const |
|
inherited |
Definition at line 165 of file VP1HelperClassBase.cxx.
169 if (addtostart.isEmpty()) {
173 if (addtoend.isEmpty()) {
174 for (
const QString&
s :
l)
177 for (
const QString&
s :
l)
◆ messageVerbose() [3/3]
void VP1HelperClassBase::messageVerbose |
( |
const QStringList & |
l, |
|
|
const QString & |
addtoend = "" |
|
) |
| const |
|
inherited |
Definition at line 117 of file VP1HelperClassBase.cxx.
121 if (addtoend.isEmpty()) {
122 for (
const QString&
s :
l)
125 for (
const QString&
s :
l)
◆ mouseMoveEvent()
void PhiSectionWidget::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Definition at line 431 of file PhiSectionWidget.cxx.
433 if (!(
event->buttons() & Qt::LeftButton))
436 < QApplication::startDragDistance())
439 QDrag *drag =
new QDrag(
this);
440 QMimeData *mimeData =
new QMimeData;
446 mimeData->setData(
"vp1/enabledphisectors",
state());
456 drag->setMimeData(mimeData);
457 drag->exec(Qt::CopyAction | Qt::MoveAction);
◆ mousePressEvent()
void PhiSectionWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protected |
Definition at line 397 of file PhiSectionWidget.cxx.
399 if (
event->buttons()==Qt::RightButton) {
404 if (
event->button() == Qt::LeftButton)
407 if (
event->buttons()!=Qt::LeftButton) {
408 QGraphicsView::mousePressEvent(
event);
411 QGraphicsItem *item_ = itemAt(
event->pos());
412 QGraphicsEllipseItem *
item =
static_cast<QGraphicsEllipseItem*
>(item_);
414 QGraphicsView::mousePressEvent(
event);
419 QGraphicsView::mousePressEvent(
event);
◆ numberOfSectors()
int PhiSectionWidget::numberOfSectors |
( |
| ) |
const |
◆ phiToVirtualSectorIndex()
int PhiSectionWidget::phiToVirtualSectorIndex |
( |
double |
phi, |
|
|
int |
nSectors |
|
) |
| |
|
static |
◆ resizeEvent()
void PhiSectionWidget::resizeEvent |
( |
QResizeEvent * |
| ) |
|
|
protected |
◆ setAllowedNumberOfSectors()
void PhiSectionWidget::setAllowedNumberOfSectors |
( |
QList< int > |
allowedNSectors, |
|
|
bool |
allowCustom = false |
|
) |
| |
Definition at line 831 of file PhiSectionWidget.cxx.
838 if (allowedNSectors.isEmpty()) {
844 for(
int s : allowedNSectors) {
853 if (allowCustom&&!allowedNSectors.contains(
m_d->
sectorstatus.count())) {
859 std::sort(allowedNSectors.begin(), allowedNSectors.end());
875 messageDebug(
"check - sectorstatus.isEmpty? " +
str(checkA + checkB) );
◆ setHelperClassName()
void VP1HelperClassBase::setHelperClassName |
( |
const QString & |
n | ) |
|
|
inlineprotectedinherited |
◆ setNumberOfSectors()
void PhiSectionWidget::setNumberOfSectors |
( |
int |
nsectors, |
|
|
bool |
forceAllEnabled = false |
|
) |
| |
Definition at line 153 of file PhiSectionWidget.cxx.
160 if (nsectors<4||nsectors>99) {
171 for(
int i = 2;
i < 100; ++
i) {
180 messageDebug(
"!sectorstatus.isEmpty() && nsectors==sectorstatus.count(). Returning...");
192 QList<VP1Interval> oldEnabledRanges;
202 QGraphicsScene * oldscene = scene();
203 setScene(
new QGraphicsScene);
207 const double R = 10.0;
208 const double r = (2*
M_PI)*
R / nsectors / 1.2;
210 for (
int isector = 0; isector < nsectors; ++isector) {
211 double phi = (isector+0.5)*(2*
M_PI)/nsectors;
213 QGraphicsEllipseItem * ellipse = scene()->addEllipse(
x,
y,
r,
r);
219 if (!forceAllEnabled)
222 fitInView(scene()->sceneRect());
230 if (nsectors <= 12) {
232 }
else if(nsectors >= 16 && nsectors < 24) {
233 setFixedSize(120,120);
234 }
else if(nsectors >= 24 && nsectors < 32) {
235 setFixedSize(200,200);
236 }
else if (nsectors >= 32 && nsectors <= 36) {
237 setFixedSize(300,300);
238 }
else if (nsectors > 36) {
239 setFixedSize(400,400);
245 messageDebug(
"WARNING. m_d->sectorstatus is still Empty...");
◆ setSectorStatus()
void PhiSectionWidget::setSectorStatus |
( |
int |
isector, |
|
|
bool |
status |
|
) |
| |
◆ setState()
void PhiSectionWidget::setState |
( |
QByteArray |
ba | ) |
|
Definition at line 747 of file PhiSectionWidget.cxx.
754 buffer.open(QIODevice::ReadOnly);
762 QVector<bool> restored_sectorstatus;
763 state >> restored_sectorstatus;
766 bool save = blockSignals(
true);
◆ setSystemBasePointer()
void VP1HelperClassBase::setSystemBasePointer |
( |
IVP1System * |
sys | ) |
|
|
inherited |
◆ state()
QByteArray PhiSectionWidget::state |
( |
| ) |
const |
◆ str() [1/30]
◆ str() [2/30]
static QString VP1String::str |
( |
const bool |
b | ) |
|
|
inlinestaticinherited |
Definition at line 53 of file VP1String.h.
53 {
return b?
"True":
"False"; }
◆ str() [3/30]
static QString VP1String::str |
( |
const char * |
c | ) |
|
|
inlinestaticinherited |
◆ str() [4/30]
static QString VP1String::str |
( |
const double & |
d | ) |
|
|
inlinestaticinherited |
◆ str() [5/30]
static QString VP1String::str |
( |
const float & |
f | ) |
|
|
inlinestaticinherited |
◆ str() [6/30]
◆ str() [7/30]
QString VP1String::str |
( |
const QColor & |
c | ) |
|
|
staticinherited |
Definition at line 30 of file VP1String.cxx.
32 return c.isValid() ?
c.name() :
"Invalid";
◆ str() [8/30]
template<class T >
static QString VP1String::str |
( |
const QFlags< T > & |
f | ) |
|
|
inlinestaticinherited |
◆ str() [9/30]
template<class T >
static QString VP1String::str |
( |
const QList< T > & |
t | ) |
|
|
inlinestaticinherited |
◆ str() [10/30]
static QString VP1String::str |
( |
const QString & |
s | ) |
|
|
inlinestaticinherited |
◆ str() [11/30]
QString VP1String::str |
( |
const SbColor & |
c | ) |
|
|
staticinherited |
◆ str() [12/30]
QString VP1String::str |
( |
const SbVec2d & |
v | ) |
|
|
staticinherited |
◆ str() [13/30]
QString VP1String::str |
( |
const SbVec2f & |
v | ) |
|
|
staticinherited |
◆ str() [14/30]
QString VP1String::str |
( |
const SbVec2s & |
v | ) |
|
|
staticinherited |
◆ str() [15/30]
QString VP1String::str |
( |
const SbVec3d & |
v | ) |
|
|
staticinherited |
◆ str() [16/30]
QString VP1String::str |
( |
const SbVec3f & |
v | ) |
|
|
staticinherited |
◆ str() [17/30]
QString VP1String::str |
( |
const SbVec3s & |
v | ) |
|
|
staticinherited |
◆ str() [18/30]
QString VP1String::str |
( |
const SbVec4d & |
v | ) |
|
|
staticinherited |
◆ str() [19/30]
QString VP1String::str |
( |
const SbVec4f & |
v | ) |
|
|
staticinherited |
◆ str() [20/30]
template<class T >
static QString VP1String::str |
( |
const T * |
t | ) |
|
|
inlinestaticinherited |
Definition at line 87 of file VP1String.h.
87 {
return str(
static_cast<const void*
>(
t)); }
◆ str() [21/30]
QString VP1String::str |
( |
const void * |
p | ) |
|
|
staticinherited |
Definition at line 48 of file VP1String.cxx.
54 return QString (
s.str().c_str());
◆ str() [22/30]
◆ str() [23/30]
static QString VP1String::str |
( |
int |
n | ) |
|
|
inlinestaticinherited |
◆ str() [24/30]
static QString VP1String::str |
( |
long |
n | ) |
|
|
inlinestaticinherited |
◆ str() [25/30]
static QString VP1String::str |
( |
qlonglong |
n | ) |
|
|
inlinestaticinherited |
◆ str() [26/30]
static QString VP1String::str |
( |
qulonglong |
n | ) |
|
|
inlinestaticinherited |
◆ str() [27/30]
static QString VP1String::str |
( |
short int |
n | ) |
|
|
inlinestaticinherited |
◆ str() [28/30]
static QString VP1String::str |
( |
uint |
n | ) |
|
|
inlinestaticinherited |
◆ str() [29/30]
static QString VP1String::str |
( |
ulong |
n | ) |
|
|
inlinestaticinherited |
◆ str() [30/30]
static QString VP1String::str |
( |
unsigned short int |
n | ) |
|
|
inlinestaticinherited |
◆ systemBase()
IVP1System* VP1HelperClassBase::systemBase |
( |
| ) |
const |
|
inlineinherited |
◆ verbose()
static bool VP1HelperClassBase::verbose |
( |
| ) |
|
|
inlinestaticinherited |
◆ virtualSectorEnabled()
bool PhiSectionWidget::virtualSectorEnabled |
( |
int |
iSector, |
|
|
int |
nSectors |
|
) |
| const |
Definition at line 677 of file PhiSectionWidget.cxx.
681 if (iSector<0||iSector>=nSectors||nSectors<1)
691 const double dphi = (2*
M_PI)/nSectors;
692 const double epsilon(dphi*1.0
e-9);
◆ virtualSectorsEnabled()
QVector< bool > PhiSectionWidget::virtualSectorsEnabled |
( |
int |
nSectors | ) |
const |
Definition at line 704 of file PhiSectionWidget.cxx.
707 return QVector<bool>();
708 QVector<bool>
v(nSectors,
false);
709 for (
int i = 0;
i < nSectors; ++
i)
◆ warnUndeletedInstances()
void VP1HelperClassBase::warnUndeletedInstances |
( |
| ) |
|
|
staticinherited |
Definition at line 183 of file VP1HelperClassBase.cxx.
185 if (vp1helperclassbase_instanceMap.empty())
187 std::cout <<
"WARNING: Detected "<<vp1helperclassbase_instanceMap.size()<<
" undeleted helper class instances:"<<std::endl;
190 for (
it = vp1helperclassbase_instanceMap.begin();
it!=
itE;++
it) {
191 std::cout <<
" ==> "<<
it->first<<
": "<<
it->first->m_helpername.toStdString()
192 << (
it->second.isEmpty()?QString(
""):
" (in system "+
it->
second+
")").toStdString()<<std::endl;
◆ m_d
Imp* PhiSectionWidget::m_d |
|
private |
◆ m_helpername
QString VP1HelperClassBase::m_helpername |
|
privateinherited |
◆ m_system
◆ s_vp1verbose
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
char data[hepevt_bytes_allocation_ATLAS]
Scalar phi() const
phi method
void messageVerbose(const QString &) const
static const bool s_vp1verbose
static QString str(const QString &s)
void messageDebug(const QString &) const
def save(self, fileName="./columbo.out")
static const char * prefix_msg()
POOL::TEvent event(POOL::TEvent::kClassAccess)
const QString & name() const
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
static QColor sbcol2qcol(const SbColor &)
static const char * prefix_debug()
static const char * prefix_verbose()
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
void message(const QString &) const
VP1HelperClassBase(IVP1System *sys=0, QString helpername="")
void message(const QString &) const