11 using namespace sistrip;
27 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
28 <<
" Constructing object...";
32 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
33 <<
" Set FED zero suppression high/low threshold to "
39 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
48 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
49 <<
" Destructing object...";
56 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]";
60 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
61 <<
" NULL pointer to SiStripConfigDb interface!"
62 <<
" Aborting upload...";
71 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
72 <<
" Uploading pedestals/noise to DB...";
75 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
76 <<
" Completed database upload of " << feds.size()
77 <<
" FED descriptions!";
80 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
81 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
92 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
93 for ( ifed = feds.begin(); ifed != feds.end(); ifed++ ) {
117 Analyses::const_iterator iter =
data().find( fec_key.key() );
118 if ( iter !=
data().end() ) {
123 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
124 <<
" NULL pointer to analysis object!";
129 uint32_t pedshift = 127;
131 uint32_t pedmin = (uint32_t) anal->
pedsMin()[iapv];
132 pedshift = pedmin < pedshift ? pedmin : pedshift;
137 for ( uint16_t istr = 0; istr < anal->
peds()[iapv].size(); istr++ ) {
140 Fed9U::Fed9UAddress addr( ichan, iapv, istr );
141 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip( addr );
142 if(temp.getDisable()) {
149 <<
" "<<iapv*128+istr<<std::endl;
152 bool disableStrip =
false;
154 disableStrip = temp.getDisable();
158 if (
find( dead.begin(), dead.end(), istr ) != dead.end() ) {
166 <<
" "<<iapv*128+istr<<std::endl;
169 if (
find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) {
177 <<
" "<<iapv*128+istr<<std::endl;
181 disableStrip = temp.getDisable();
184 if (
find( dead.begin(), dead.end(), istr ) != dead.end() ) {
192 <<
" "<<iapv*128+istr<<std::endl;
195 if (
find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) {
203 <<
" "<<iapv*128+istr<<std::endl;
207 Fed9U::Fed9UStripDescription
data( static_cast<uint32_t>( anal->
peds()[iapv][istr]-pedshift ),
210 anal->
noise()[iapv][istr],
213 std::stringstream ss;
215 ss <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
216 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
217 <<
" for FED id/channel and APV/strip : "
218 << fed_key.
fedId() <<
"/"
222 <<
" and crate/FEC/ring/CCU/module : "
223 << fec_key.fecCrate() <<
"/"
224 << fec_key.fecSlot() <<
"/"
225 << fec_key.fecRing() <<
"/"
226 << fec_key.ccuAddr() <<
"/"
227 << fec_key.ccuChan() << std::endl
228 <<
" from ped/noise/high/low/disable : "
229 <<
static_cast<uint16_t
>( temp.getPedestal() ) <<
"/"
230 << static_cast<uint16_t>( temp.getHighThreshold() ) <<
"/"
231 << static_cast<uint16_t>( temp.getLowThreshold() ) <<
"/"
232 << static_cast<uint16_t>( temp.getNoise() ) <<
"/"
233 << static_cast<uint16_t>( temp.getDisable() ) << std::endl;
235 (*ifed)->getFedStrips().setStrip( addr,
data );
237 ss <<
" to ped/noise/high/low/disable : "
238 <<
static_cast<uint16_t
>(
data.getPedestal() ) <<
"/"
239 << static_cast<uint16_t>(
data.getHighThreshold() ) <<
"/"
240 << static_cast<uint16_t>(
data.getLowThreshold() ) <<
"/"
241 << static_cast<uint16_t>(
data.getNoise() ) <<
"/"
242 << static_cast<uint16_t>(
data.getDisable() ) << std::endl;
253 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
254 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: "
255 << hex << setw(8) << setfill(
'0') << fed_key.
key() << dec <<
"/"
256 << (*ifed)->getFedId() <<
"/"
258 <<
" and device with FEC/slot/ring/CCU/LLD "
259 << fec_key.fecCrate() <<
"/"
260 << fec_key.fecSlot() <<
"/"
261 << fec_key.fecRing() <<
"/"
262 << fec_key.ccuAddr() <<
"/"
263 << fec_key.ccuChan() <<
"/"
264 << fec_key.channel();
271 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
272 <<
" Updated FED pedestals/noise for "
273 << updated <<
" channels";
282 if ( !anal ) {
return; }
287 for ( uint16_t iapv = 0; iapv < 2; ++iapv ) {
290 PedestalsAnalysisDescription*
tmp;
291 tmp =
new PedestalsAnalysisDescription(
323 typedef std::vector<std::string>
Strings;
325 Strings::const_iterator istr = errors.begin();
326 Strings::const_iterator jstr = errors.end();
327 for ( ; istr != jstr; ++istr ) { tmp->addComments( *istr ); }
330 desc.push_back( tmp );
const uint16_t & fecSlot() const
T getParameter(std::string const &) const
const VFloat & rawMean() const
const uint16_t & fecCrate() const
void update(SiStripConfigDb::FedDescriptionsRange)
const uint32_t & fedKey() const
Analyses::iterator Analysis
PedsFullNoiseHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *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_[]
const FedChannelConnection & connection(uint16_t fed_id, uint16_t fed_ch) const
const VVFloat & peds() const
const VFloat & noiseMax() const
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
virtual ~PedsFullNoiseHistosUsingDb()
Histogram-based analysis for pedestal run.
const uint32_t & key() const
const VVInt & noisy() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const VFloat & noiseMin() const
const_iterator_range partitions() const
const VFloat & pedsSpread() const
const uint16_t & fecRing() const
Class containning control, module, detector and connection information, at the level of a FED channel...
const VFloat & pedsMax() const
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
bool doUploadConf() const
const VFloat & pedsMean() const
const VFloat & pedsMin() const
const uint32_t & fecKey() const
const VFloat & rawMin() const
const VFloat & rawSpread() const
uint16_t fedChannel() const
const uint16_t & ccuAddr() const
std::vector< uint16_t > VInt
const VFloat & rawMax() const
const VVFloat & noise() const
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
void uploadFedDescriptions(std::string partition="")
static const uint16_t invalid_
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
SiStripConfigDb *const db() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis)
const VFloat & noiseSpread() const
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
const VVInt & dead() const
const VFloat & noiseMean() const
static const uint16_t APVS_PER_FEDCH
virtual void uploadConfigurations()