10 using namespace sistrip;
22 <<
" Constructing object...";
26 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/"
44 <<
" Destructing object...";
54 <<
" NULL pointer to SiStripConfigDb interface!"
55 <<
" Aborting upload...";
64 <<
" Uploading pedestals/noise to DB...";
67 <<
" Completed database upload of " << feds.size() <<
" FED descriptions!";
70 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
79 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
80 for (ifed = feds.begin(); ifed != feds.end(); ifed++) {
97 if (!iter->second->isValid()) {
104 <<
" NULL pointer to analysis object!";
109 uint32_t pedshift = 127;
111 uint32_t pedmin = (uint32_t)anal->
pedsMin()[iapv];
112 pedshift = pedmin < pedshift ? pedmin : pedshift;
113 std::stringstream
ss;
114 ss <<
"iapv: " << iapv <<
" pedsMin()[iapv]: " << anal->
pedsMin()[iapv] <<
" pedmin: " << pedmin
115 <<
" pedshift: " << pedshift;
121 for (uint16_t istr = 0; istr < anal->
peds()[iapv].size(); istr++) {
123 Fed9U::Fed9UAddress
addr(ichan, iapv, istr);
124 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip(addr);
126 if (anal->
peds()[iapv][istr] < 1.) {
128 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
129 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
130 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" << ichan
131 <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
132 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
133 << fec_key.channel();
138 bool disableStrip =
false;
140 disableStrip = temp.getDisable();
143 if (
find(dead.begin(), dead.end(), istr) != dead.end())
146 if (
find(noisy.begin(), noisy.end(), istr) != noisy.end())
150 Fed9U::Fed9UStripDescription
data(static_cast<uint32_t>(anal->
peds()[iapv][istr] - pedshift),
153 anal->
noise()[iapv][istr],
156 std::stringstream
ss;
158 ss <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
159 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
160 <<
" for FED id/channel and APV/strip : " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() <<
" "
161 << iapv <<
"/" << istr << std::endl
162 <<
" and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
163 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << std::endl
164 <<
" from ped/noise/high/low/disable : " <<
static_cast<uint16_t
>(temp.getPedestal()) <<
"/"
165 << static_cast<uint16_t>(temp.getHighThreshold()) <<
"/"
166 << static_cast<uint16_t>(temp.getLowThreshold()) <<
"/" << static_cast<uint16_t>(temp.getNoise())
167 <<
"/" << static_cast<uint16_t>(temp.getDisable()) << std::endl;
169 (*ifed)->getFedStrips().setStrip(addr,
data);
171 ss <<
" to ped/noise/high/low/disable : " <<
static_cast<uint16_t
>(
data.getPedestal()) <<
"/"
172 << static_cast<uint16_t>(
data.getHighThreshold()) <<
"/"
173 << static_cast<uint16_t>(
data.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
data.getNoise())
174 <<
"/" << static_cast<uint16_t>(
data.getDisable()) << std::endl;
185 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
186 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/"
187 << ichan <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
188 <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing() <<
"/"
189 << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel();
196 <<
" Updated FED pedestals/noise for " << updated <<
" channels";
210 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
212 PedestalsAnalysisDescription*
tmp;
213 tmp =
new PedestalsAnalysisDescription(anal->
dead()[iapv],
243 typedef std::vector<std::string>
Strings;
245 Strings::const_iterator istr = errors.begin();
246 Strings::const_iterator jstr = errors.end();
247 for (; istr != jstr; ++istr) {
248 tmp->addComments(*istr);
const uint16_t & fecSlot() const
Log< level::Info, true > LogVerbatim
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
const VVInt & noisy() const
Analyses & data(bool getMaskedData=false)
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
Log< level::Error, false > LogError
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
PedestalsHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken)
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
bool isValid() const override
~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="")
T getParameter(std::string const &) const
static const uint16_t invalid_
const VFloat & pedsSpread() const
const VFloat & pedsMax() const
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
Log< level::Warning, false > LogWarning
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
static const uint16_t APVS_PER_FEDCH
const VFloat & noiseMin() const