CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
ESTrivialConditionRetriever Class Reference

#include <ESTrivialConditionRetriever.h>

Inheritance diagram for ESTrivialConditionRetriever:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 ESTrivialConditionRetriever (const edm::ParameterSet &pset)
 
virtual std::unique_ptr< ESChannelStatusgetChannelStatusFromConfiguration (const ESChannelStatusRcd &)
 
virtual std::unique_ptr< ESADCToGeVConstantproduceESADCToGeVConstant (const ESADCToGeVConstantRcd &)
 
virtual std::unique_ptr< ESChannelStatusproduceESChannelStatus (const ESChannelStatusRcd &)
 
virtual std::unique_ptr< ESIntercalibConstantsproduceESIntercalibConstants (const ESIntercalibConstantsRcd &)
 
virtual std::unique_ptr< ESPedestalsproduceESPedestals (const ESPedestalsRcd &)
 
virtual std::unique_ptr< ESTBWeightsproduceESTBWeights (const ESTBWeightsRcd &)
 
virtual std::unique_ptr< ESWeightStripGroupsproduceESWeightStripGroups (const ESWeightStripGroupsRcd &)
 
 ~ESTrivialConditionRetriever () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Member Functions

 ESTrivialConditionRetriever (const ESTrivialConditionRetriever &)=delete
 
void getWeightsFromConfiguration (const edm::ParameterSet &ps)
 
const ESTrivialConditionRetrieveroperator= (const ESTrivialConditionRetriever &)=delete
 

Private Attributes

double adcToGeVHighConstant_
 
double adcToGeVLowConstant_
 
ESWeightSet amplWeights_
 
std::string amplWeightsFile_
 
std::string channelStatusFile_
 
double ESpedMean_
 
double ESpedRMS_
 
bool getWeightsFromFile_
 
double intercalibConstantMean_
 
std::string intercalibConstantsFile_
 
double intercalibConstantSigma_
 
bool producedESADCToGeVConstant_
 
bool producedESChannelStatus_
 
bool producedESIntercalibConstants_
 
bool producedESPedestals_
 
bool producedESWeights_
 
int verbose_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 

Detailed Description

Definition at line 40 of file ESTrivialConditionRetriever.h.

Constructor & Destructor Documentation

◆ ESTrivialConditionRetriever() [1/2]

ESTrivialConditionRetriever::ESTrivialConditionRetriever ( const edm::ParameterSet pset)

Definition at line 17 of file ESTrivialConditionRetriever.cc.

