31 <<
"[" << __PRETTY_FUNCTION__ <<
"]" 32 <<
" Constructing object...";
47 <<
"[" << __PRETTY_FUNCTION__ <<
"]" 48 <<
" Constructing object..." << endl;
56 <<
"[" << __PRETTY_FUNCTION__ <<
"]" 57 <<
" Destructing object...";
64 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 65 <<
" NULL pointer to SiStripConfigDb interface!" 66 <<
" Cannot configure...";
80 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 81 <<
" Terse print out of FED cabling:" << std::endl;
87 std::stringstream sss;
88 sss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 89 <<
" Summary of FED cabling:" << std::endl;
110 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 111 <<
" NULL pointer to SiStripConfigDb interface!" 112 <<
" Aborting upload...";
119 for ( ; ip != jp; ++ip ) {
122 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 123 <<
" Starting from partition " << ip->first
125 <<
" Conn: " << ip->second.cabVersion().first <<
"." << ip->second.cabVersion().second <<
"\n" 126 <<
" FED: " << ip->second.fedVersion().first <<
"." << ip->second.fedVersion().second <<
"\n" 127 <<
" FEC: " << ip->second.fecVersion().first <<
"." << ip->second.fecVersion().second <<
"\n" 128 <<
" Mask: " << ip->second.maskVersion().first <<
"." << ip->second.maskVersion().second;
135 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 136 <<
" Created analysis descriptions for " 137 << anals.size() <<
" devices";
143 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 144 <<
" Uploading major version of analysis descriptions to DB" 145 <<
" (will be used for physics)...";
149 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 150 <<
" Uploading minor version of analysis descriptions to DB" 151 <<
" (will not be used for physics)...";
157 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 158 <<
" Upload of analysis descriptions to DB finished!";
162 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 163 <<
" TEST! No analysis descriptions will be uploaded to DB...";
169 for ( ; ip != jp; ++ip ) {
171 tkStateVector states = df->getCurrentStates();
172 tkStateVector::const_iterator istate = states.begin();
173 tkStateVector::const_iterator jstate = states.end();
174 while ( istate != jstate ) {
175 if ( *istate && ip->first == (*istate)->getPartitionName() ) {
break; }
179 if ( istate != states.end() ) {
181 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 182 <<
" Created new version for partition " << ip->first
184 <<
" Conn: " << (*istate)->getConnectionVersionMajorId() <<
"." << (*istate)->getConnectionVersionMinorId() <<
"\n" 185 <<
" FED: " << (*istate)->getFedVersionMajorId() <<
"." << (*istate)->getFedVersionMinorId() <<
"\n" 186 <<
" FEC: " << (*istate)->getFecVersionMajorId() <<
"." << (*istate)->getFecVersionMinorId() <<
"\n" 187 <<
" Mask: " << (*istate)->getMaskVersionMajorId() <<
"." << (*istate)->getMaskVersionMinorId();
202 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 203 <<
" NULL pointer to SiStripFedCabling object!";
207 Analyses::iterator ianal =
data().begin();
208 Analyses::iterator janal =
data().end();
209 for ( ; ianal != janal; ++ianal ) {
215 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 216 <<
" NULL pointer to CommissioningAnalysis object!";
237 if ( fed_key.
path() != fed.
path() ) {
239 std::stringstream ss;
240 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 241 <<
" Cannot set DCU and DetId values in commissioning analysis object!" << std::endl
242 <<
" Incompatible FED key retrieved from cabling!" << std::endl
243 <<
" FED key from analysis object : " << fed_key.
path() << std::endl
244 <<
" FED key from cabling object : " << fed.
path() << std::endl
245 <<
" FED id/ch from analysis object: " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() << std::endl
246 <<
" FED id/ch from cabling object : " << conn.
fedId() <<
"/" << conn.
fedCh();
249 }
else if ( fec_key.
path() != fec.path() ) {
251 std::stringstream ss;
252 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 253 <<
" Cannot set DCU and DetId values in commissioning analysis object!" << std::endl
254 <<
" Incompatible FEC key retrieved from cabling!" << std::endl
255 <<
" FEC key from analysis object : " << fec_key.
path() << std::endl
256 <<
" FEC key from cabling object : " << fec.path();
275 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 276 <<
" Creating AnalysisDescriptions...";
280 Analyses::iterator ianal =
data().begin();
281 Analyses::iterator janal =
data().end();
282 for ( ; ianal != janal; ++ianal ) {
297 <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 298 <<
" NULL pointer to SiStripConfigDb interface!";
304 for ( ; ii !=
jj; ++
ii ) {
312 SiStripConfigDb::DeviceDescriptionsV::const_iterator idcu = dcus.begin();
313 SiStripConfigDb::DeviceDescriptionsV::const_iterator jdcu = dcus.end();
314 for ( ; idcu != jdcu; ++idcu ) {
317 dcuDescription* dcu =
dynamic_cast<dcuDescription*
>( *idcu );
318 if ( !dcu ) {
continue; }
319 if ( dcu->getDcuType() !=
"FEH" ) {
continue; }
324 if ( dcu->getDcuHardId() == 16448250 )
continue;
327 SiStripConfigDb::DcuDetIdsV::const_iterator idet = dets.end();
329 if ( idet == dets.begin() ) {
continue; }
332 TkDcuInfo* det = idet->second;
333 if ( !det ) {
continue; }
345 info.
dcuId_ = det->getDcuHardId();
346 info.
detId_ = det->getDetId();
347 info.
pairs_ = det->getApvNumber()/2;
357 std::stringstream ss;
358 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 359 <<
" List of modules for " 361 <<
" partitions, with their DCUids, DetIds, and nApvPairs: " << std::endl;
362 std::map<std::string,DetInfos>::const_iterator ii =
detInfo_.begin();
363 std::map<std::string,DetInfos>::const_iterator jj =
detInfo_.end();
364 for ( ; ii !=
jj; ++
ii ) {
365 ss <<
" Partition \"" << ii->first
366 <<
"\" has " << ii->second.size()
369 DetInfos::const_iterator iii = ii->second.begin();
370 DetInfos::const_iterator jjj = ii->second.end();
371 for ( ; iii != jjj; ++iii ) {
381 << std::setw(8) << std::setfill(
'0') << iii->second.dcuId_
383 << std::setw(8) << std::setfill(
'0') << iii->second.detId_
386 << iii->second.pairs_
400 std::map<std::string,DetInfos>::const_iterator
ii =
detInfo_.begin();
401 std::map<std::string,DetInfos>::const_iterator
jj =
detInfo_.end();
402 for ( ; ii !=
jj; ++
ii ) {
403 DetInfos::const_iterator iii = ii->second.find( tmp.
key() );
404 if ( iii != ii->second.end() ) {
return std::make_pair(ii->first,iii->second); }
406 return std::make_pair(
"",
DetInfo());
413 std::pair<std::string,DetInfo>
info =
detInfo(key);
415 if ( key.
channel() == 2 && info.second.pairs_ == 2 ) {
return false; }
416 else {
return true; }
418 std::stringstream ss;
419 ss <<
"[CommissioningHistosUsingDb::" << __func__ <<
"]" 420 <<
" Cannot find module (crate/FEC/ring/CCU/module): "
const uint16_t & fecSlot() const
const uint16_t & fecCrate() const
DcuDetIds::range DcuDetIdsRange
const uint32_t & fedKey() const
Analyses & data(bool getMaskedData=false)
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 &)
def setup(process, global_tag, zero_tesla=False)
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
std::map< std::string, DetInfos > detInfo_
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...
std::vector< std::vector< double > > tmp
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 &)