25 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 26 <<
" Constructing object...";
30 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 31 <<
" Set FED zero suppression high/low threshold to " 36 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 41 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 47 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 50 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 57 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 58 <<
" Destructing object...";
64 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]";
68 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 69 <<
" NULL pointer to SiStripConfigDb interface!" 70 <<
" Aborting upload...";
80 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 81 <<
" Uploading FED information to DB...";
84 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 85 <<
" Completed database upload of " << feds.size()
86 <<
" FED descriptions!";
89 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 90 <<
" No FED values will be uploaded to DB...";
100 uint16_t updated_peds = 0;
101 uint16_t updated_ticks = 0;
102 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
103 for ( ifed = feds.begin(); ifed != feds.end(); ifed++ ) {
106 if (
find(
ids.begin(),
ids.end(), (*ifed)->getFedId() ) ==
ids.end() ) {
continue; }
137 if ( !iter->second->isValid() ) {
139 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 140 <<
" Skipping invalid channel with coordinates: FedKey/Id/Ch: " 141 << hex << setw(8) << setfill(
'0') << fed_key.
key() <<
dec <<
"/" 142 << (*ifed)->getFedId() <<
"/" 144 <<
" and device with FEC/slot/ring/CCU/LLD " 145 << fec_key.fecCrate() <<
"/" 146 << fec_key.fecSlot() <<
"/" 147 << fec_key.fecRing() <<
"/" 148 << fec_key.ccuAddr() <<
"/" 149 << fec_key.ccuChan() <<
"/" 150 << fec_key.channel();
157 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 158 <<
" NULL pointer to analysis object!";
166 uint32_t pedshift = 127;
168 uint32_t pedmin = (uint32_t) anal->
pedsMin()[iapv];
169 pedshift = pedmin < pedshift ? pedmin : pedshift;
170 std::stringstream ss;
171 ss <<
"iapv: " << iapv <<
" pedsMin()[iapv]: " << anal->
pedsMin()[iapv] <<
" pedmin: " << pedmin <<
" pedshift: " << pedshift;
177 for ( uint16_t istr = 0; istr < anal->
peds()[iapv].size(); istr++ ) {
180 if ( anal->
peds()[iapv][istr] < 1. ) {
182 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 183 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " 184 << hex << setw(8) << setfill(
'0') << fed_key.
key() <<
dec <<
"/" 185 << (*ifed)->getFedId() <<
"/" 187 <<
" and device with FEC/slot/ring/CCU/LLD " 188 << fec_key.fecCrate() <<
"/" 189 << fec_key.fecSlot() <<
"/" 190 << fec_key.fecRing() <<
"/" 191 << fec_key.ccuAddr() <<
"/" 192 << fec_key.ccuChan() <<
"/" 193 << fec_key.channel();
198 Fed9U::Fed9UAddress addr( ichan, iapv, istr );
199 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip( addr );
202 bool disableStrip =
false;
204 disableStrip = temp.getDisable();
208 if (
find( dead.begin(), dead.end(), istr ) != dead.end() ) disableStrip =
true;
210 if (
find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) disableStrip =
true;
213 Fed9U::Fed9UStripDescription
data( static_cast<uint32_t>( anal->
peds()[iapv][istr]-pedshift ),
216 anal->
noise()[iapv][istr],
219 std::stringstream ss;
221 ss <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 222 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
223 <<
" for FED id/channel and APV/strip : " 224 << fed_key.
fedId() <<
"/" 228 <<
" and crate/FEC/ring/CCU/module : " 229 << fec_key.fecCrate() <<
"/" 230 << fec_key.fecSlot() <<
"/" 231 << fec_key.fecRing() <<
"/" 232 << fec_key.ccuAddr() <<
"/" 233 << fec_key.ccuChan() << std::endl
234 <<
" from ped/noise/high/low/disable : " 235 <<
static_cast<uint16_t
>( temp.getPedestal() ) <<
"/" 236 << static_cast<uint16_t>( temp.getHighThreshold() ) <<
"/" 237 << static_cast<uint16_t>( temp.getLowThreshold() ) <<
"/" 238 << static_cast<uint16_t>( temp.getNoise() ) <<
"/" 239 << static_cast<uint16_t>( temp.getDisable() ) << std::endl;
243 (*ifed)->getFedStrips().setStrip( addr,
data );
246 ss <<
" to ped/noise/high/low/disable : " 247 <<
static_cast<uint16_t
>(
data.getPedestal() ) <<
"/" 248 << static_cast<uint16_t>(
data.getHighThreshold() ) <<
"/" 249 << static_cast<uint16_t>(
data.getLowThreshold() ) <<
"/" 250 << static_cast<uint16_t>(
data.getNoise() ) <<
"/" 251 << static_cast<uint16_t>(
data.getDisable() ) << std::endl;
263 Fed9U::Fed9UAddress addr( ichan );
264 uint16_t old_threshold =
static_cast<uint16_t
>( (*ifed)->getFrameThreshold( addr ) );
269 uint16_t new_threshold =
static_cast<uint16_t
>( (*ifed)->getFrameThreshold( addr ) );
271 std::stringstream ss;
272 ss <<
"LLD channel : old frame threshold "<<old_threshold<<
" new frame threshold "<<new_threshold<<std::endl;
277 ss <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]";
279 ss <<
" Updating the frame-finding threshold" 280 <<
" from " << old_threshold
281 <<
" to " << new_threshold
282 <<
" using tick mark base/peak/height " 283 << anal->
base() <<
"/" 284 << anal->
peak() <<
"/" 287 ss <<
" Cannot update the frame-finding threshold" 288 <<
" from " << old_threshold
289 <<
" to a new value using invalid analysis ";
291 ss <<
" for crate/FEC/ring/CCU/module/LLD " 292 << fec_key.fecCrate() <<
"/" 293 << fec_key.fecSlot() <<
"/" 294 << fec_key.fecRing() <<
"/" 295 << fec_key.ccuAddr() <<
"/" 299 << fed_key.
fedId() <<
"/" 308 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 309 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " 310 << hex << setw(8) << setfill(
'0') << fed_key.
key() <<
dec <<
"/" 311 << (*ifed)->getFedId() <<
"/" 313 <<
" and device with FEC/slot/ring/CCU/LLD " 314 << fec_key.fecCrate() <<
"/" 315 << fec_key.fecSlot() <<
"/" 316 << fec_key.fecRing() <<
"/" 317 << fec_key.ccuAddr() <<
"/" 318 << fec_key.ccuChan() <<
"/" 319 << fec_key.channel();
326 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]" 327 <<
" Updated FED parameters for pedestal/noise " 328 << updated_peds <<
" channels" 329 <<
" Updated FED parameters for frame finding thresholds " 330 << updated_ticks <<
" channels";
338 if ( !anal ) {
return; }
343 for ( uint16_t iapv = 0; iapv < 2; ++iapv ) {
346 PedestalsAnalysisDescription* peds_tmp;
347 peds_tmp =
new PedestalsAnalysisDescription(
380 typedef std::vector<std::string>
Strings;
382 Strings::const_iterator istr = errors.begin();
383 Strings::const_iterator jstr = errors.end();
384 for ( ; istr != jstr; ++istr ) { peds_tmp->addComments( *istr ); }
387 desc.push_back( peds_tmp );
390 TimingAnalysisDescription* timing_tmp;
391 timing_tmp =
new TimingAnalysisDescription(
417 istr = errors.begin();
419 for ( ; istr != jstr; ++istr ) { timing_tmp->addComments( *istr ); }
420 desc.push_back(timing_tmp);
const uint16_t & fecSlot() const
T getParameter(std::string const &) const
const VFloat & noiseMean() const
const uint16_t & fecCrate() const
const VVInt & dead() const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
const uint32_t & fedKey() const
Analyses::iterator Analysis
Analyses & data(bool getMaskedData=false)
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
bool allowSelectiveUpload_
A container class for generic run and event-related info, information required by the commissioning a...
const uint16_t & fedCh() const
const edm::ParameterSet & pset() const
bool deviceIsPresent(const SiStripFecKey &)
bool isValid() const override
const VFloat & noiseSpread() const
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedDescriptions::range FedDescriptionsRange
uint16_t frameFindingThreshold() const
static const char mlDqmClient_[]
uint16_t lldChannel() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const VFloat & noiseMax() const
const uint16_t & i2cAddr() const
const uint16_t & fedId() const
const uint32_t & key() const
static const float tickMarkHeightThreshold_
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const_iterator_range partitions() const
const uint16_t & fecRing() const
const VFloat & pedsSpread() const
Class containning control, module, detector and connection information, at the level of a FED channel...
FedsConstIterRange fedIds() const
const VVFloat & noise() const
const VFloat & rawMean() const
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
bool doUploadConf() const
const float & base() const
const uint32_t & fecKey() const
const VVFloat & peds() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
const float & height() const
void print(std::stringstream &, uint32_t apv_number=0) override
uint16_t fedChannel() const
const uint16_t & ccuAddr() const
const VFloat & rawSpread() const
std::vector< uint16_t > VInt
const VFloat & noiseMin() const
const float & peak() const
const VFloat & pedsMean() const
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
const VVInt & noisy() const
void uploadFedDescriptions(std::string partition="")
~DaqScopeModeHistosUsingDb() override
static const uint16_t invalid_
void update(SiStripConfigDb::FedDescriptionsRange)
static const uint16_t FEDCH_PER_FED
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const uint16_t & feChan() const
const VFloat & pedsMax() const
const uint16_t & fedId() const
SiStripConfigDb *const db() const
const VFloat & pedsMin() const
const VFloat & rawMax() const
const VFloat & rawMin() const
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
static const uint16_t APVS_PER_FEDCH
DaqScopeModeHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const )
void uploadConfigurations() override
Analysis for scope mode data.