17  {
18  // initilize parameters used to produce cond DB objects
19  adcToGeVLowConstant_ = ps.getUntrackedParameter<double>("adcToGeVLowConstant", 1.0);
20  adcToGeVHighConstant_ = ps.getUntrackedParameter<double>("adcToGeVHighConstant", 1.0);
21 
22  intercalibConstantMean_ = ps.getUntrackedParameter<double>("intercalibConstantMean", 1.0);
23  intercalibConstantSigma_ = ps.getUntrackedParameter<double>("intercalibConstantSigma", 0.0);
24 
25  // intercalibErrorMean_ = ps.getUntrackedParameter<double>("IntercalibErrorMean",0.0);
26 
27  ESpedMean_ = ps.getUntrackedParameter<double>("ESpedMean", 200.);
28  ESpedRMS_ = ps.getUntrackedParameter<double>("ESpedRMS", 1.00);
29 
30  getWeightsFromFile_ = ps.getUntrackedParameter<bool>("getWeightsFromFile", false);
31 
32  std::string path = "CalibCalorimetry/EcalTrivialCondModules/data/";
33  std::string weightType;
34  std::ostringstream str;
35 
36  weightType = str.str();
37 
38  amplWeightsFile_ = ps.getUntrackedParameter<std::string>("amplWeightsFile", path + "ampWeightsES" + weightType);
39 
40  // default weights for MGPA shape after pedestal subtraction
42 
43  producedESPedestals_ = ps.getUntrackedParameter<bool>("producedESPedestals", true);
44  producedESWeights_ = ps.getUntrackedParameter<bool>("producedESWeights", true);
45 
46  producedESADCToGeVConstant_ = ps.getUntrackedParameter<bool>("producedESADCToGeVConstant", true);
47 
48  verbose_ = ps.getUntrackedParameter<int>("verbose", 0);
49 
50  //Tell Producer what we produce
51  //setWhatproduce(this);
54 
55  if (producedESWeights_) {
58  }
59 
62 
63  // intercalibration constants
64  producedESIntercalibConstants_ = ps.getUntrackedParameter<bool>("producedESIntercalibConstants", true);
65  intercalibConstantsFile_ = ps.getUntrackedParameter<std::string>("intercalibConstantsFile", "");
66 
67  if (producedESIntercalibConstants_) { // user asks to produce constants
68  if (intercalibConstantsFile_.empty()) { // if file provided read constants
69  // setWhatProduced (this, &ESTrivialConditionRetriever::getIntercalibConstantsFromConfiguration ) ;
70  // } else { // set all constants to 1. or smear as specified by user
72  }
73  findingRecord<ESIntercalibConstantsRcd>();
74  }
75 
76  // intercalibration constants errors
77  /* producedESIntercalibErrors_ = ps.getUntrackedParameter<bool>("producedESIntercalibErrors",true);
78  intercalibErrorsFile_ = ps.getUntrackedParameter<std::string>("intercalibErrorsFile","") ;
79 
80  if (producedESIntercalibErrors_) { // user asks to produce constants
81  if(intercalibErrorsFile_ != "") { // if file provided read constants
82  setWhatProduced (this, &ESTrivialConditionRetriever::getIntercalibErrorsFromConfiguration ) ;
83  } else { // set all constants to 1. or smear as specified by user
84  setWhatProduced (this, &ESTrivialConditionRetriever::produceESIntercalibErrors ) ;
85  }
86  findingRecord<ESIntercalibErrorsRcd> () ;
87  }
88  */
89 
90  // channel status
91  producedESChannelStatus_ = ps.getUntrackedParameter<bool>("producedESChannelStatus", true);
92  channelStatusFile_ = ps.getUntrackedParameter<std::string>("channelStatusFile", "");
93 
95  if (!channelStatusFile_.empty()) { // if file provided read channel map
97  } else { // set all channels to working -- FIXME might be changed
99  }
100  findingRecord<ESChannelStatusRcd>();
101  }
102 
103  //Tell Finder what records we find
105  findingRecord<ESPedestalsRcd>();
106 
107  if (producedESWeights_) {
108  findingRecord<ESWeightStripGroupsRcd>();
109  findingRecord<ESTBWeightsRcd>();
110  }
111 
113  findingRecord<ESADCToGeVConstantRcd>();
114 }

References getChannelStatusFromConfiguration(), edm::ParameterSet::getUntrackedParameter(), castor_dqm_sourceclient_file_cfg::path, produceESADCToGeVConstant(), produceESChannelStatus(), produceESIntercalibConstants(), produceESPedestals(), produceESTBWeights(), produceESWeightStripGroups(), str, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~ESTrivialConditionRetriever()

ESTrivialConditionRetriever::~ESTrivialConditionRetriever ( )
override

Definition at line 116 of file ESTrivialConditionRetriever.cc.

116 {}

◆ ESTrivialConditionRetriever() [2/2]

ESTrivialConditionRetriever::ESTrivialConditionRetriever ( const ESTrivialConditionRetriever )
privatedelete

Member Function Documentation

◆ getChannelStatusFromConfiguration()

std::unique_ptr< ESChannelStatus > ESTrivialConditionRetriever::getChannelStatusFromConfiguration ( const ESChannelStatusRcd )
virtual

Definition at line 271 of file ESTrivialConditionRetriever.cc.

