CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
popcon::EcalLaserHandler Class Reference

#include <EcalLaserHandler.h>

Inheritance diagram for popcon::EcalLaserHandler:
popcon::PopConSourceHandler< EcalLaserAPDPNRatios >

Public Member Functions

bool checkAPDPN (const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &old, const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &current, int hashedIndex)
 
bool checkAPDPNs (const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap &laserMap, const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap &apdpns_popcon)
 
double diff (float x, float old_x)
 
void dumpBarrelPayload (EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &laserMap)
 
void dumpEndcapPayload (EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &laserMap)
 
 EcalLaserHandler (edm::ParameterSet const &)
 
void getNewObjects () override
 
std::string id () const override
 
void notifyProblems (const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &old, const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &current, int hashedIndex, const std::string &reason)
 
 ~EcalLaserHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< EcalLaserAPDPNRatios >
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const *, std::string const > operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Public Attributes

EcalCondDBInterfaceeconn
 

Private Attributes

bool m_debug
 
bool m_fake
 
std::string m_maxtime
 
std::string m_name
 
std::string m_pass
 
unsigned long m_sequences
 
std::string m_sid
 
std::string m_user
 
const EcalLaserAPDPNRatiosmyapdpns
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< EcalLaserAPDPNRatios >
typedef std::map< Time_t, std::shared_ptr< EcalLaserAPDPNRatios > > Container
 
typedef std::unique_ptr< EcalLaserAPDPNRatiosRef
 
typedef PopConSourceHandler< EcalLaserAPDPNRatiosself
 
typedef cond::Time_t Time_t
 
typedef EcalLaserAPDPNRatios value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< EcalLaserAPDPNRatios >
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< EcalLaserAPDPNRatios >
Container m_iovs
 
std::vector< std::pair< EcalLaserAPDPNRatios *, Time_t > > m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 51 of file EcalLaserHandler.h.

Constructor & Destructor Documentation

◆ ~EcalLaserHandler()

popcon::EcalLaserHandler::~EcalLaserHandler ( )
override

Definition at line 35 of file EcalLaserHandler.cc.

35  {
36  // do nothing
37 }

◆ EcalLaserHandler()

popcon::EcalLaserHandler::EcalLaserHandler ( edm::ParameterSet const &  ps)

Definition at line 13 of file EcalLaserHandler.cc.

References gather_cfg::cout, edm::ParameterSet::getParameter(), m_debug, m_fake, m_maxtime, m_pass, m_sequences, m_sid, m_user, and AlCaHLTBitMon_QueryRunRegistry::string.

14  : m_name(ps.getUntrackedParameter<std::string>("name", "EcalLaserHandler")) {
15  std::cout << "EcalLaser Source handler constructor\n" << std::endl;
16 
17  m_sequences = 1;
18  m_fake = true;
19 
20  m_sid = ps.getParameter<std::string>("OnlineDBSID");
21  m_user = ps.getParameter<std::string>("OnlineDBUser");
22  m_pass = ps.getParameter<std::string>("OnlineDBPassword");
23  m_debug = ps.getParameter<bool>("debug");
24  m_fake = ps.getParameter<bool>("fake");
25  m_sequences = static_cast<unsigned int>(atoi(ps.getParameter<std::string>("sequences").c_str()));
26  m_maxtime = ps.getParameter<std::string>("maxtime");
27  std::cout << "Starting O2O process on DB: " << m_sid << " User: " << m_user << std::endl;
28  if (m_fake) {
29  std::cout << "*******************************************" << std::endl;
30  std::cout << "This is a fake run. No change to offline DB" << std::endl;
31  std::cout << "*******************************************" << std::endl;
32  }
33 }

Member Function Documentation

◆ checkAPDPN()

bool popcon::EcalLaserHandler::checkAPDPN ( const EcalLaserAPDPNRatios::EcalLaserAPDPNpair old,
const EcalLaserAPDPNRatios::EcalLaserAPDPNpair current,
int  hashedIndex 
)

Definition at line 57 of file EcalLaserHandler.cc.

References change_name::diff, ecalpyutils::hashedIndex(), EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, and runTheMatrix::ret.

