CMS 3D CMS Logo

SiStripDetCabling.h

Go to the documentation of this file.
00001 #ifndef SiStripObjects_SiStripDetCabling_h
00002 #define SiStripObjects_SiStripDetCabling_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     CalibFormats/SiStripObjects
00006 // Class  :     SiStripDetCabling
00011 // Original Author:  dkcira
00012 //         Created:  Wed Mar 22 12:24:20 CET 2006
00013 // $Id: SiStripDetCabling.h,v 1.6 2007/11/19 15:35:45 giordano Exp $
00014 #include "CondFormats/SiStripObjects/interface/SiStripFedCabling.h"
00015 #include "CondFormats/SiStripObjects/interface/FedChannelConnection.h"
00016 #include <boost/cstdint.hpp>
00017 #include <vector>
00018 #include <map>
00019 class SiStripDetCabling
00020 {
00021   public:
00022     SiStripDetCabling();
00023     virtual ~SiStripDetCabling();
00024     SiStripDetCabling(const SiStripFedCabling &);
00025     void addDevices(const FedChannelConnection &, std::map< uint32_t, std::vector<FedChannelConnection> >&);
00026     void addDevices(const FedChannelConnection &); // special case of above addDevices
00027     // getters
00028     inline const  std::map< uint32_t, std::vector<FedChannelConnection> >& getDetCabling() const { return fullcabling_; }
00029     // for DQM use: all detectors that have at least one connected APV
00030     void  addActiveDetectorsRawIds(std::vector<uint32_t> &) const;                    // add to vector Ids of connected modules (active == connected)
00031     void  addAllDetectorsRawIds(std::vector<uint32_t> & vector_to_fill_with_detids ) const; // add to vector Ids of all modules
00032     void  getAllDetectorsContiguousIds(std::map<uint32_t, unsigned int>&) const;    // map of all connected, detected, undetected to contiguous Ids - map is reset first!
00033     void  getActiveDetectorsContiguousIds(std::map<uint32_t, unsigned int>&) const; // map of all connected to contiguous Ids - map is reset first!
00034     // for RECO use
00035     void  addConnected ( std::map<uint32_t, std::vector<int> > &) const; // map of detector to list of APVs for APVs seen from FECs and FEDs
00036     void  addDetected  ( std::map<uint32_t, std::vector<int> > &) const; // map of detector to list of APVs for APVs seen from FECs but not from FEDs
00037     void  addUnDetected( std::map<uint32_t, std::vector<int> > &) const; // map of detector to list of APVs for APVs seen neither from FECS or FEDs
00038     void  addNotConnectedAPVs( std::map<uint32_t, std::vector<int> > &) const; // map of detector to list of APVs that are not connected - combination of addDetected and addUnDetected
00039     // other
00040     const std::vector<FedChannelConnection>& getConnections( uint32_t det_id ) const;
00041     const FedChannelConnection& getConnection( uint32_t det_id, unsigned short apv_pair ) const;
00042     const unsigned int getDcuId( uint32_t det_id ) const;
00043     const uint16_t nApvPairs(uint32_t det_id) const; // maximal nr. of apvpairs a detector can have (2 or 3)
00044     bool IsConnected(const uint32_t& det_id) const;
00045     bool IsDetected(const uint32_t& det_id) const;
00046     bool IsUndetected(const uint32_t& det_id) const;
00047 
00048   private:
00049     SiStripDetCabling(const SiStripDetCabling&); // stop default
00050     const SiStripDetCabling& operator=(const SiStripDetCabling&); // stop default
00051     void addFromSpecificConnection( std::map<uint32_t, std::vector<int> > & , const std::map< uint32_t, std::vector<int> >  &) const;
00052     bool IsInMap(const uint32_t& det_id, const std::map<uint32_t, std::vector<int> > &) const;
00053     
00054     // ---------- member data --------------------------------
00055   private:
00056     // map of KEY=detid DATA=vector<FedChannelConnection> 
00057     std::map< uint32_t, std::vector<FedChannelConnection> > fullcabling_;
00058     // map of KEY=detid DATA=vector of apvs, maximum 6 APVs per detector module : 0,1,2,3,4,5
00059     std::map< uint32_t, std::vector<int> > connected_; // seen from FECs and FEDs
00060     std::map< uint32_t, std::vector<int> > detected_; // seen from FECs but not from FEDs
00061     std::map< uint32_t, std::vector<int> > undetected_; // seen from neither FECs or FEDs, DetIds inferred from static Look-Up-Table in the configuration database
00062 };
00063 #endif

Generated on Tue Jun 9 17:25:26 2009 for CMSSW by  doxygen 1.5.4