272  {
273  auto ecalStatus = std::make_unique<ESChannelStatus>();
274 
275  // start by setting all statuses to 0
276 
277  for (int istrip = ESDetId::ISTRIP_MIN; istrip <= ESDetId::ISTRIP_MAX; istrip++) {
278  for (int ix = ESDetId::IX_MIN; ix <= ESDetId::IX_MAX; ix++) {
279  for (int iy = ESDetId::IY_MIN; iy <= ESDetId::IY_MAX; iy++) {
280  for (int iplane = 1; iplane <= 2; iplane++) {
281  for (int izeta = -1; izeta <= 1; ++izeta) {
282  if (izeta == 0)
283  continue;
284  try {
285  //ESDetId Plane iplane Zside izeta
286  ESDetId anESId(istrip, ix, iy, iplane, izeta);
287  // xtalGroups->setValue(ebid.rawId(), ESStripGroupId(ieta) ); // define rings in eta
288  ecalStatus->setValue(anESId, 0);
289  } catch (cms::Exception& e) {
290  }
291  }
292  }
293  }
294  }
295  }
296 
297  // overwrite the statuses which are in the file
298 
299  edm::LogInfo("ESTrivialConditionRetriever")
300  << "Reading channel statuses from file " << edm::FileInPath(channelStatusFile_).fullPath().c_str();
301  std::ifstream statusFile(edm::FileInPath(channelStatusFile_).fullPath().c_str());
302  if (!statusFile.good()) {
303  edm::LogError("ESTrivialConditionRetriever") << "*** Problems opening file: " << channelStatusFile_;
304  throw cms::Exception("Cannot open ECAL channel status file");
305  }
306 
307  std::string ESSubDet;
309  int hashIndex(0);
310  int status(0);
311 
312  while (!statusFile.eof()) {
313  statusFile >> ESSubDet;
314  if (ESSubDet != std::string("ES")) {
315  std::getline(statusFile, str);
316  continue;
317  } else {
318  statusFile >> hashIndex >> status;
319  }
320  // std::cout << ESSubDet << " " << hashIndex << " " << status;
321 
322  if (ESSubDet == std::string("ES")) {
323  ESDetId esid = ESDetId::unhashIndex(hashIndex);
324  ecalStatus->setValue(esid, status);
325  } else {
326  edm::LogError("ESTrivialConditionRetriever") << " *** " << ESSubDet << " is not ES ";
327  }
328  }
329  // the file is supposed to be in the form
330  // ES hashed_index status
331  // ES 132332 1 --> higher than 0 means bad
332 
333  statusFile.close();
334  return ecalStatus;
335 }

References MillePedeFileConverter_cfg::e, Exception, contentValuesFiles::fullPath, edm::FileInPath::fullPath(), ESDetId::ISTRIP_MAX, ESDetId::ISTRIP_MIN, ESDetId::IX_MAX, ESDetId::IX_MIN, ESDetId::IY_MAX, ESDetId::IY_MIN, mps_update::status, str, AlCaHLTBitMon_QueryRunRegistry::string, and ESDetId::unhashIndex().

Referenced by ESTrivialConditionRetriever().

◆ getWeightsFromConfiguration()

void ESTrivialConditionRetriever::getWeightsFromConfiguration ( const edm::ParameterSet ps)
private

Definition at line 238 of file ESTrivialConditionRetriever.cc.

