2 #ifndef OnlineDB_SiStripConfigDb_SiStripConfigDb_h 3 #define OnlineDB_SiStripConfigDb_SiStripConfigDb_h 5 #define DATABASE // Needed by DeviceFactory API! Do not comment! 17 #include "DeviceFactory.h" 18 #include "boost/range/iterator_range.hpp" 19 #include "boost/cstdint.hpp" 38 namespace cms {
class SiStripO2O; }
84 friend class SiStripCommissioningDbClient;
88 friend class FedCablingHistosUsingDb;
102 friend class testSiStripConfigDb;
130 typedef boost::iterator_range<FedIds::const_iterator>
FedIdsRange;
141 typedef CommissioningAnalysisDescription::commissioningType
AnalysisType;
174 void openDbConnection();
177 void closeDbConnection();
183 inline bool usingDb()
const;
186 DeviceFactory*
const deviceFactory(
std::string method_name =
"" )
const;
189 DbClient*
const databaseCache(
std::string method_name =
"" )
const;
210 void runs( Runs& )
const;
213 void runs(
const Runs&
in,
218 void runs(
const Runs&
in,
219 RunsByPartition&
out,
223 void partitions( std::list<std::string>& )
const;
232 FedConnectionsRange getFedConnections(
std::string partition =
"" );
235 void addFedConnections(
std::string partition, FedConnectionsV& );
238 void uploadFedConnections(
std::string partition =
"" );
241 void clearFedConnections(
std::string partition =
"" );
244 void printFedConnections(
std::string partition =
"" );
251 DeviceDescriptionsRange getDeviceDescriptions(
std::string partition =
"" );
255 DeviceDescriptionsRange getDeviceDescriptions( DeviceType,
std::string partition =
"" );
258 void addDeviceDescriptions(
std::string partition, DeviceDescriptionsV& );
261 void uploadDeviceDescriptions(
std::string partition =
"" );
264 void clearDeviceDescriptions(
std::string partition =
"" );
267 void printDeviceDescriptions(
std::string partition =
"" );
277 FedDescriptionsRange getFedDescriptions(
std::string partition =
"" );
280 void addFedDescriptions(
std::string partition, FedDescriptionsV& );
283 void uploadFedDescriptions(
std::string partition =
"" );
286 void clearFedDescriptions(
std::string partition =
"" );
289 void printFedDescriptions(
std::string partition =
"" );
292 FedIdsRange getFedIds(
std::string partition =
"" );
295 inline bool usingStrips()
const;
298 inline void usingStrips(
bool );
305 DcuDetIdsRange getDcuDetIds(
std::string partition =
"" );
308 void addDcuDetIds(
std::string partition, DcuDetIdsV& );
311 void uploadDcuDetIds(
std::string partition =
"" );
320 static DcuDetIdsV::const_iterator findDcuDetId( DcuDetIdsV::const_iterator
begin,
321 DcuDetIdsV::const_iterator
end,
325 static DcuDetIdsV::iterator findDcuDetId( DcuDetIdsV::iterator
begin,
326 DcuDetIdsV::iterator
end,
334 AnalysisDescriptionsRange getAnalysisDescriptions( AnalysisType,
std::string partition =
"" );
337 void addAnalysisDescriptions(
std::string partition, AnalysisDescriptionsV& );
340 void uploadAnalysisDescriptions(
bool calibration_for_physics =
false,
std::string partition =
"" );
343 void clearAnalysisDescriptions(
std::string partition =
"" );
346 void printAnalysisDescriptions(
std::string partition =
"" );
362 void clearLocalCache();
365 void usingDatabase();
368 void usingDatabaseCache();
371 void usingXmlFiles();
374 void handleException(
const std::string& method_name,
381 std::string deviceType(
const enumDeviceType& device_type )
const;
383 void clone(
const DcuDetIdMap&
in, DcuDetIdsV&
out )
const;
385 void clone(
const DcuDetIdsV&
in, DcuDetIdMap&
out )
const;
387 void clone(
const DcuDetIdsV&
in, DcuDetIdsV&
out )
const;
480 #endif // OnlineDB_SiStripConfigDb_SiStripConfigDb_h
DeviceDescriptionsV apvDevices_
DeviceDescriptionsV typedDevices_
DeviceDescriptionsV dohDevices_
DcuDetIds::range DcuDetIdsRange
DeviceDescriptionsV lldDevices_
static const uint16_t FEC_RING_OFFSET
edm::MapOfVectors< std::string, DcuDetId > DcuDetIds
AnalysisDescriptions analyses_
FedDescriptions::range FedDescriptionsRange
std::map< std::string, Runs > RunsByPartition
std::vector< uint16_t > FedIds
Constants and enumerated type for sistrip::RunType.
Extension to SiStripConfigDb to map PSU channels to DetIDs using DCU-PSU map and DCU-DetID map...
ConnectionDescription FedConnection
FedConnections connections_
DeviceDescriptionsV pllDevices_
Class which reads a root file containing "commissioning histograms", analyzes the histograms to extra...
FedConnections::range FedConnectionsRange
edm::MapOfVectors< std::string, FedDescription * > FedDescriptions
DeviceDescriptionsV dcuDevices_
enumDeviceType DeviceType
edm::MapOfVectors< std::string, DeviceDescription * > DeviceDescriptions
CommissioningAnalysisDescription AnalysisDescription
DeviceDescriptions::range DeviceDescriptionsRange
edm::MapOfVectors< std::string, AnalysisDescription * > AnalysisDescriptions
An interface class to the DeviceFactory.
static std::atomic< uint32_t > cntr_
Container class for database partition parameters.
Fed9U::Fed9UDescription FedDescription
deviceDescription DeviceDescription
std::map< sistrip::RunType, Runs > RunsByType
std::vector< DcuDetId > DcuDetIdsV
const SiStripDbParams & dbParams() const
AnalysisDescriptions::range AnalysisDescriptionsRange
Container class for database connection parameters.
CommissioningAnalysisDescription::commissioningType AnalysisType
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
edm::MapOfVectors< std::string, FedConnection * > FedConnections
boost::iterator_range< FedIds::const_iterator > FedIdsRange
Sgi::hash_map< unsigned long, TkDcuInfo * > DcuDetIdMap
DeviceDescriptionsV muxDevices_
DeviceDescriptions devices_
SiStripDbParams dbParams_
std::vector< AnalysisDescription * > AnalysisDescriptionsV
static const uint16_t FEC_CRATE_OFFSET
static std::atomic< bool > allowCalibUpload_
boost::iterator_range< data_iterator > range
std::vector< FedConnection * > FedConnectionsV
std::vector< FedDescription * > FedDescriptionsV
void reset(double vett[256])
std::vector< DeviceDescription * > DeviceDescriptionsV
std::pair< uint32_t, TkDcuInfo * > DcuDetId