59  {
60  bool ret = true;
61  if ((current.p1 < 0) || (current.p2 < 0) || (current.p3 < 0)) {
62  ret = false;
63  notifyProblems(old, current, hashedIndex, "Negative values");
64  } else if ((current.p1 > 10) || (current.p2 > 10) || (current.p3 > 10)) {
65  ret = false;
66  notifyProblems(old, current, hashedIndex, "Values too large");
67  } else if (((diff(old.p1, current.p1) > 0.2) && (old.p1 != 0) && (old.p1 != 1)) ||
68  ((diff(old.p2, current.p2) > 0.2) && (old.p2 != 0) && (old.p1 != 2)) ||
69  ((diff(old.p3, current.p3) > 0.2) && (old.p3 != 0) && (old.p1 != 3))) {
70  ret = false;
71  notifyProblems(old, current, hashedIndex, "Difference w.r.t. previous too large");
72  }
73  return ret;
74 }
ret
prodAgent to be discontinued
void notifyProblems(const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &old, const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &current, int hashedIndex, const std::string &reason)
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
double diff(float x, float old_x)

◆ checkAPDPNs()

bool popcon::EcalLaserHandler::checkAPDPNs ( const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap laserMap,
const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap apdpns_popcon 
)

Definition at line 76 of file EcalLaserHandler.cc.

References EcalCondObjectContainer< T >::barrel(), EcalCondObjectContainer< T >::endcap(), ecalpyutils::hashedIndex(), and runTheMatrix::ret.

77  {
78  bool ret = true;
79  for (int hashedIndex = 0; hashedIndex < 61200; hashedIndex++) {
82  ret = checkAPDPN(old, current, hashedIndex);
83  }
84  for (int hashedIndex = 0; hashedIndex < 14648; hashedIndex++) {
87  ret = checkAPDPN(old, current, -hashedIndex);
88  }
89  return ret;
90 }
ret
prodAgent to be discontinued
const Item & barrel(size_t hashedIndex) const
bool checkAPDPN(const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &old, const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &current, int hashedIndex)
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
const Item & endcap(size_t hashedIndex) const

◆ diff()

double popcon::EcalLaserHandler::diff ( float  x,
float  old_x 
)

Definition at line 39 of file EcalLaserHandler.cc.

References a, funct::abs(), and b.

39 { return std::abs(b - a) / a; }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119

◆ dumpBarrelPayload()

void popcon::EcalLaserHandler::dumpBarrelPayload ( EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &  laserMap)

Definition at line 92 of file EcalLaserHandler.cc.

References EcalCondObjectContainer< T >::barrelItems(), c, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, MillePedeFileConverter_cfg::e, test_db_connect::econn, Exception, alignBH_cfg::fixed, mps_fire::i, EBDetId::ieta(), EBDetId::iphi(), EcalLogicID::NULLID, and EBDetId::unhashIndex().

92  {
93  int c = 0;
96  EBDetId eb;
97  try {
99  while (i != e) {
100  if (c % 1000 == 0) {
101  std::cout << std::setw(5) << c << ": " << eb.unhashIndex(c) << " "
102  << econn
103  ->getEcalLogicID("EB_crystal_angle",
104  eb.unhashIndex(c).ieta(),
105  eb.unhashIndex(c).iphi(),
107  "EB_crystal_number")
108  .getLogicID()
109  << " " << std::setiosflags(std::ios::fixed) << std::setprecision(9) << i->p1 << " " << i->p2 << " "
110  << i->p3 << std::endl;
111  }
112  i++;
113  c++;
114  }
115  delete econn;
116  } catch (std::runtime_error &e) {
117  std::cerr << e.what() << std::endl;
118  delete econn;
119  throw cms::Exception("OMDS not available");
120  }
121 }
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
EcalCondDBInterface * econn
std::vector< Item >::const_iterator const_iterator
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
static const int NULLID
Definition: EcalLogicID.h:35

◆ dumpEndcapPayload()

void popcon::EcalLaserHandler::dumpEndcapPayload ( EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &  laserMap)