238  {
240 
241  if (!getWeightsFromFile_) {
242  // vampl.set(1.);
243 
244  // amplwgtv[0]= ps.getUntrackedParameter< std::vector<double> >("amplWeights", vampl);
245  } else if (getWeightsFromFile_) {
246  edm::LogInfo("ESTrivialConditionRetriever")
247  << "Reading amplitude weights from file " << edm::FileInPath(amplWeightsFile_).fullPath().c_str();
248  std::ifstream amplFile(edm::FileInPath(amplWeightsFile_).fullPath().c_str());
249  while (!amplFile.eof()) {
250  for (int j = 0; j < 2; ++j) {
251  std::vector<float> vec(3);
252  for (int k = 0; k < 3; ++k) {
253  float ww;
254  amplFile >> ww;
255  vec[k] = ww;
256  }
257  // vampl.putRow(vec);
258  }
259  }
260  } else {
261  //Not supported
262  edm::LogError("ESTrivialConditionRetriever") << "Configuration not supported. Exception is raised ";
263  throw cms::Exception("WrongConfig");
264  }
265 
266  amplWeights_ = ESWeightSet(vampl);
267 }

References Exception, contentValuesFiles::fullPath, edm::FileInPath::fullPath(), dqmiolumiharvest::j, and dqmdumpme::k.

◆ operator=()

const ESTrivialConditionRetriever& ESTrivialConditionRetriever::operator= ( const ESTrivialConditionRetriever )
privatedelete

◆ produceESADCToGeVConstant()

std::unique_ptr< ESADCToGeVConstant > ESTrivialConditionRetriever::produceESADCToGeVConstant ( const ESADCToGeVConstantRcd )
virtual

Definition at line 220 of file ESTrivialConditionRetriever.cc.

221  {
222  return std::make_unique<ESADCToGeVConstant>(adcToGeVLowConstant_, adcToGeVHighConstant_);
223 }

Referenced by ESTrivialConditionRetriever().

◆ produceESChannelStatus()

std::unique_ptr< ESChannelStatus > ESTrivialConditionRetriever::produceESChannelStatus ( const ESChannelStatusRcd )
virtual

Definition at line 337 of file ESTrivialConditionRetriever.cc.

337  {
338  auto ical = std::make_unique<ESChannelStatus>();
339  for (int istrip = ESDetId::ISTRIP_MIN; istrip <= ESDetId::ISTRIP_MAX; istrip++) {
340  for (int ix = ESDetId::IX_MIN; ix <= ESDetId::IX_MAX; ix++) {
341  for (int iy = ESDetId::IY_MIN; iy <= ESDetId::IY_MAX; iy++) {
342  for (int iplane = 1; iplane <= 2; iplane++) {
343  for (int izeta = -1; izeta <= 1; ++izeta) {
344  if (izeta == 0)
345  continue;
346  try {
347  //ESDetId Plane iplane Zside izeta
348  ESDetId anESId(istrip, ix, iy, iplane, izeta);
349  // xtalGroups->setValue(ebid.rawId(), ESStripGroupId(ieta) ); // define rings in eta
350  ical->setValue(anESId, 0);
351  } catch (cms::Exception& e) {
352  }
353  }
354  }
355  }
356  }
357  }
358 
359  return ical;
360 }

References MillePedeFileConverter_cfg::e, ESDetId::ISTRIP_MAX, ESDetId::ISTRIP_MIN, ESDetId::IX_MAX, ESDetId::IX_MIN, ESDetId::IY_MAX, and ESDetId::IY_MIN.

Referenced by ESTrivialConditionRetriever().

◆ produceESIntercalibConstants()

std::unique_ptr< ESIntercalibConstants > ESTrivialConditionRetriever::produceESIntercalibConstants ( const ESIntercalibConstantsRcd )
virtual

Definition at line 191 of file ESTrivialConditionRetriever.cc.

