ATLAS Offline Software
ArrayScanner.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: ArrayScanner.icc,v 1.1 2009-03-20 20:44:37 ssnyder Exp $
6 /**
7  * @file ArrayScanner.icc
8  * @author scott snyder <snyder@bnl.gov>
9  * @date June, 2004
10  * @brief Helper class for converting strings to Array's
11  * (template definitions).
12  */
13 
14 
15 namespace CaloRec {
16 
17 
18 /**
19  * @brief Read number.
20  * @param elt[out] The number read.
21  * @return True if successful.
22  *
23  * Consume any white space at the head of the stream.
24  * If we're then looking at a number that can be converted to type @c T,
25  * read it and return true. The value is returned in @a elt.
26  * If there's a comma following it, consume that too.
27  * Otherwise, return false.
28  */
29 template <class T>
30 bool ArrayScanner::at_num (T& elt)
31 {
32  m_is >> elt;
33  return at_num_common();
34 }
35 
36 
37 } // namespace CaloRec
38 
39