Definition at line 123 of file EcalLaserHandler.cc.

References c, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, MillePedeFileConverter_cfg::e, test_db_connect::econn, EcalCondObjectContainer< T >::endcapItems(), Exception, alignBH_cfg::fixed, mps_fire::i, EEDetId::ix(), EEDetId::iy(), EEDetId::unhashIndex(), and EEDetId::zside().

123  {
124  int c = 0;
125  EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap::const_iterator i = laserMap.endcapItems().begin();
127  EEDetId ee;
128  try {
130  while (i != e) {
131  if (c % 1000 == 0) {
132  std::cout << std::setw(5) << c << ": " << ee.unhashIndex(c) << " "
133  << econn
134  ->getEcalLogicID("EE_crystal_number",
135  ee.unhashIndex(c).zside(),
136  ee.unhashIndex(c).ix(),
137  ee.unhashIndex(c).iy(),
138  "EE_crystal_number")
139  .getLogicID()
140  << " " << std::setiosflags(std::ios::fixed) << std::setprecision(9) << i->p1 << " " << i->p2 << " "
141  << i->p3 << std::endl;
142  }
143  i++;
144  c++;
145  }
146  delete econn;
147  } catch (std::runtime_error &e) {
148  std::cerr << e.what() << std::endl;
149  delete econn;
150  throw cms::Exception("OMDS not available");
151  }
152 }
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
int ix() const
Definition: EEDetId.h:77
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
EcalCondDBInterface * econn
int zside() const
Definition: EEDetId.h:71
std::vector< Item >::const_iterator const_iterator
int iy() const
Definition: EEDetId.h:83

◆ getNewObjects()

void popcon::EcalLaserHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< EcalLaserAPDPNRatios >.

Definition at line 154 of file EcalLaserHandler.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, Tm::cmsNanoSeconds(), submitPVResolutionJobs::count, gather_cfg::cout, ztail::d, data, MillePedeFileConverter_cfg::e, test_db_connect::econn, Exception, ecalpyutils::hashedIndex(), mps_fire::i, L1TowerCalibrationProducer_cfi::iEta, EcalLogicID::NULLID, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, jetsAK4_Puppi_cff::payload, EcalLaserAPDPNRatios::setTime(), EcalLaserAPDPNRatios::setValue(), EcalCondObjectContainer< T >::size(), contentValuesCheck::ss, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t1, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t2, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t3, dumpRecoGeometry_cfg::tagInfo, cond::timestamp, tmax, muonTiming_cfi::tmin, and edm::Timestamp::value().