192  {
193  auto ical = std::make_unique<ESIntercalibConstants>();
194  std::cout << "entring produce intercalib " << std::endl;
195 
196  for (int istrip = ESDetId::ISTRIP_MIN; istrip <= ESDetId::ISTRIP_MAX; istrip++) {
197  for (int ix = ESDetId::IX_MIN; ix <= ESDetId::IX_MAX; ix++) {
198  for (int iy = ESDetId::IY_MIN; iy <= ESDetId::IY_MAX; iy++) {
199  for (int iplane = 1; iplane <= 2; iplane++) {
200  for (int izeta = -1; izeta <= 1; ++izeta) {
201  if (izeta == 0)
202  continue;
203  try {
204  //ESDetId Plane iplane Zside izeta
205  ESDetId anESId(istrip, ix, iy, iplane, izeta);
206  double r = (double)std::rand() / (double(RAND_MAX) + double(1));
207  ical->setValue(anESId.rawId(), intercalibConstantMean_ + r * intercalibConstantSigma_);
208  } catch (cms::Exception& e) {
209  }
210  }
211  }
212  }
213  }
214  }
215  std::cout << "done produce intercalib" << std::endl;
216 
217  return ical;
218 }

References gather_cfg::cout, MillePedeFileConverter_cfg::e, ESDetId::ISTRIP_MAX, ESDetId::ISTRIP_MIN, ESDetId::IX_MAX, ESDetId::IX_MIN, ESDetId::IY_MAX, ESDetId::IY_MIN, alignCSCRings::r, and DetId::rawId().

Referenced by ESTrivialConditionRetriever().

◆ produceESPedestals()

std::unique_ptr< ESPedestals > ESTrivialConditionRetriever::produceESPedestals ( const ESPedestalsRcd )
virtual

Definition at line 132 of file ESTrivialConditionRetriever.cc.

132  {
133  std::cout << " producing pedestals" << std::endl;
134  auto peds = std::make_unique<ESPedestals>();
135  ESPedestals::Item ESitem;
136  ESitem.mean = ESpedMean_;
137  ESitem.rms = ESpedRMS_;
138 
139  for (int istrip = ESDetId::ISTRIP_MIN; istrip <= ESDetId::ISTRIP_MAX; istrip++) {
140  for (int ix = ESDetId::IX_MIN; ix <= ESDetId::IX_MAX; ix++) {
141  for (int iy = ESDetId::IY_MIN; iy <= ESDetId::IY_MAX; iy++) {
142  for (int iplane = 1; iplane <= 2; iplane++) {
143  for (int izeta = -1; izeta <= 1; ++izeta) {
144  if (izeta == 0)
145  continue;
146  try {
147  //ESDetId Plane iplane Zside izeta
148  ESDetId aPositiveId(istrip, ix, iy, iplane, izeta);
149  peds->insert(std::make_pair(aPositiveId.rawId(), ESitem));
150  } catch (cms::Exception& e) {
151  }
152  }
153  }
154  }
155  }
156  }
157  //return std::unique_ptr<ESPedestals>( peds );
158  std::cout << " produced pedestals" << std::endl;
159  return peds;
160 }

References gather_cfg::cout, MillePedeFileConverter_cfg::e, ESDetId::ISTRIP_MAX, ESDetId::ISTRIP_MIN, ESDetId::IX_MAX, ESDetId::IX_MIN, ESDetId::IY_MAX, ESDetId::IY_MIN, ESPedestal::mean, DetId::rawId(), and ESPedestal::rms.

Referenced by ESTrivialConditionRetriever().

◆ produceESTBWeights()

std::unique_ptr< ESTBWeights > ESTrivialConditionRetriever::produceESTBWeights ( const ESTBWeightsRcd )
virtual

Definition at line 225 of file ESTrivialConditionRetriever.cc.

225  {
226  // create weights for the test-beam
227  auto tbwgt = std::make_unique<ESTBWeights>();
228 
229  int igrp = 1;
231  // ESWeightSet::ESWeightMatrix& mat1 = wgt.getWeights();
232 
233  tbwgt->setValue(igrp, wgt);
234 
235  return tbwgt;
236 }

Referenced by ESTrivialConditionRetriever().

◆ produceESWeightStripGroups()

std::unique_ptr< ESWeightStripGroups > ESTrivialConditionRetriever::produceESWeightStripGroups ( const ESWeightStripGroupsRcd )
virtual

Definition at line 162 of file ESTrivialConditionRetriever.cc.

