CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/CalibTracker/SiPixelConnectivity/interface/PixelToLNKAssociateFromAscii.h

Go to the documentation of this file.
00001 #ifndef PixelToLNKAssociateFromAscii_H
00002 #define PixelToLNKAssociateFromAscii_H
00003 
00009 #include <vector>
00010 #include <string>
00011 #include <map>
00012 
00013 #include "CalibTracker/SiPixelConnectivity/interface/TRange.h"
00014 #include "CalibTracker/SiPixelConnectivity/interface/PixelToFEDAssociate.h"
00015 
00016 class PixelBarrelName;
00017 class PixelEndcapName;
00018 class PixelModuleName;
00019 
00020 class PixelToLNKAssociateFromAscii : public PixelToFEDAssociate {
00021 public:
00022 
00023   typedef PixelToFEDAssociate::CablingRocId CablingRocId;
00024   typedef PixelToFEDAssociate::DetectorRocId DetectorRocId;
00025 
00026   PixelToLNKAssociateFromAscii(const std::string & fileName);
00027 
00028   virtual const CablingRocId * operator()(const DetectorRocId& roc) const;
00029 
00031   virtual std::string version() const;
00032 
00033 private:
00034   typedef TRange<int> Range; 
00035 
00037   void init( const std::string & fileName);
00038   void addConnections( int fedId, int linkId, std::string module, Range rocDetIds);
00039 
00040 
00041   std::string theVersion;
00042   std::vector< std::pair<DetectorRocId,CablingRocId> > theConnection;
00043 
00044   Range readRange( const std::string &) const;
00045     
00046 };
00047 #endif