154  {
155  std::cerr << "------- " << m_name << " ---> getNewObjects" << std::endl;
156 
157  std::cout << "------- Ecal -> getNewObjects\n";
158 
159  unsigned long long max_since = 1;
160  Ref payload = lastPayload();
161 
162  // here popcon tells us which is the last since of the last object in the
163  // offline DB
164  max_since = tagInfo().lastInterval.since;
165  // Tm max_since_tm((max_since >> 32)*1000000);
166  Tm max_since_tm(max_since);
167  // get the last object in the orcoff
168  edm::Timestamp t_min = edm::Timestamp(18446744073709551615ULL);
169 
170  const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap &laserRatiosMap = payload->getLaserMap();
171  std::cout << "payload->getLaserMap(): OK " << std::endl;
172  std::cout << "Its size is " << laserRatiosMap.size() << std::endl;
173  const EcalLaserAPDPNRatios::EcalLaserTimeStampMap &laserTimeMap = payload->getTimeMap();
174  std::cout << "payload->getTimeMap(): OK " << std::endl;
175  std::cout << "Last Object in Offline DB has SINCE = " << max_since << " -> " << max_since_tm.cmsNanoSeconds() << " ("
176  << max_since_tm << ")"
177  << " and SIZE = " << tagInfo().size << std::endl;
178  // loop through light modules and determine the minimum date among the
179  // available channels
180  if (m_debug) {
181  dumpBarrelPayload(laserRatiosMap);
182  dumpEndcapPayload(laserRatiosMap);
183  }
184  for (int i = 0; i < 92; i++) {
186  if (t_min > timestamp.t1) {
187  t_min = timestamp.t1;
188  }
189  }
190 
191  std::cout << "WOW: we just retrieved the last valid record from DB " << std::endl;
192  //std::cout <<"Its tmin is "<< Tm((t_min.value() >> 32)*1000000)
193  std::cout << "Its tmin is " << Tm(t_min.value()) << std::endl;
194 
195  // connect to the database
196  try {
197  std::cout << "Making connection..." << std::flush;
199  std::cout << "Done." << std::endl;
200  } catch (std::runtime_error &e) {
201  std::cout << " connection parameters " << m_sid << "/" << m_user;
202  if (m_debug) {
203  std::cout << "/" << m_pass << std::endl;
204  } else {
205  std::cout << "/**********" << std::endl;
206  }
207  std::cerr << e.what() << std::endl;
208  throw cms::Exception("OMDS not available");
209  }
210 
211  // retrieve the lists of logic_ids, to build the detids
212  std::vector<EcalLogicID> crystals_EB = econn->getEcalLogicIDSetOrdered(
213  "EB_crystal_angle", -85, 85, 1, 360, EcalLogicID::NULLID, EcalLogicID::NULLID, "EB_crystal_number", 4);
214  std::vector<EcalLogicID> crystals_EE =
215  econn->getEcalLogicIDSetOrdered("EE_crystal_number", -1, 1, 1, 100, 1, 100, "EE_crystal_number", 4);
216 
217  std::vector<EcalLogicID>::const_iterator ieb = crystals_EB.begin();
218  std::vector<EcalLogicID>::const_iterator eeb = crystals_EB.end();
219 
220  std::cout << "Got list of " << crystals_EB.size() << " crystals in EB" << std::endl;
221  std::cout << "Got list of " << crystals_EE.size() << " crystals in EE" << std::endl;
222  // loop through barrel
223  int count = 0;
224  // prepare a map to associate EB logic id's to detids
225  std::map<int, int> detids;
226  while (ieb != eeb) {
227  int iEta = ieb->getID1();
228  int iPhi = ieb->getID2();
229  count++;
230  EBDetId ebdetid(iEta, iPhi);
231  // unsigned int hieb = ebdetid.hashedIndex();
232  detids[ieb->getLogicID()] = ebdetid;
233  ieb++;
234  }
235  std::cout << "Validated " << count << " logic ID's for EB" << std::endl;
236 
237  // do the same for EE
238 
239  std::vector<EcalLogicID>::const_iterator iee = crystals_EE.begin();
240  std::vector<EcalLogicID>::const_iterator eee = crystals_EE.end();
241 
242  count = 0;
243  while (iee != eee) {
244  int iSide = iee->getID1();
245  int iX = iee->getID2();
246  int iY = iee->getID3();
247  EEDetId eedetidpos(iX, iY, iSide);
248  // int hi = eedetidpos.hashedIndex();
249  detids[iee->getLogicID()] = eedetidpos;
250  count++;
251  iee++;
252  }
253  std::cout << "Validated " << count << " logic ID's for EE" << std::endl;
254 
255  // get association between ecal logic id and LMR
256  std::map<int, int> logicId2Lmr = econn->getEcalLogicID2LmrMap();
257 
258  std::cout << "Retrieving corrections from ONLINE DB ... " << std::endl;
259 
261  if (m_debug) {
262  data.debug();
263  }
264  // get all data in the database taken after the last available time in ORCOFF
265  // we associate another map, whose key is the crystal ID and whose value is a
266  // sextuple (p1, p2, p3, t1, t2, t3)
267  Tm tmax;
268  if (m_maxtime[0] == '-') {
269  // this is a time relative to now
270  tmax.setToCurrentLocalTime();
271  if (m_debug) {
272  std::cout << "Subtracting " << m_maxtime.substr(1) << " hours "
273  << "to " << tmax.str() << std::endl;
274  std::cout << "tmax was " << tmax.microsTime() << " ns" << std::endl;
275  }
276  tmax -= atoi(m_maxtime.substr(1).c_str()) * 3600; //
277  if (m_debug) {
278  std::cout << "tmax is " << tmax.microsTime() << " ns" << std::endl;
279  }
280  } else {
281  if (m_debug) {
282  std::cout << "Setting t_max to " << m_maxtime << std::endl;
283  }
284  tmax.setToString(m_maxtime);
285  }
286  // Tm tmin = Tm((t_min.value() >> 32)*1000000);
287  Tm tmin = Tm(t_min.value());
288  /*
289  Tm strunz;
290  strunz.setToString("2011-04-11 20:50:08");
291  if (tmin < strunz) {
292  tmin = strunz;
293  }
294  */
295 
296  if (m_debug) {
297  std::cout << "Tmin: " << tmin << std::endl;
298  std::cout << "Tmax: " << tmax << std::endl;
299  }
300 
301  std::map<int, std::map<int, LMFSextuple> > d = data.getCorrections(tmin, tmax, m_sequences);
302  // sice must be equal to the number of different SEQ_ID's found
303  std::cout << "Data organized into " << d.size() << " sequences" << std::endl;
304  // iterate over sequences
305  std::map<int, std::map<int, LMFSextuple> >::const_iterator iseq = d.begin();
306  std::map<int, std::map<int, LMFSextuple> >::const_iterator eseq = d.end();
307  std::cout << "===== Looping on Sequences" << std::endl;
308  while (iseq != eseq) {
309  std::cout << "==== SEQ_ID: " << iseq->first << " contains " << iseq->second.size() << " crystals" << std::endl
310  << std::flush;
311  // iterate over crystals, but skip those sequences with wrong number of crystals
312  if (iseq->second.size() == (61200 + 14648)) {
313  std::map<int, LMFSextuple>::const_iterator is = iseq->second.begin();
314  std::map<int, LMFSextuple>::const_iterator es = iseq->second.end();
315  EcalLaserAPDPNRatios *apdpns_popcon = new EcalLaserAPDPNRatios();
316  Time_t t_last = 18446744073709551615ULL;
317  while (is != es) {
319  apdpnpair_temp.p1 = is->second.p[0];
320  apdpnpair_temp.p2 = is->second.p[1];
321  apdpnpair_temp.p3 = is->second.p[2];
323  timestamp_temp.t1 = edm::Timestamp(is->second.t[0].cmsNanoSeconds());
324  timestamp_temp.t2 = edm::Timestamp(is->second.t[1].cmsNanoSeconds());
325  timestamp_temp.t3 = edm::Timestamp(is->second.t[2].cmsNanoSeconds());
326  apdpns_popcon->setValue(detids[is->first], apdpnpair_temp);
327  if (logicId2Lmr.find(is->first) != logicId2Lmr.end()) {
328  int hashedIndex = logicId2Lmr[is->first] - 1;
329  if ((hashedIndex >= 0) && (hashedIndex <= 91)) {
330  apdpns_popcon->setTime(hashedIndex, timestamp_temp);
331  if (t_last > timestamp_temp.t1.value()) {
332  t_last = timestamp_temp.t1.value();
333  }
334  } else {
335  std::stringstream ss;
336  ss << "LOGIC_ID: " << is->first << " LMR: " << hashedIndex + 1 << " Out of range";
337  throw(std::runtime_error("[EcalLaserHandler::getNewObjects]" + ss.str()));
338  }
339  } else {
340  std::stringstream ss;
341  ss << "LOGIC_ID: " << is->first << " Cannot determine LMR";
342  throw(std::runtime_error("[EcalLaserHandler::getNewObjects]" + ss.str()));
343  }
344  is++;
345  }
346  if (m_fake) {
347  delete apdpns_popcon;
348  }
349  if ((!iseq->second.empty()) && (!m_fake)) {
350  m_to_transfer.push_back(std::make_pair(apdpns_popcon, Tm(t_last).cmsNanoSeconds()));
351  }
352  } else {
353  // Here we should put a warning
354  }
355  iseq++;
356  }
357  std::cout << "==== END OF LOOP ON SEQUENCES" << std::endl << std::flush;
358  delete econn;
359  std::cout << "Ecal -> end of getNewObjects -----------\n";
360 }
void dumpEndcapPayload(EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &laserMap)
Iov_t lastInterval
Definition: Types.h:73
Time_t since
Definition: Types.h:53
size_t size
Definition: Types.h:74
EcalCondDBInterface * econn
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
void setTime(int hashedIndex, const EcalLaserTimeStamp &value)
std::vector< EcalLogicID > getEcalLogicIDSetOrdered(std::string name, int fromId1, int toId1, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="", int orderedBy=EcalLogicID::NULLID) noexcept(false)
std::vector< std::pair< EcalLaserAPDPNRatios *, Time_t > > m_to_transfer
std::map< int, int > getEcalLogicID2LmrMap()
d
Definition: ztail.py:151
static const double tmax[3]
TimeValue_t value() const
Definition: Timestamp.h:45
std::vector< EcalLaserTimeStamp > EcalLaserTimeStampMap
void setValue(uint32_t rawId, const EcalLaserAPDPNpair &value)
std::unique_ptr< EcalLaserAPDPNRatios > Ref
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
static const int NULLID
Definition: EcalLogicID.h:35
void dumpBarrelPayload(EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &laserMap)
Definition: Tm.h:13

