ATLAS Offline Software
ForwardDetectors
ForwardTracker
ForwardTracker
ForwardTracker/ForwardTracker/STLHelpers.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef FORWARDTRACKER_STLHELPERS_H
6
#define FORWARDTRACKER_STLHELPERS_H
7
8
#include <cmath>
9
#include <stdexcept>
10
#include <iostream>
11
12
namespace
ForwardTracker
{
13
14
template
<
class
PtrType>
bool
absZGreater
(
const
PtrType rhs,
const
PtrType lhs) {
return
std::fabs(lhs->position().z()) > std::fabs(rhs->position().z()); }
15
16
template
<
class
streamptr>
17
inline
void
openFile
(
const
std::string&
fname
, streamptr& strm) {
18
19
strm->open(
fname
.c_str());
20
21
if
(strm->good()) std::cout <<
"Open file: "
<<
fname
<< std::endl;
22
else
{
23
24
std::string
msg
=
"Error opening file "
+
fname
;
25
throw
std::runtime_error(
msg
);
26
}
27
}
28
}
29
30
#endif
ForwardTracker::absZGreater
bool absZGreater(const PtrType rhs, const PtrType lhs)
Definition:
ForwardTracker/ForwardTracker/STLHelpers.h:14
ForwardTracker::openFile
void openFile(const std::string &fname, streamptr &strm)
Definition:
ForwardTracker/ForwardTracker/STLHelpers.h:17
python.AthDsoLogger.fname
string fname
Definition:
AthDsoLogger.py:67
ForwardTracker
Definition:
ForwardTracker/ForwardTracker/Beamline.h:12
python.AutoConfigFlags.msg
msg
Definition:
AutoConfigFlags.py:7
Generated on Tue Jul 2 2024 21:27:21 for ATLAS Offline Software by
1.8.18