test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SurveyInputTextReader.h
Go to the documentation of this file.
1 #ifndef SurveyInputTextReader_h
2 #define SurveyInputTextReader_h
3 //
4 // Class to read in survey data from text file
5 //
6 // The format of the file is assumed to be:
7 //
8 // DetId AlignableObjectId dx sigma_x dy sigma_y dz sigma_z angle_x sigma(angle_x) ...
9 // angle_y sigma(angle_y) angle_z sigma(angle_z)
10 // Where all numbers are floats, except DetId which is an unsigned integer
11 //
12 // The result is a map of UniqueIds and corresponding SurveyInfo
13 //
14 
17 
19 {
20 public:
21 
22  typedef std::pair<align::ID, align::StructureType> UniqueId;
23 
24  typedef std::map<UniqueId, align::Scalars> MapType;
25  typedef std::pair<UniqueId, align::Scalars> PairType;
26 
28  void readFile( const std::string& textFileName );
29 
30  // Returns the Map
31  const MapType& UniqueIdMap() const { return theMap; }
32 
33 private:
34 
36 
37  static const int NINPUTS = 27; // Not including DetId
38 
39 };
40 
41 #endif
void readFile(const std::string &textFileName)
Read given text file.
std::map< UniqueId, align::Scalars > MapType
const MapType & UniqueIdMap() const
std::pair< UniqueId, align::Scalars > PairType
std::pair< align::ID, align::StructureType > UniqueId