◆ id()

std::string popcon::EcalLaserHandler::id ( ) const
inlineoverridevirtual

Implements popcon::PopConSourceHandler< EcalLaserAPDPNRatios >.

Definition at line 59 of file EcalLaserHandler.h.

References m_name.

59 { return m_name; }

◆ notifyProblems()

void popcon::EcalLaserHandler::notifyProblems ( const EcalLaserAPDPNRatios::EcalLaserAPDPNpair old,
const EcalLaserAPDPNRatios::EcalLaserAPDPNpair current,
int  hashedIndex,
const std::string &  reason 
)

Definition at line 41 of file EcalLaserHandler.cc.

References gather_cfg::cout, ecalpyutils::hashedIndex(), EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, PixelMapPlotter::reason, EBDetId::unhashIndex(), and EEDetId::unhashIndex().

44  {
45  std::cout << "===== " << reason << " =====" << std::endl;
46  if (hashedIndex < 0) {
47  EEDetId ee;
48  std::cout << "Triplets for " << ee.unhashIndex(-hashedIndex) << " bad: [" << old.p1 << ", " << old.p2 << ", "
49  << old.p3 << "] ==> [" << current.p1 << ", " << current.p2 << ", " << current.p3 << "]" << std::endl;
50  } else {
51  EBDetId eb;
52  std::cout << "Triplets for " << eb.unhashIndex(hashedIndex) << " bad: [" << old.p1 << ", " << old.p2 << ", "
53  << old.p3 << "] ==> [" << current.p1 << ", " << current.p2 << ", " << current.p3 << "]" << std::endl;
54  }
55 }
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110

Member Data Documentation

◆ econn

EcalCondDBInterface* popcon::EcalLaserHandler::econn

Definition at line 58 of file EcalLaserHandler.h.

◆ m_debug

bool popcon::EcalLaserHandler::m_debug
private

Definition at line 81 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

◆ m_fake

bool popcon::EcalLaserHandler::m_fake
private

Definition at line 82 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

◆ m_maxtime

std::string popcon::EcalLaserHandler::m_maxtime
private

Definition at line 80 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

◆ m_name

std::string popcon::EcalLaserHandler::m_name
private

Definition at line 79 of file EcalLaserHandler.h.

Referenced by id().

◆ m_pass

std::string popcon::EcalLaserHandler::m_pass
private

Definition at line 78 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

◆ m_sequences

unsigned long popcon::EcalLaserHandler::m_sequences
private

Definition at line 75 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

◆ m_sid

std::string popcon::EcalLaserHandler::m_sid
private

Definition at line 76 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

◆ m_user

std::string popcon::EcalLaserHandler::m_user
private

Definition at line 77 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

◆ myapdpns

const EcalLaserAPDPNRatios* popcon::EcalLaserHandler::myapdpns
private

Definition at line 74 of file EcalLaserHandler.h.