163  {
164  auto xtalGroups = std::make_unique<ESWeightStripGroups>();
165  ESStripGroupId defaultGroupId(1);
166  std::cout << "entering produce weight groups" << std::endl;
167  for (int istrip = ESDetId::ISTRIP_MIN; istrip <= ESDetId::ISTRIP_MAX; istrip++) {
168  for (int ix = ESDetId::IX_MIN; ix <= ESDetId::IX_MAX; ix++) {
169  for (int iy = ESDetId::IY_MIN; iy <= ESDetId::IY_MAX; iy++) {
170  for (int iplane = 1; iplane <= 2; iplane++) {
171  for (int izeta = -1; izeta <= 1; ++izeta) {
172  if (izeta == 0)
173  continue;
174  try {
175  //ESDetId Plane iplane Zside izeta
176  ESDetId anESId(istrip, ix, iy, iplane, izeta);
177  // xtalGroups->setValue(ebid.rawId(), ESStripGroupId(ieta) ); // define rings in eta
178  xtalGroups->setValue(anESId.rawId(), defaultGroupId); // define rings in eta
179  } catch (cms::Exception& e) {
180  }
181  }
182  }
183  }
184  }
185  }
186  std::cout << "done with produce weight groups" << std::endl;
187 
188  return xtalGroups;
189 }

References gather_cfg::cout, MillePedeFileConverter_cfg::e, ESDetId::ISTRIP_MAX, ESDetId::ISTRIP_MIN, ESDetId::IX_MAX, ESDetId::IX_MIN, ESDetId::IY_MAX, ESDetId::IY_MIN, and DetId::rawId().

Referenced by ESTrivialConditionRetriever().

◆ setIntervalFor()

void ESTrivialConditionRetriever::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey rk,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oValidity 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 121 of file ESTrivialConditionRetriever.cc.

123  {
124  if (verbose_ >= 1)
125  std::cout << "ESTrivialConditionRetriever::setIntervalFor(): record key = " << rk.name()
126  << "\ttime: " << iTime.time().value() << std::endl;
127  //For right now, we will just use an infinite interval of validity
129 }

References edm::IOVSyncValue::beginOfTime(), gather_cfg::cout, edm::IOVSyncValue::endOfTime(), edm::eventsetup::EventSetupRecordKey::name(), edm::IOVSyncValue::time(), and edm::Timestamp::value().

Member Data Documentation

◆ adcToGeVHighConstant_

double ESTrivialConditionRetriever::adcToGeVHighConstant_
private

Definition at line 74 of file ESTrivialConditionRetriever.h.

◆ adcToGeVLowConstant_

double ESTrivialConditionRetriever::adcToGeVLowConstant_
private

Definition at line 73 of file ESTrivialConditionRetriever.h.

◆ amplWeights_

ESWeightSet ESTrivialConditionRetriever::amplWeights_
private

Definition at line 85 of file ESTrivialConditionRetriever.h.

◆ amplWeightsFile_

std::string ESTrivialConditionRetriever::amplWeightsFile_
private

Definition at line 87 of file ESTrivialConditionRetriever.h.

◆ channelStatusFile_

std::string ESTrivialConditionRetriever::channelStatusFile_
private

Definition at line 89 of file ESTrivialConditionRetriever.h.

◆ ESpedMean_

double ESTrivialConditionRetriever::ESpedMean_
private

Definition at line 82 of file ESTrivialConditionRetriever.h.

◆ ESpedRMS_

double ESTrivialConditionRetriever::ESpedRMS_
private

Definition at line 83 of file ESTrivialConditionRetriever.h.

◆ getWeightsFromFile_

bool ESTrivialConditionRetriever::getWeightsFromFile_
private

Definition at line 91 of file ESTrivialConditionRetriever.h.

◆ intercalibConstantMean_

double ESTrivialConditionRetriever::intercalibConstantMean_
private

