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 class TrackerTopology;
43 
45 
46  public:
47 
48  // Typedefs
49  typedef std::pair<uint32_t,FedChannelConnection> pair_apvpairconn;
50  typedef std::vector<pair_apvpairconn> v_apvpairconn;
51  typedef std::pair<uint32_t, v_apvpairconn> pair_detcon;
52  typedef std::vector<pair_detcon> trackercon;
53 
54  typedef std::vector<pair_detcon>::iterator i_trackercon;
55  typedef std::vector<pair_apvpairconn>::iterator i_apvpairconn;
56 
57 
60  const edm::ActivityRegistry&);
62 
64 
66  inline const SiStripDbParams& dbParams() const {return db_->dbParams();}
67 
70  void buildCondObj();
72  const SiStripDetCabling& det_cabling);
74  void buildFECRelatedObjects( SiStripConfigDb* const db, const trackercon& tc);
75  void buildFEDRelatedObjects( SiStripConfigDb* const db, const trackercon& tc);
76 
77 
78  bool checkForCompatibility(std::stringstream& input,std::stringstream& output,std::string& label);
79 
87 
88  void getValue(SiStripFedCabling* & val){ val = getFedCabling();}
89  void getValue(SiStripPedestals * & val){ val = getPedestals(); }
90  void getValue(SiStripNoises * & val){ val = getNoises(); }
91  void getValue(SiStripThreshold * & val){ val = getThreshold(); }
92  void getValue(SiStripQuality * & val){ val = getQuality(); }
93  void getValue(SiStripBadStrip * & val){ val = new SiStripBadStrip(* (const SiStripBadStrip*) getQuality()); }
94  void getValue( SiStripApvGain*& val ){ val = getApvGain(); }
95  void getValue( SiStripLatency*& val ){ val = getApvLatency(); }
96 
97 
98  protected:
99 
100  void checkUpdate();
101 
103  // Build and retrieve SiStripConfigDb object using service
105 
115 
116 
117  //methods used by BuildStripRelatedObjects
120  // bool setValuesCabling(SiStripConfigDb* const db, FedChannelConnection &ipair, uint32_t detid);
124  vector<uint32_t> retrieveActiveDetIds(const SiStripDetCabling& det_cabling);
125  vector<const FedChannelConnection *> buildConnections(const SiStripDetCabling& det_cabling, uint32_t det_id );
126  uint16_t retrieveNumberAPVPairs(uint32_t det_id);
127 
128  //set and store data
129  void setDefaultValuesCabling(uint16_t apvPair);
131  void setDefaultValuesApvLatency(SiStripLatency & latency_, const FedChannelConnection& ipair, uint32_t detid, uint16_t apvnr);
132  void storePedestals(uint32_t det_id);
133  void storeNoise(uint32_t det_id);
134  void storeThreshold(uint32_t det_id);
135  void storeQuality(uint32_t det_id);
136  void storeTiming(uint32_t det_id);
137 
138 
139  // cfi input parameters
149  bool m_usefed;
150  bool m_usefec;
151  bool m_debug;
152 
153  //Data containers
160 
161 
162  // Tracker Cabling objects
167 
168  };
169 
170 #endif // OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
171 
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:43
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