CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripCondObjBuilderFromDb.h
Go to the documentation of this file.
1 
2 #ifndef OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
3 #define OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
4 
10 
11 
28 
29 #include "boost/cstdint.hpp"
30 #include <vector>
31 #include <string>
32 
33 class SiStripFecCabling;
34 class SiStripDetCabling;
35 class SiStripPedestals;
36 class SiStripNoises;
37 class SiStripQuality;
38 class SiStripThreshold;
39 class DcuDetIdMap;
40 class SiStripApvGain;
41 class SiStripLatency;
42 
44 
45  public:
46 
47  // Typedefs
48  typedef std::pair<uint32_t,FedChannelConnection> pair_apvpairconn;
49  typedef std::vector<pair_apvpairconn> v_apvpairconn;
50  typedef std::pair<uint32_t, v_apvpairconn> pair_detcon;
51  typedef std::vector<pair_detcon> trackercon;
52 
53  typedef std::vector<pair_detcon>::iterator i_trackercon;
54  typedef std::vector<pair_apvpairconn>::iterator i_apvpairconn;
55 
56 
59  const edm::ActivityRegistry&);
61 
63  inline const SiStripDbParams& dbParams() const {return db_->dbParams();}
64 
67  void buildCondObj();
69  const SiStripDetCabling& det_cabling);
71  void buildFECRelatedObjects( SiStripConfigDb* const db, const trackercon& tc);
72  void buildFEDRelatedObjects( SiStripConfigDb* const db, const trackercon& tc);
73 
74 
75  bool checkForCompatibility(std::stringstream& input,std::stringstream& output,std::string& label);
76 
84 
85  void getValue(SiStripFedCabling* & val){ val = getFedCabling();}
86  void getValue(SiStripPedestals * & val){ val = getPedestals(); }
87  void getValue(SiStripNoises * & val){ val = getNoises(); }
88  void getValue(SiStripThreshold * & val){ val = getThreshold(); }
89  void getValue(SiStripQuality * & val){ val = getQuality(); }
90  void getValue(SiStripBadStrip * & val){ val = new SiStripBadStrip(* (const SiStripBadStrip*) getQuality()); }
91  void getValue( SiStripApvGain*& val ){ val = getApvGain(); }
92  void getValue( SiStripLatency*& val ){ val = getApvLatency(); }
93 
94 
95  protected:
96 
97  void checkUpdate();
98 
100  // Build and retrieve SiStripConfigDb object using service
102 
112 
113 
114  //methods used by BuildStripRelatedObjects
117  // bool setValuesCabling(SiStripConfigDb* const db, FedChannelConnection &ipair, uint32_t detid);
121  vector<uint32_t> retrieveActiveDetIds(const SiStripDetCabling& det_cabling);
122  vector<const FedChannelConnection *> buildConnections(const SiStripDetCabling& det_cabling, uint32_t det_id );
123  uint16_t retrieveNumberAPVPairs(uint32_t det_id);
124 
125  //set and store data
126  void setDefaultValuesCabling(uint16_t apvPair);
128  void setDefaultValuesApvLatency(SiStripLatency & latency_, const FedChannelConnection& ipair, uint32_t detid, uint16_t apvnr);
129  void storePedestals(uint32_t det_id);
130  void storeNoise(uint32_t det_id);
131  void storeThreshold(uint32_t det_id);
132  void storeQuality(uint32_t det_id);
133  void storeTiming(uint32_t det_id);
134 
135 
136  // cfi input parameters
146  bool m_usefed;
147  bool m_usefec;
148  bool m_debug;
149 
150  //Data containers
156 
157 
158  // Tracker Cabling objects
163 
164  };
165 
166 #endif // OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
167 
vector< uint32_t > retrieveActiveDetIds(const SiStripDetCabling &det_cabling)
SiStripPedestals::InputVector inputPedestals
void getValue(SiStripNoises *&val)
void buildAnalysisRelatedObjects(SiStripConfigDb *const db, const trackercon &tc)
SiStripQuality::InputVector inputQuality
std::vector< uint16_t > InputVector
Definition: SiStripNoises.h:51
std::pair< uint32_t, FedChannelConnection > pair_apvpairconn
tuple db
Definition: EcalCondDB.py:151
std::pair< uint32_t, v_apvpairconn > pair_detcon
FedDescriptions::range FedDescriptionsRange
SiStripThreshold::InputVector inputThreshold
void setDefaultValuesCabling(uint16_t apvPair)
static std::string const input
Definition: EdmProvDump.cc:44
edm::Service< SiStripConfigDb > db_
void buildFECRelatedObjects(SiStripConfigDb *const db, const trackercon &tc)
bool setValuesApvLatency(SiStripLatency &latency_, SiStripConfigDb *const db, FedChannelConnection &ipair, uint32_t detid, uint16_t apvnr, SiStripConfigDb::DeviceDescriptionsRange apvs)
bool retrieveFedDescriptions(SiStripConfigDb *const db)
void buildStripRelatedObjects(SiStripConfigDb *const db, const SiStripDetCabling &det_cabling)
bool checkForCompatibility(std::stringstream &input, std::stringstream &output, std::string &label)
std::vector< uint16_t > InputVector
void getValue(SiStripQuality *&val)
Class containning control, module, detector and connection information, at the level of a FED channel...
DeviceDescriptions::range DeviceDescriptionsRange
void getValue(SiStripFedCabling *&val)
An interface class to the DeviceFactory.
void buildFEDRelatedObjects(SiStripConfigDb *const db, const trackercon &tc)
uint16_t retrieveNumberAPVPairs(uint32_t det_id)
std::vector< pair_detcon > trackercon
void getValue(SiStripThreshold *&val)
std::vector< pair_apvpairconn > v_apvpairconn
void getValue(SiStripLatency *&val)
void getValue(SiStripBadStrip *&val)
vector< const FedChannelConnection * > buildConnections(const SiStripDetCabling &det_cabling, uint32_t det_id)
SiStripNoises::InputVector inputNoises
const SiStripDbParams & dbParams() const
bool setValuesCabling(SiStripConfigDb::FedDescriptionsRange &descriptions, FedChannelConnection &ipair, uint32_t detid)
const SiStripDbParams & dbParams() const
bool retrieveTimingAnalysisDescriptions(SiStripConfigDb *const db)
void getValue(SiStripApvGain *&val)
Container class for database connection parameters.
void setDefaultValuesApvLatency(SiStripLatency &latency_, const FedChannelConnection &ipair, uint32_t detid, uint16_t apvnr)
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
SiStripApvGain::InputVector inputApvGain
std::vector< float > InputVector
void getValue(SiStripPedestals *&val)
std::vector< pair_detcon >::iterator i_trackercon
std::vector< pair_apvpairconn >::iterator i_apvpairconn
bool setValuesApvTiming(SiStripConfigDb *const db, FedChannelConnection &ipair)
Container InputVector