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" 77 friend class SiStripCommissioningDbClient;
81 friend class FedCablingHistosUsingDb;
96 friend class testSiStripConfigDb;
121 typedef boost::iterator_range<FedIds::const_iterator>
FedIdsRange;
131 typedef CommissioningAnalysisDescription::commissioningType
AnalysisType;
160 void openDbConnection();
163 void closeDbConnection();
169 inline bool usingDb()
const;
172 DeviceFactory*
const deviceFactory(
std::string method_name =
"")
const;
175 DbClient*
const databaseCache(
std::string method_name =
"")
const;
194 void runs(Runs&)
const;
203 void partitions(std::list<std::string>&)
const;
210 FedConnectionsRange getFedConnections(
std::string partition =
"");
213 void addFedConnections(
std::string partition, FedConnectionsV&);
216 void uploadFedConnections(
std::string partition =
"");
219 void clearFedConnections(
std::string partition =
"");
222 void printFedConnections(
std::string partition =
"");
227 DeviceDescriptionsRange getDeviceDescriptions(
std::string partition =
"");
231 DeviceDescriptionsRange getDeviceDescriptions(DeviceType,
std::string partition =
"");
234 void addDeviceDescriptions(
std::string partition, DeviceDescriptionsV&);
237 void uploadDeviceDescriptions(
std::string partition =
"");
240 void clearDeviceDescriptions(
std::string partition =
"");
243 void printDeviceDescriptions(
std::string partition =
"");
251 FedDescriptionsRange getFedDescriptions(
std::string partition =
"");
254 void addFedDescriptions(
std::string partition, FedDescriptionsV&);
257 void uploadFedDescriptions(
std::string partition =
"");
260 void clearFedDescriptions(
std::string partition =
"");
263 void printFedDescriptions(
std::string partition =
"");
269 inline bool usingStrips()
const;
272 inline void usingStrips(
bool);
277 DcuDetIdsRange getDcuDetIds(
std::string partition =
"");
280 void addDcuDetIds(
std::string partition, DcuDetIdsV&);
292 static DcuDetIdsV::const_iterator findDcuDetId(DcuDetIdsV::const_iterator
begin,
293 DcuDetIdsV::const_iterator
end,
297 static DcuDetIdsV::iterator findDcuDetId(DcuDetIdsV::iterator
begin, DcuDetIdsV::iterator
end, uint32_t dcu_id);
302 AnalysisDescriptionsRange getAnalysisDescriptions(AnalysisType,
std::string partition =
"");
305 void addAnalysisDescriptions(
std::string partition, AnalysisDescriptionsV&);
308 void uploadAnalysisDescriptions(
bool calibration_for_physics =
false,
std::string partition =
"");
311 void clearAnalysisDescriptions(
std::string partition =
"");
314 void printAnalysisDescriptions(
std::string partition =
"");
326 void clearLocalCache();
329 void usingDatabase();
332 void usingDatabaseCache();
335 void usingXmlFiles();
344 std::string deviceType(
const enumDeviceType& device_type)
const;
346 void clone(
const DcuDetIdMap&
in, DcuDetIdsV&
out)
const;
348 void clone(
const DcuDetIdsV&
in, DcuDetIdMap&
out)
const;
350 void clone(
const DcuDetIdsV&
in, DcuDetIdsV&
out)
const;
432 #endif // OnlineDB_SiStripConfigDb_SiStripConfigDb_h
DeviceDescriptionsV apvDevices_
DeviceDescriptionsV typedDevices_
DeviceDescriptionsV dohDevices_
DcuDetIds::range DcuDetIdsRange
DeviceDescriptionsV lldDevices_
static const uint16_t FEC_RING_OFFSET
AnalysisDescriptions analyses_
Sgi::hash_map< unsigned long, TkDcuInfo * > DcuDetIdMap
FedDescriptions::range FedDescriptionsRange
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...
std::map< std::string, Runs > RunsByPartition
ConnectionDescription FedConnection
edm::MapOfVectors< std::string, DeviceDescription * > DeviceDescriptions
FedConnections connections_
DeviceDescriptionsV pllDevices_
Class which reads a root file containing "commissioning histograms", analyzes the histograms to extra...
edm::MapOfVectors< std::string, DcuDetId > DcuDetIds
FedConnections::range FedConnectionsRange
DeviceDescriptionsV dcuDevices_
edm::MapOfVectors< std::string, AnalysisDescription * > AnalysisDescriptions
enumDeviceType DeviceType
CommissioningAnalysisDescription AnalysisDescription
DeviceDescriptions::range DeviceDescriptionsRange
An interface class to the DeviceFactory.
static std::atomic< uint32_t > cntr_
Container class for database partition parameters.
std::map< sistrip::RunType, Runs > RunsByType
Fed9U::Fed9UDescription FedDescription
deviceDescription DeviceDescription
Namespace of DDCMS conversion namespace.
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)
boost::iterator_range< FedIds::const_iterator > FedIdsRange
DeviceDescriptionsV muxDevices_
DeviceDescriptions devices_
edm::MapOfVectors< std::string, FedDescription * > FedDescriptions
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::pair< uint32_t, TkDcuInfo * > DcuDetId
std::vector< FedDescription * > FedDescriptionsV
void reset(double vett[256])
std::vector< DeviceDescription * > DeviceDescriptionsV
edm::MapOfVectors< std::string, FedConnection * > FedConnections