Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
nutools
old
EventDisplayBase
Functors.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
// $Id: Functors.h,v 1.1.1.1 2010-12-22 16:18:52 p-nusoftart Exp $
3
//
4
// Define a set of useful functions for managing lists of drawable
5
// objects
6
//
7
// messier@indiana.edu
8
////////////////////////////////////////////////////////////////////////
9
#ifndef EVDFUNCTORS_H
10
#define EVDFUNCTORS_H
11
#include "TObject.h"
12
#include "TMarker.h"
13
#include "TPolyMarker.h"
14
#include "TLine.h"
15
#include "TPolyLine.h"
16
#include "TArc.h"
17
#include "TBox.h"
18
#include "TMarker3DBox.h"
19
#include "TPolyMarker3D.h"
20
#include "TPolyLine3D.h"
21
#include "TText.h"
22
#include "TLatex.h"
23
24
#include <iostream>
25
26
struct
draw_tobject
{
27
void
operator()
(TObject*
x
) {
28
// Do not draw poly lines if they have no points. Otherwise ROOT crashes
29
if
(dynamic_cast<TPolyLine*>(x)) {
30
if
(dynamic_cast<TPolyLine*>(x)->GetN() < 2)
return
;
31
}
32
else
if
(dynamic_cast<TPolyLine3D*>(x)) {
33
if
(dynamic_cast<TPolyLine3D*>(x)->GetN() < 2)
return
;
34
}
35
36
x->Draw();
37
}
38
};
39
40
struct
delete_marker
{
void
operator()
(TMarker*
x
) {
delete
x
; }};
41
struct
delete_polymarker
{
void
operator()
(TPolyMarker*
x
) {
delete
x
; }};
42
struct
delete_line
{
void
operator()
(TLine*
x
) {
delete
x
; }};
43
struct
delete_polyline
{
void
operator()
(TPolyLine*
x
) {
delete
x
; }};
44
struct
delete_arc
{
void
operator()
(TArc*
x
) {
delete
x
; }};
45
struct
delete_box
{
void
operator()
(TBox*
x
) {
delete
x
; }};
46
struct
delete_text
{
void
operator()
(TText*
x
) {
delete
x
; }};
47
struct
delete_latex
{
void
operator()
(TLatex*
x
) {
delete
x
; }};
48
49
struct
delete_marker3dbox
{
void
operator()
(TMarker3DBox*
x
) {
delete
x
;}};
50
struct
delete_polymarker3d
{
void
operator()
(TPolyMarker3D*
x
){
delete
x
;}};
51
struct
delete_polyline3d
{
void
operator()
(TPolyLine3D*
x
) {
delete
x
;}};
52
53
#endif
54
////////////////////////////////////////////////////////////////////////
delete_polymarker
Definition:
Functors.h:41
delete_marker3dbox
Definition:
Functors.h:49
draw_tobject
Definition:
Functors.h:26
delete_marker3dbox::operator()
void operator()(TMarker3DBox *x)
Definition:
Functors.h:49
delete_line::operator()
void operator()(TLine *x)
Definition:
Functors.h:42
delete_polymarker::operator()
void operator()(TPolyMarker *x)
Definition:
Functors.h:41
delete_box
Definition:
Functors.h:45
delete_arc::operator()
void operator()(TArc *x)
Definition:
Functors.h:44
delete_polymarker3d
Definition:
Functors.h:50
draw_tobject::operator()
void operator()(TObject *x)
Definition:
Functors.h:27
delete_text
Definition:
Functors.h:46
delete_marker
Definition:
Functors.h:40
delete_text::operator()
void operator()(TText *x)
Definition:
Functors.h:46
delete_polyline3d
Definition:
Functors.h:51
delete_box::operator()
void operator()(TBox *x)
Definition:
Functors.h:45
delete_polyline::operator()
void operator()(TPolyLine *x)
Definition:
Functors.h:43
delete_polymarker3d::operator()
void operator()(TPolyMarker3D *x)
Definition:
Functors.h:50
delete_marker::operator()
void operator()(TMarker *x)
Definition:
Functors.h:40
delete_line
Definition:
Functors.h:42
train.x
list x
Definition:
train.py:276
delete_polyline3d::operator()
void operator()(TPolyLine3D *x)
Definition:
Functors.h:51
delete_polyline
Definition:
Functors.h:43
delete_latex
Definition:
Functors.h:47
delete_latex::operator()
void operator()(TLatex *x)
Definition:
Functors.h:47
delete_arc
Definition:
Functors.h:44
Generated by
1.8.11