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 // Last commit: $Id: SiStripCondObjBuilderFromDb.h,v 1.11 2011/09/19 08:32:24 demattia Exp $
2 // Latest tag: $Name: CMSSW_5_3_11_patch3 $
3 // Location: $Source: /local/reps/CMSSW/CMSSW/OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h,v $
4 
5 #ifndef OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
6 #define OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
7 
13 
14 
31 
32 #include "boost/cstdint.hpp"
33 #include <vector>
34 #include <string>
35 
36 class SiStripFecCabling;
37 class SiStripDetCabling;
38 class SiStripPedestals;
39 class SiStripNoises;
40 class SiStripQuality;
41 class SiStripThreshold;
42 class DcuDetIdMap;
43 class SiStripApvGain;
44 class SiStripLatency;
45 
47 
48  public:
49 
50  // Typedefs
51  typedef std::pair<uint32_t,FedChannelConnection> pair_apvpairconn;
52  typedef std::vector<pair_apvpairconn> v_apvpairconn;
53  typedef std::pair<uint32_t, v_apvpairconn> pair_detcon;
54  typedef std::vector<pair_detcon> trackercon;
55 
56  typedef std::vector<pair_detcon>::iterator i_trackercon;
57  typedef std::vector<pair_apvpairconn>::iterator i_apvpairconn;
58 
59 
62  const edm::ActivityRegistry&);
64 
66  inline const SiStripDbParams& dbParams() const {return db_->dbParams();}
67 
70  void buildCondObj();
72  const SiStripDetCabling& det_cabling);
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_, 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
159 
160 
161  // Tracker Cabling objects
166 
167  };
168 
169 #endif // OnlineDB_SiStripESSources_SiStripCondObjBuilderFromDb_H
170 
vector< uint32_t > retrieveActiveDetIds(const SiStripDetCabling &det_cabling)
SiStripPedestals::InputVector inputPedestals
void getValue(SiStripNoises *&val)
void buildAnalysisRelatedObjects(SiStripConfigDb *const db, trackercon tc)
SiStripQuality::InputVector inputQuality
std::vector< uint16_t > InputVector
Definition: SiStripNoises.h:44
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)
edm::Service< SiStripConfigDb > db_
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.
uint16_t retrieveNumberAPVPairs(uint32_t det_id)
std::vector< pair_detcon > trackercon
void getValue(SiStripThreshold *&val)
std::vector< pair_apvpairconn > v_apvpairconn
void buildFECRelatedObjects(SiStripConfigDb *const db, trackercon tc)
void getValue(SiStripLatency *&val)
void getValue(SiStripBadStrip *&val)
vector< const FedChannelConnection * > buildConnections(const SiStripDetCabling &det_cabling, uint32_t det_id)
SiStripNoises::InputVector inputNoises
void buildFEDRelatedObjects(SiStripConfigDb *const db, trackercon tc)
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.
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
void setDefaultValuesApvLatency(SiStripLatency &latency_, FedChannelConnection ipair, uint32_t detid, uint16_t apvnr)
std::vector< pair_apvpairconn >::iterator i_apvpairconn
bool setValuesApvTiming(SiStripConfigDb *const db, FedChannelConnection &ipair)
Container InputVector