CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/OnlineDB/SiStripESSources/interface/SiStripFedCablingBuilderFromDb.h

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripFedCablingBuilderFromDb.h,v 1.16 2008/04/30 08:15:33 bainbrid Exp $
00002 
00003 #ifndef OnlineDB_SiStripESSources_SiStripFedCablingBuilderFromDb_H
00004 #define OnlineDB_SiStripESSources_SiStripFedCablingBuilderFromDb_H
00005 
00006 #include "CalibTracker/SiStripESProducers/interface/SiStripFedCablingESProducer.h"
00007 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
00008 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
00009 #include "boost/cstdint.hpp"
00010 #include <vector>
00011 #include <string>
00012 
00013 class SiStripFedCablingRcd;
00014 class SiStripFedCabling;
00015 class SiStripFecCabling;
00016 class SiStripConfigDb;
00017 class TkDcuInfo;
00018 
00019 class SiStripFedCablingBuilderFromDb : public SiStripFedCablingESProducer, public edm::EventSetupRecordIntervalFinder {
00020   
00021  public:
00022 
00023   // -------------------- Constructors, destructors --------------------
00024 
00025   SiStripFedCablingBuilderFromDb( const edm::ParameterSet& );
00026   virtual ~SiStripFedCablingBuilderFromDb(); 
00027 
00028   // -------------------- Methods to build FED cabling --------------------
00029   
00031   virtual SiStripFedCabling* make( const SiStripFedCablingRcd& ); 
00032   
00033   // -------------------- Convert b/w FED and FEC cabling --------------------
00034   
00037   static void getFedCabling( const SiStripFecCabling& in, 
00038                              SiStripFedCabling& out );
00039   
00042   static void getFecCabling( const SiStripFedCabling& in, 
00043                              SiStripFecCabling& out );
00044   
00045   // -------------------- Methods to build FEC cabling --------------------
00046 
00050   static void buildFecCabling( SiStripConfigDb* const, 
00051                                SiStripFecCabling&, 
00052                                const sistrip::CablingSource& );
00053   
00057   static void buildFecCabling( SiStripConfigDb* const,
00058                                SiStripFecCabling& );
00059   
00063   static void buildFecCablingFromFedConnections( SiStripConfigDb* const,
00064                                                  SiStripFecCabling& );
00065   
00069   static void buildFecCablingFromDevices( SiStripConfigDb* const,
00070                                           SiStripFecCabling& );
00071   
00075   static void buildFecCablingFromDetIds( SiStripConfigDb* const,
00076                                          SiStripFecCabling& );
00077   
00078  protected:
00079   
00081   virtual void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&,
00082                                const edm::IOVSyncValue&,
00083                                edm::ValidityInterval& );
00084   
00086   static void assignDcuAndDetIds( SiStripFecCabling&,
00087                                   std::vector< std::pair<uint32_t,TkDcuInfo*> > );
00088   
00091   virtual void writeFedCablingToCondDb( const SiStripFedCabling& ) {;}
00092   
00094   SiStripConfigDb* db_;
00095   
00097   sistrip::CablingSource source_;
00098 
00099 };
00100 
00101 #endif // OnlineDB_SiStripESSources_SiStripFedCablingBuilderFromDb_H
00102