29 <<
" Constructing object...";
43 <<
" Constructing object..." << endl;
53 <<
" Destructing object...";
59 <<
" NULL pointer to SiStripConfigDb interface!" 60 <<
" Cannot configure...";
74 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 75 <<
" Terse print out of FED cabling:" << std::endl;
81 std::stringstream sss;
82 sss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 83 <<
" Summary of FED cabling:" << std::endl;
103 <<
" NULL pointer to SiStripConfigDb interface!" 104 <<
" Aborting upload...";
111 for (; ip != jp; ++ip) {
113 <<
" Starting from partition " << ip->first <<
" with versions:\n" 114 <<
std::dec <<
" Conn: " << ip->second.cabVersion().first <<
"." 115 << ip->second.cabVersion().second <<
"\n" 116 <<
" FED: " << ip->second.fedVersion().first <<
"." 117 << ip->second.fedVersion().second <<
"\n" 118 <<
" FEC: " << ip->second.fecVersion().first <<
"." 119 << ip->second.fecVersion().second <<
"\n" 120 <<
" Mask: " << ip->second.maskVersion().first <<
"." 121 << ip->second.maskVersion().second;
128 <<
" Created analysis descriptions for " << anals.size() <<
" devices";
134 <<
" Uploading major version of analysis descriptions to DB" 135 <<
" (will be used for physics)...";
138 <<
" Uploading minor version of analysis descriptions to DB" 139 <<
" (will not be used for physics)...";
145 <<
" Upload of analysis descriptions to DB finished!";
148 <<
" TEST! No analysis descriptions will be uploaded to DB...";
154 for (; ip != jp; ++ip) {
156 tkStateVector states = df->getCurrentStates();
157 tkStateVector::const_iterator istate = states.begin();
158 tkStateVector::const_iterator jstate = states.end();
159 while (istate != jstate) {
160 if (*istate && ip->first == (*istate)->getPartitionName()) {
166 if (istate != states.end()) {
168 <<
" Created new version for partition " << ip->first <<
". Current state:\n" 169 <<
std::dec <<
" Conn: " << (*istate)->getConnectionVersionMajorId() <<
"." 170 << (*istate)->getConnectionVersionMinorId() <<
"\n" 171 <<
" FED: " << (*istate)->getFedVersionMajorId() <<
"." 172 << (*istate)->getFedVersionMinorId() <<
"\n" 173 <<
" FEC: " << (*istate)->getFecVersionMajorId() <<
"." 174 << (*istate)->getFecVersionMinorId() <<
"\n" 175 <<
" Mask: " << (*istate)->getMaskVersionMajorId() <<
"." 176 << (*istate)->getMaskVersionMinorId();
188 <<
" NULL pointer to SiStripFedCabling object!";
192 Analyses::iterator ianal =
data().begin();
193 Analyses::iterator janal =
data().end();
194 for (; ianal != janal; ++ianal) {
199 <<
" NULL pointer to CommissioningAnalysis object!";
214 std::stringstream
ss;
215 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 216 <<
" Cannot set DCU and DetId values in commissioning analysis object!" << std::endl
217 <<
" Incompatible FED key retrieved from cabling!" << std::endl
218 <<
" FED key from analysis object : " << fed_key.
path() << std::endl
219 <<
" FED key from cabling object : " << fed.
path() << std::endl
220 <<
" FED id/ch from analysis object: " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() << std::endl
221 <<
" FED id/ch from cabling object : " << conn.
fedId() <<
"/" << conn.
fedCh();
224 }
else if (fec_key.
path() != fec.path()) {
225 std::stringstream
ss;
226 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 227 <<
" Cannot set DCU and DetId values in commissioning analysis object!" << std::endl
228 <<
" Incompatible FEC key retrieved from cabling!" << std::endl
229 <<
" FEC key from analysis object : " << fec_key.
path() << std::endl
230 <<
" FEC key from cabling object : " << fec.path();
244 <<
" Creating AnalysisDescriptions...";
248 Analyses::iterator ianal =
data().begin();
249 Analyses::iterator janal =
data().end();
250 for (; ianal != janal; ++ianal) {
263 <<
" NULL pointer to SiStripConfigDb interface!";
269 for (; ii !=
jj; ++
ii) {
276 SiStripConfigDb::DeviceDescriptionsV::const_iterator idcu = dcus.begin();
277 SiStripConfigDb::DeviceDescriptionsV::const_iterator jdcu = dcus.end();
278 for (; idcu != jdcu; ++idcu) {
280 dcuDescription* dcu =
dynamic_cast<dcuDescription*
>(*idcu);
284 if (dcu->getDcuType() !=
"FEH") {
291 if (dcu->getDcuHardId() == 16448250)
295 SiStripConfigDb::DcuDetIdsV::const_iterator idet = dets.end();
297 if (idet == dets.begin()) {
302 TkDcuInfo* det = idet->second;
313 info.
dcuId_ = det->getDcuHardId();
314 info.
detId_ = det->getDetId();
315 info.
pairs_ = det->getApvNumber() / 2;
326 std::stringstream
ss;
327 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 328 <<
" List of modules for " <<
detInfo_.size()
329 <<
" partitions, with their DCUids, DetIds, and nApvPairs: " << std::endl;
330 std::map<std::string, DetInfos>::const_iterator ii =
detInfo_.begin();
331 std::map<std::string, DetInfos>::const_iterator jj =
detInfo_.end();
332 for (; ii !=
jj; ++
ii) {
333 ss <<
" Partition \"" << ii->first <<
"\" has " << ii->second.size() <<
" modules:" << std::endl;
334 DetInfos::const_iterator iii = ii->second.begin();
335 DetInfos::const_iterator jjj = ii->second.end();
336 for (; iii != jjj; ++iii) {
339 <<
"/" << key.
ccuChan() <<
", " << std::hex <<
" DCUid= " << std::setw(8) << std::setfill(
'0')
340 << iii->second.dcuId_ <<
" DetId= " << std::setw(8) << std::setfill(
'0') << iii->second.detId_ <<
std::dec 341 <<
" nPairs= " << iii->second.pairs_ << std::endl;
354 return std::make_pair(
"",
DetInfo());
356 std::map<std::string, DetInfos>::const_iterator
ii =
detInfo_.begin();
357 std::map<std::string, DetInfos>::const_iterator
jj =
detInfo_.end();
358 for (; ii !=
jj; ++
ii) {
359 DetInfos::const_iterator iii = ii->second.find(tmp.
key());
360 if (iii != ii->second.end()) {
361 return std::make_pair(ii->first, iii->second);
364 return std::make_pair(
"",
DetInfo());
371 std::pair<std::string, DetInfo>
info =
detInfo(key);
373 if (key.
channel() == 2 && info.second.pairs_ == 2) {
379 std::stringstream
ss;
380 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 381 <<
" Cannot find module (crate/FEC/ring/CCU/module): " << tmp.
fecCrate() <<
"/" << tmp.
fecSlot() <<
"/"
const uint16_t & fecSlot() const
const uint16_t & fecCrate() const
DcuDetIds::range DcuDetIdsRange
const uint32_t & fedKey() const
Analyses & data(bool getMaskedData=false)
std::map< std::string, DetInfos > detInfo_
const uint16_t & fecRing() const
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
A container class for generic run and event-related info, information required by the commissioning a...
const uint16_t & fedCh() const
bool deviceIsPresent(const SiStripFecKey &)
DeviceFactory *const deviceFactory(std::string method_name="") const
virtual void addDcuDetIds()
static const uint32_t invalid32_
void uploadAnalysisDescriptions(bool calibration_for_physics=false, std::string partition="")
void terse(std::stringstream &) const
void addAnalysisDescriptions(std::string partition, AnalysisDescriptionsV &)
static const char mlDqmClient_[]
const uint16_t & fecSlot() const
uint16_t lldChannel() const
void configure(const edm::ParameterSet &, const edm::EventSetup &) override
const uint16_t & fedId() const
const uint32_t & key() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
bool isInvalid() const override
const_iterator_range partitions() const
static DcuDetIdsV::const_iterator findDcuDetId(DcuDetIdsV::const_iterator begin, DcuDetIdsV::const_iterator end, uint32_t dcu_id)
const uint16_t & fecRing() const
const uint32_t & detId() const
static void buildFecCabling(SiStripConfigDb *const, SiStripFecCabling &, const sistrip::CablingSource &)
Class containning control, module, detector and connection information, at the level of a FED channel...
DeviceDescriptions::range DeviceDescriptionsRange
const uint32_t & dcuId() const
void clearAnalysisDescriptions(std::string partition="")
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
const uint32_t & fecKey() const
const std::string & path() const
DeviceAddress deviceAddress(const deviceDescription &)
~CommissioningHistosUsingDb() override
uint16_t fedChannel() const
const uint16_t & ccuAddr() const
const uint32_t & dcuId() const
const uint16_t & fecCrate() const
SiStripFedCabling * cabling_
static void getFedCabling(const SiStripFecCabling &in, SiStripFedCabling &out)
std::pair< std::string, DetInfo > detInfo(const SiStripFecKey &)
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
const uint16_t & channel() const
virtual void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis)
sistrip::RunType runType_
virtual void createAnalyses(SiStripConfigDb::AnalysisDescriptionsV &)
const uint16_t & ccuAddr() const
CommissioningHistosUsingDb()
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
void summary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
LEFT FOR COMPATIBILITY. SHOULD BE REPLACED BY PRINTSUMMARY.
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const uint16_t & feChan() const
const uint32_t & detId() const
bool isValid() const override
const uint16_t & ccuChan() const
const uint16_t & fedId() const
SiStripConfigDb *const db() const
Abstract base for derived classes that provide analysis of commissioning histograms.
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
DcuDetIdsRange getDcuDetIds(std::string partition="")
T const * product() const
virtual void uploadConfigurations()
static void buildFecCablingFromDevices(SiStripConfigDb *const, SiStripFecCabling &)