Definition at line 76 of file ESTrivialConditionRetriever.h.

◆ intercalibConstantsFile_

std::string ESTrivialConditionRetriever::intercalibConstantsFile_
private

Definition at line 88 of file ESTrivialConditionRetriever.h.

◆ intercalibConstantSigma_

double ESTrivialConditionRetriever::intercalibConstantSigma_
private

Definition at line 77 of file ESTrivialConditionRetriever.h.

◆ producedESADCToGeVConstant_

bool ESTrivialConditionRetriever::producedESADCToGeVConstant_
private

Definition at line 95 of file ESTrivialConditionRetriever.h.

◆ producedESChannelStatus_

bool ESTrivialConditionRetriever::producedESChannelStatus_
private

Definition at line 96 of file ESTrivialConditionRetriever.h.

◆ producedESIntercalibConstants_

bool ESTrivialConditionRetriever::producedESIntercalibConstants_
private

Definition at line 94 of file ESTrivialConditionRetriever.h.

◆ producedESPedestals_

bool ESTrivialConditionRetriever::producedESPedestals_
private

Definition at line 92 of file ESTrivialConditionRetriever.h.

◆ producedESWeights_

bool ESTrivialConditionRetriever::producedESWeights_
private

Definition at line 93 of file ESTrivialConditionRetriever.h.

◆ verbose_

int ESTrivialConditionRetriever::verbose_
private

Definition at line 98 of file ESTrivialConditionRetriever.h.

