ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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
Definition
ForwardTracker/ForwardTracker/Beamline.h:12
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
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0