CTPPSPixelDAQMapping

CTPPSPixelROCInfo

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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
/****************************************************************************
 *
 * 
 * Authors: 
 *   F.Ferro ferro@ge.infn.it
 *
 ****************************************************************************/

#ifndef CondFormats_PPSObjects_CTPPSPixelDAQMapping
#define CondFormats_PPSObjects_CTPPSPixelDAQMapping

#include "CondFormats/Serialization/interface/Serializable.h"
#include "CondFormats/PPSObjects/interface/CTPPSPixelFramePosition.h"
#include "CondFormats/PPSObjects/interface/CTPPSPixelIndices.h"

#include <map>
#include <set>

//----------------------------------------------------------------------------------------------------

/**
 *\brief Contains mappind data related to a ROC.
 */
class CTPPSPixelROCInfo {
public:
  /// the symbolic id
  uint32_t iD;

  unsigned int roc;

  friend std::ostream &operator<<(std::ostream &s, const CTPPSPixelROCInfo &fp);

  COND_SERIALIZABLE;
};

//----------------------------------------------------------------------------------------------------

/**
 *\brief The mapping between FramePosition and ROCInfo.
 */
class CTPPSPixelDAQMapping {
public:
  std::map<CTPPSPixelFramePosition, CTPPSPixelROCInfo> ROCMapping;

  void insert(const CTPPSPixelFramePosition &fp, const CTPPSPixelROCInfo &vi);

  std::set<unsigned int> fedIds() const;

  COND_SERIALIZABLE;
};

#endif