/usr/include/CLHEP/GenericFunctions/CutBase.icc is in libclhep-dev 2.1.4.1+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | // -*- C++ -*-
// $Id: CutBase.icc,v 1.3 2008/11/19 16:11:44 boudreau Exp $
//-------------------------------------------------------------------//
// //
// Implementations for the Cut class //
// //
//-------------------------------------------------------------------//
template <class Type>
Cut<Type>::Cut() {}
template <class Type>
Cut<Type>::Cut(const Cut<Type> & ) {}
template <class Type>
Cut<Type>::~Cut() {}
template <class Type>
typename Cut<Type>::OR Cut<Type>::operator || (const Cut<Type> & A) const {
return OR(*this,A);
}
template <class Type>
typename Cut<Type>::AND Cut<Type>::operator && (const Cut<Type> & A) const {
return AND(*this,A);
}
template <class Type>
typename Cut<Type>::NOT Cut<Type>::operator ! () const {
return NOT(*this);
}
//-------------------------------------------------------------------//
// //
// Implementations for the AND class //
// //
//-------------------------------------------------------------------//
template <class Type>
Cut<Type>::AND::AND(const AND & right):Cut<Type>(),
_pA(right._pA->clone()),
_pB(right._pB->clone())
{
}
template <class Type>
Cut<Type>::AND::AND(const Cut<Type> & A, const Cut<Type> & B):Cut<Type>(),
_pA(A.clone()),
_pB(B.clone())
{
}
template <class Type>
Cut<Type>::AND::~AND()
{
delete _pA;
delete _pB;
}
template <class Type>
typename Cut<Type>::AND *Cut<Type>::AND::clone() const
{
return new AND(*this);
}
template <class Type>
bool Cut<Type>::AND::operator () (const Type & t) const {
return _pA->operator()(t) && _pB->operator()(t);
}
//-------------------------------------------------------------------//
// //
// Implementations for the OR class //
// //
//-------------------------------------------------------------------//
template <class Type>
Cut<Type>::OR::OR(const OR & right):Cut<Type>(),
_pA(right._pA->clone()),
_pB(right._pB->clone())
{
}
template <class Type>
Cut<Type>::OR::OR(const Cut<Type> & A, const Cut<Type> & B):Cut<Type>(),
_pA(A.clone()),
_pB(B.clone())
{
}
template <class Type>
Cut<Type>::OR::~OR()
{
delete _pA;
delete _pB;
}
template <class Type>
typename Cut<Type>::OR *Cut<Type>::OR::clone() const
{
return new OR(*this);
}
template <class Type>
bool Cut<Type>::OR::operator () (const Type & t) const {
return _pA->operator()(t) || _pB->operator()(t);
}
//-------------------------------------------------------------------//
// //
// Implementations for the NOT class //
// //
//-------------------------------------------------------------------//
template <class Type>
Cut<Type>::NOT::NOT(const NOT & right):Cut<Type>(),
_pA(right._pA->clone())
{
}
template <class Type>
Cut<Type>::NOT::NOT(const Cut<Type> & A):Cut<Type>(),
_pA(A.clone())
{
}
template <class Type>
Cut<Type>::NOT::~NOT()
{
delete _pA;
}
template <class Type>
typename Cut<Type>::NOT *Cut<Type>::NOT::clone() const
{
return new NOT(*this);
}
template <class Type>
bool Cut<Type>::NOT::operator () (const Type & t) const {
return !_pA->operator()(t);
}
//-------------------------------------------------------------------//
// //
// Implementations for the Predicate class, representing a unary //
// No-op and useful as a user-level data type, because it is //
// concrete, and clones on copy, therefore is useful in e.g. STL //
// routines. //
// //
//-------------------------------------------------------------------//
template <class Type>
Cut<Type>::Predicate::Predicate(const Predicate & right):
_pA(right._pA->clone())
{
}
template <class Type>
Cut<Type>::Predicate::Predicate(const Cut<Type> & A):
_pA(A.clone())
{
}
template <class Type>
Cut<Type>::Predicate::~Predicate()
{
delete _pA;
}
template <class Type>
typename Cut<Type>::Predicate *Cut<Type>::Predicate::clone() const
{
return new Predicate(*this);
}
template <class Type>
bool Cut<Type>::Predicate::operator () (const Type & t) const {
return _pA->operator()(t);
}
|