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;
103 friend class testSiStripConfigDb;
131 typedef boost::iterator_range<FedIds::const_iterator>
FedIdsRange;
142 typedef CommissioningAnalysisDescription::commissioningType
AnalysisType;
175 void openDbConnection();
178 void closeDbConnection();
184 inline bool usingDb()
const;
187 DeviceFactory*
const deviceFactory(
std::string method_name =
"" )
const;
190 DbClient*
const databaseCache(
std::string method_name =
"" )
const;
211 void runs( Runs& )
const;
214 void runs(
const Runs&
in,
219 void runs(
const Runs&
in,
220 RunsByPartition&
out,
224 void partitions( std::list<std::string>& )
const;
233 FedConnectionsRange getFedConnections(
std::string partition =
"" );
236 void addFedConnections(
std::string partition, FedConnectionsV& );
239 void uploadFedConnections(
std::string partition =
"" );
242 void clearFedConnections(
std::string partition =
"" );
245 void printFedConnections(
std::string partition =
"" );
252 DeviceDescriptionsRange getDeviceDescriptions(
std::string partition =
"" );
256 DeviceDescriptionsRange getDeviceDescriptions( DeviceType,
std::string partition =
"" );
259 void addDeviceDescriptions(
std::string partition, DeviceDescriptionsV& );
262 void uploadDeviceDescriptions(
std::string partition =
"" );
265 void clearDeviceDescriptions(
std::string partition =
"" );
268 void printDeviceDescriptions(
std::string partition =
"" );
278 FedDescriptionsRange getFedDescriptions(
std::string partition =
"" );
281 void addFedDescriptions(
std::string partition, FedDescriptionsV& );
284 void uploadFedDescriptions(
std::string partition =
"" );
287 void clearFedDescriptions(
std::string partition =
"" );
290 void printFedDescriptions(
std::string partition =
"" );
293 FedIdsRange getFedIds(
std::string partition =
"" );
296 inline bool usingStrips()
const;
299 inline void usingStrips(
bool );
306 DcuDetIdsRange getDcuDetIds(
std::string partition =
"" );
309 void addDcuDetIds(
std::string partition, DcuDetIdsV& );
312 void uploadDcuDetIds(
std::string partition =
"" );
321 static DcuDetIdsV::const_iterator findDcuDetId( DcuDetIdsV::const_iterator
begin,
322 DcuDetIdsV::const_iterator
end,
326 static DcuDetIdsV::iterator findDcuDetId( DcuDetIdsV::iterator
begin,
327 DcuDetIdsV::iterator
end,
335 AnalysisDescriptionsRange getAnalysisDescriptions( AnalysisType,
std::string partition =
"" );
338 void addAnalysisDescriptions(
std::string partition, AnalysisDescriptionsV& );
341 void uploadAnalysisDescriptions(
bool calibration_for_physics =
false,
std::string partition =
"" );
344 void clearAnalysisDescriptions(
std::string partition =
"" );
347 void printAnalysisDescriptions(
std::string partition =
"" );
363 void clearLocalCache();
366 void usingDatabase();
369 void usingDatabaseCache();
372 void usingXmlFiles();
375 void handleException(
const std::string& method_name,
382 std::string deviceType(
const enumDeviceType& device_type )
const;
384 void clone(
const DcuDetIdMap&
in, DcuDetIdsV&
out )
const;
386 void clone(
const DcuDetIdsV&
in, DcuDetIdMap&
out )
const;
388 void clone(
const DcuDetIdsV&
in, DcuDetIdsV&
out )
const;
481 #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
Namespace of DDCMS conversion namespace.
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