ESTrivialConditionRetriever::ESpedMean_
double ESpedMean_
Definition: ESTrivialConditionRetriever.h:82
ESTrivialConditionRetriever::getChannelStatusFromConfiguration
virtual std::unique_ptr< ESChannelStatus > getChannelStatusFromConfiguration(const ESChannelStatusRcd &)
Definition: ESTrivialConditionRetriever.cc:271
ESTrivialConditionRetriever::producedESIntercalibConstants_
bool producedESIntercalibConstants_
Definition: ESTrivialConditionRetriever.h:94
ESTrivialConditionRetriever::adcToGeVLowConstant_
double adcToGeVLowConstant_
Definition: ESTrivialConditionRetriever.h:73
ESTrivialConditionRetriever::verbose_
int verbose_
Definition: ESTrivialConditionRetriever.h:98
ESDetId::ISTRIP_MIN
static const int ISTRIP_MIN
Definition: ESDetId.h:68
ESTrivialConditionRetriever::produceESChannelStatus
virtual std::unique_ptr< ESChannelStatus > produceESChannelStatus(const ESChannelStatusRcd &)
Definition: ESTrivialConditionRetriever.cc:337
mps_update.status
status
Definition: mps_update.py:68
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
ESTrivialConditionRetriever::adcToGeVHighConstant_
double adcToGeVHighConstant_
Definition: ESTrivialConditionRetriever.h:74
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ESTrivialConditionRetriever::getWeightsFromFile_
bool getWeightsFromFile_
Definition: ESTrivialConditionRetriever.h:91
ESTrivialConditionRetriever::ESpedRMS_
double ESpedRMS_
Definition: ESTrivialConditionRetriever.h:83
edm::Timestamp::value
TimeValue_t value() const
Definition: Timestamp.h:45
ESDetId
Definition: ESDetId.h:15
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
ESDetId::IY_MIN
static const int IY_MIN
Definition: ESDetId.h:65
edm::FileInPath
Definition: FileInPath.h:61
ESTrivialConditionRetriever::intercalibConstantMean_
double intercalibConstantMean_
Definition: ESTrivialConditionRetriever.h:76
ESTrivialConditionRetriever::producedESChannelStatus_
bool producedESChannelStatus_
Definition: ESTrivialConditionRetriever.h:96
ESPedestal
Definition: ESPedestals.h:8
str
#define str(s)
Definition: TestProcessor.cc:53
ESStripGroupId
Definition: ESStripGroupId.h:6
edm::eventsetup::EventSetupRecordKey::name
const char * name() const
Definition: EventSetupRecordKey.h:46
dqmdumpme.k
k
Definition: dqmdumpme.py:60
ESTrivialConditionRetriever::produceESIntercalibConstants
virtual std::unique_ptr< ESIntercalibConstants > produceESIntercalibConstants(const ESIntercalibConstantsRcd &)
Definition: ESTrivialConditionRetriever.cc:191
ESTrivialConditionRetriever::produceESPedestals
virtual std::unique_ptr< ESPedestals > produceESPedestals(const ESPedestalsRcd &)
Definition: ESTrivialConditionRetriever.cc:132
ESTrivialConditionRetriever::amplWeights_
ESWeightSet amplWeights_
Definition: ESTrivialConditionRetriever.h:85
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
ESDetId::ISTRIP_MAX
static const int ISTRIP_MAX
Definition: ESDetId.h:69
ESTrivialConditionRetriever::producedESPedestals_
bool producedESPedestals_
Definition: ESTrivialConditionRetriever.h:92
ESTrivialConditionRetriever::produceESADCToGeVConstant
virtual std::unique_ptr< ESADCToGeVConstant > produceESADCToGeVConstant(const ESADCToGeVConstantRcd &)
Definition: ESTrivialConditionRetriever.cc:220
ESTrivialConditionRetriever::getWeightsFromConfiguration
void getWeightsFromConfiguration(const edm::ParameterSet &ps)
Definition: ESTrivialConditionRetriever.cc:238
ESPedestal::rms
float rms
Definition: ESPedestals.h:17
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
ESTrivialConditionRetriever::channelStatusFile_
std::string channelStatusFile_
Definition: ESTrivialConditionRetriever.h:89
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ESTrivialConditionRetriever::producedESADCToGeVConstant_
bool producedESADCToGeVConstant_
Definition: ESTrivialConditionRetriever.h:95
ESDetId::IY_MAX
static const int IY_MAX
Definition: ESDetId.h:67
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ESTrivialConditionRetriever::intercalibConstantSigma_
double intercalibConstantSigma_
Definition: ESTrivialConditionRetriever.h:77
ESPedestal::mean
float mean
Definition: ESPedestals.h:16
ESWeightSet
Definition: ESWeightSet.h:10
edm::IOVSyncValue::time
const Timestamp & time() const
Definition: IOVSyncValue.h:42
ESWeightSet::ESWeightMatrix
math::Matrix< 2, 3 >::type ESWeightMatrix
Definition: ESWeightSet.h:12
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
ESTrivialConditionRetriever::produceESTBWeights
virtual std::unique_ptr< ESTBWeights > produceESTBWeights(const ESTBWeightsRcd &)
Definition: ESTrivialConditionRetriever.cc:225
ESDetId::unhashIndex
static ESDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: ESDetId.cc:32
ESTrivialConditionRetriever::amplWeightsFile_
std::string amplWeightsFile_
Definition: ESTrivialConditionRetriever.h:87
Exception
Definition: hltDiff.cc:245
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
ESDetId::IX_MIN
static const int IX_MIN
Definition: ESDetId.h:64
ESTrivialConditionRetriever::produceESWeightStripGroups
virtual std::unique_ptr< ESWeightStripGroups > produceESWeightStripGroups(const ESWeightStripGroupsRcd &)
Definition: ESTrivialConditionRetriever.cc:162
cms::Exception
Definition: Exception.h:70
ESDetId::IX_MAX
static const int IX_MAX
Definition: ESDetId.h:66
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
ESTrivialConditionRetriever::intercalibConstantsFile_
std::string intercalibConstantsFile_
Definition: ESTrivialConditionRetriever.h:88
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ESTrivialConditionRetriever::producedESWeights_
bool producedESWeights_
Definition: ESTrivialConditionRetriever.h:93
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:161
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37