File indexing completed on 2024-04-06 11:59:31
0001 #ifndef PixelToLNKAssociateFromAscii_H
0002 #define PixelToLNKAssociateFromAscii_H
0003
0004
0005
0006
0007
0008
0009 #include <vector>
0010 #include <string>
0011 #include <map>
0012
0013 #include "CalibTracker/SiPixelConnectivity/interface/TRange.h"
0014 #include "CalibTracker/SiPixelConnectivity/interface/PixelToFEDAssociate.h"
0015
0016 class PixelBarrelName;
0017 class PixelEndcapName;
0018 class PixelModuleName;
0019
0020 class PixelToLNKAssociateFromAscii : public PixelToFEDAssociate {
0021 public:
0022 typedef PixelToFEDAssociate::CablingRocId CablingRocId;
0023 typedef PixelToFEDAssociate::DetectorRocId DetectorRocId;
0024
0025 PixelToLNKAssociateFromAscii(const std::string& fileName, const bool phase1 = false);
0026
0027 const CablingRocId* operator()(const DetectorRocId& roc) const override;
0028
0029
0030 std::string version() const override;
0031
0032 private:
0033 typedef TRange<int> Range;
0034
0035
0036 void init(const std::string& fileName);
0037 void addConnections(int fedId, int linkId, std::string module, Range rocDetIds);
0038 std::string theVersion;
0039 std::vector<std::pair<DetectorRocId, CablingRocId> > theConnection;
0040 Range readRange(const std::string&) const;
0041 bool phase1_;
0042 };
0043 #endif