CablingRocId

DetectorRocId

PixelToFEDAssociate

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#ifndef PixelToFEDAssociate_H
#define PixelToFEDAssociate_H

/** \class PixelToFEDAssociate
 *  Check to which FED pixel module belongs to.
 *  The associacions are read from the datafile
 */

#include <string>

#include "DataFormats/SiPixelDetId/interface/PixelModuleName.h"

class PixelToFEDAssociate {
public:
  struct CablingRocId {
    int fedId;
    int linkId;
    int rocLinkId;
  };
  struct DetectorRocId {
    const PixelModuleName *module;
    int rocDetId;
  };

  virtual ~PixelToFEDAssociate() {}

  /// version
  virtual std::string version() const = 0;

  /// FED id for module
  virtual int operator()(const PixelModuleName &) const { return 0; }

  /// LNK id for module
  virtual const CablingRocId *operator()(const DetectorRocId &roc) const { return nullptr; }
};
#endif