Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:59:31

0001 #ifndef PixelToFEDAssociate_H
0002 #define PixelToFEDAssociate_H
0003 
0004 /** \class PixelToFEDAssociate
0005  *  Check to which FED pixel module belongs to.
0006  *  The associacions are read from the datafile
0007  */
0008 
0009 #include <string>
0010 
0011 #include "DataFormats/SiPixelDetId/interface/PixelModuleName.h"
0012 
0013 class PixelToFEDAssociate {
0014 public:
0015   struct CablingRocId {
0016     int fedId;
0017     int linkId;
0018     int rocLinkId;
0019   };
0020   struct DetectorRocId {
0021     const PixelModuleName *module;
0022     int rocDetId;
0023   };
0024 
0025   virtual ~PixelToFEDAssociate() {}
0026 
0027   /// version
0028   virtual std::string version() const = 0;
0029 
0030   /// FED id for module
0031   virtual int operator()(const PixelModuleName &) const { return 0; }
0032 
0033   /// LNK id for module
0034   virtual const CablingRocId *operator()(const DetectorRocId &roc) const { return nullptr; }
0035 };
0036 #endif