CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
20  typedef std::pair<align::ID, align::StructureType> UniqueId;
21 
22  typedef std::map<UniqueId, align::Scalars> MapType;
23  typedef std::pair<UniqueId, align::Scalars> PairType;
24 
26  void readFile(const std::string& textFileName);
27 
28  // Returns the Map
29  const MapType& UniqueIdMap() const { return theMap; }
30 
31 private:
33 
34  static const int NINPUTS = 27; // Not including DetId
35 };
36 
37 #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