26 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 27 <<
" Constructing object...";
31 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 32 <<
" Set FED zero suppression high/low threshold to " 37 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 43 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 51 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 52 <<
" Destructing object...";
59 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]";
63 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 64 <<
" NULL pointer to SiStripConfigDb interface!" 65 <<
" Aborting upload...";
74 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 75 <<
" Uploading pedestals/noise to DB...";
78 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 79 <<
" Completed database upload of " << feds.size()
80 <<
" FED descriptions!";
83 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 84 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
95 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
96 for ( ifed = feds.begin(); ifed != feds.end(); ifed++ ) {
123 if ( !iter->second->isValid() ) {
130 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 131 <<
" NULL pointer to analysis object!";
136 uint32_t pedshift = 127;
138 uint32_t pedmin = (uint32_t) anal->
pedsMin()[iapv];
139 pedshift = pedmin < pedshift ? pedmin : pedshift;
140 std::stringstream ss;
141 ss <<
"iapv: " << iapv <<
" pedsMin()[iapv]: " << anal->
pedsMin()[iapv] <<
" pedmin: " << pedmin <<
" pedshift: " << pedshift;
148 for ( uint16_t istr = 0; istr < anal->
peds()[iapv].size(); istr++ ) {
151 Fed9U::Fed9UAddress addr( ichan, iapv, istr );
152 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip( addr );
155 if ( anal->
peds()[iapv][istr] < 1.) {
157 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 158 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " 159 << hex << setw(8) << setfill(
'0') << fed_key.
key() <<
dec <<
"/" 160 << (*ifed)->getFedId() <<
"/" 162 <<
" and device with FEC/slot/ring/CCU/LLD " 163 << fec_key.fecCrate() <<
"/" 164 << fec_key.fecSlot() <<
"/" 165 << fec_key.fecRing() <<
"/" 166 << fec_key.ccuAddr() <<
"/" 167 << fec_key.ccuChan() <<
"/" 168 << fec_key.channel();
173 bool disableStrip =
false;
175 disableStrip = temp.getDisable();
178 if (
find( dead.begin(), dead.end(), istr ) != dead.end() ) disableStrip =
true;
180 if (
find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) disableStrip =
true;
183 Fed9U::Fed9UStripDescription
data( static_cast<uint32_t>( anal->
peds()[iapv][istr]-pedshift ),
186 anal->
noise()[iapv][istr],
189 std::stringstream ss;
191 ss <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 192 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
193 <<
" for FED id/channel and APV/strip : " 194 << fed_key.
fedId() <<
"/" 198 <<
" and crate/FEC/ring/CCU/module : " 199 << fec_key.fecCrate() <<
"/" 200 << fec_key.fecSlot() <<
"/" 201 << fec_key.fecRing() <<
"/" 202 << fec_key.ccuAddr() <<
"/" 203 << fec_key.ccuChan() << std::endl
204 <<
" from ped/noise/high/low/disable : " 205 <<
static_cast<uint16_t
>( temp.getPedestal() ) <<
"/" 206 << static_cast<uint16_t>( temp.getHighThreshold() ) <<
"/" 207 << static_cast<uint16_t>( temp.getLowThreshold() ) <<
"/" 208 << static_cast<uint16_t>( temp.getNoise() ) <<
"/" 209 << static_cast<uint16_t>( temp.getDisable() ) << std::endl;
211 (*ifed)->getFedStrips().setStrip( addr,
data );
213 ss <<
" to ped/noise/high/low/disable : " 214 <<
static_cast<uint16_t
>(
data.getPedestal() ) <<
"/" 215 << static_cast<uint16_t>(
data.getHighThreshold() ) <<
"/" 216 << static_cast<uint16_t>(
data.getLowThreshold() ) <<
"/" 217 << static_cast<uint16_t>(
data.getNoise() ) <<
"/" 218 << static_cast<uint16_t>(
data.getDisable() ) << std::endl;
229 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 230 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " 231 << hex << setw(8) << setfill(
'0') << fed_key.
key() <<
dec <<
"/" 232 << (*ifed)->getFedId() <<
"/" 234 <<
" and device with FEC/slot/ring/CCU/LLD " 235 << fec_key.fecCrate() <<
"/" 236 << fec_key.fecSlot() <<
"/" 237 << fec_key.fecRing() <<
"/" 238 << fec_key.ccuAddr() <<
"/" 239 << fec_key.ccuChan() <<
"/" 240 << fec_key.channel();
247 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 248 <<
" Updated FED pedestals/noise for " 249 << updated <<
" channels";
259 if ( !anal ) {
return; }
264 for ( uint16_t iapv = 0; iapv < 2; ++iapv ) {
267 PedestalsAnalysisDescription*
tmp;
268 tmp =
new PedestalsAnalysisDescription(
300 typedef std::vector<std::string>
Strings;
302 Strings::const_iterator istr = errors.begin();
303 Strings::const_iterator jstr = errors.end();
304 for ( ; istr != jstr; ++istr ) { tmp->addComments( *istr ); }
307 desc.push_back( tmp );
const uint16_t & fecSlot() const
T getParameter(std::string const &) const
const VFloat & rawMax() const
void update(SiStripConfigDb::FedDescriptionsRange)
const VFloat & pedsMean() const
const uint16_t & fecCrate() 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
PedestalsHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const )
const VVInt & noisy() const
Analyses & data(bool getMaskedData=false)
bool isValid() const override
const VVFloat & peds() 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
const edm::ParameterSet & pset() const
bool deviceIsPresent(const SiStripFecKey &)
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedDescriptions::range FedDescriptionsRange
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 uint16_t & i2cAddr() const
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.
const VFloat & noiseMean() const
const_iterator_range partitions() const
const uint16_t & fecRing() const
bool allowSelectiveUpload_
const VFloat & pedsMin() const
Class containning control, module, detector and connection information, at the level of a FED channel...
const VVFloat & noise() const
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
Histogram-based analysis for pedestal run.
bool doUploadConf() const
const uint32_t & fecKey() const
const VVInt & dead() const
uint16_t fedChannel() const
const VFloat & rawMin() const
const uint16_t & ccuAddr() const
const VFloat & rawSpread() const
std::vector< uint16_t > VInt
~PedestalsHistosUsingDb() override
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
const VFloat & rawMean() const
void uploadConfigurations() override
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
void uploadFedDescriptions(std::string partition="")
static const uint16_t invalid_
const VFloat & pedsSpread() const
const VFloat & pedsMax() const
std::vector< std::vector< double > > tmp
static const uint16_t FEDCH_PER_FED
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const uint16_t & feChan() const
const uint16_t & fedId() const
const VFloat & noiseSpread() const
SiStripConfigDb *const db() const
const VFloat & noiseMax() const
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
static const uint16_t APVS_PER_FEDCH
const VFloat & noiseMin() const