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 #include <typeinfo>
33 
34 class SiStripFecCabling;
35 class SiStripDetCabling;
36 class SiStripPedestals;
37 class SiStripNoises;
38 class SiStripQuality;
39 class SiStripThreshold;
40 class DcuDetIdMap;
41 class SiStripApvGain;
42 class SiStripLatency;
43 class TrackerTopology;
44 
46 
47  public:
48 
49  // Typedefs
50  typedef std::pair<uint32_t,FedChannelConnection> pair_apvpairconn;
51  typedef std::vector<pair_apvpairconn> v_apvpairconn;
52  typedef std::pair<uint32_t, v_apvpairconn> pair_detcon;
53  typedef std::vector<pair_detcon> trackercon;
54 
55  typedef std::vector<pair_detcon>::iterator i_trackercon;
56  typedef std::vector<pair_apvpairconn>::iterator i_apvpairconn;
57 
58 
61  const edm::ActivityRegistry&);
63 
65 
67  inline const SiStripDbParams& dbParams() const {return db_->dbParams();}
68 
71  void buildCondObj();
73  const SiStripDetCabling& det_cabling);
75  void buildFECRelatedObjects( SiStripConfigDb* const db, const trackercon& tc);
76  void buildFEDRelatedObjects( SiStripConfigDb* const db, const trackercon& tc);
77 
78 
79  bool checkForCompatibility(std::stringstream& input,std::stringstream& output,std::string& label);
80  std::string getConfigString(const std::type_info& typeInfo);
81 
89 
90  void getValue(SiStripFedCabling* & val){ val = getFedCabling();}
91  void getValue(SiStripPedestals * & val){ val = getPedestals(); }
92  void getValue(SiStripNoises * & val){ val = getNoises(); }
93  void getValue(SiStripThreshold * & val){ val = getThreshold(); }
94  void getValue(SiStripQuality * & val){ val = getQuality(); }
95  void getValue(SiStripBadStrip * & val){ val = new SiStripBadStrip(* (const SiStripBadStrip*) getQuality()); }
96  void getValue( SiStripApvGain*& val ){ val = getApvGain(); }
97  void getValue( SiStripLatency*& val ){ val = getApvLatency(); }
98 
99 
100  protected:
101 
102  void checkUpdate();
103 
105  // Build and retrieve SiStripConfigDb object using service
107 
117 
118 
119  //methods used by BuildStripRelatedObjects
122  // bool setValuesCabling(SiStripConfigDb* const db, FedChannelConnection &ipair, uint32_t detid);
123  bool setValuesCabling(SiStripConfigDb::FedDescriptionsRange &descriptions, FedChannelConnection &ipair, uint32_t detid);
126  vector<uint32_t> retrieveActiveDetIds(const SiStripDetCabling& det_cabling);
127  vector<const FedChannelConnection *> buildConnections(const SiStripDetCabling& det_cabling, uint32_t det_id );
128  uint16_t retrieveNumberAPVPairs(uint32_t det_id);
129 
130  //set and store data
131  void setDefaultValuesCabling(uint16_t apvPair);
133  void setDefaultValuesApvLatency(SiStripLatency & latency_, const FedChannelConnection& ipair, uint32_t detid, uint16_t apvnr);
134  void storePedestals(uint32_t det_id);
135  void storeNoise(uint32_t det_id);
136  void storeThreshold(uint32_t det_id);
137  void storeQuality(uint32_t det_id);
138  void storeTiming(uint32_t det_id);
139 
140 
141  // cfi input parameters
151  bool m_usefed;
152  bool m_usefec;
153  bool m_debug;
154 
155  //Data containers
162 
163 
164  // Tracker Cabling objects
169 
170  };
171 #endif // OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
172 
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.
std::string getConfigString(const std::type_info &typeInfo)
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