CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
std::string id () const
 
void notifyProblems (const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &old, const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &current, int hashedIndex, const std::string &reason)
 
 ~EcalLaserHandler ()
 
- Public Member Functions inherited from popcon::PopConSourceHandler< EcalLaserAPDPNRatios >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (cond::DbSession dbSession, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry const & logDBEntry () const
 
std::pair< Container const
*, std::string const > 
operator() (cond::DbSession session, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo 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::vector< TripletContainer
 
typedef std::vector< std::pair
< EcalLaserAPDPNRatios
*, cond::Time_t > > 
OldContainer
 
typedef PopConSourceHandler
< EcalLaserAPDPNRatios
self
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef EcalLaserAPDPNRatios value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< EcalLaserAPDPNRatios >
int add (value_type *payload, Summary *summary, Time_t time)
 
- Protected Attributes inherited from popcon::PopConSourceHandler< EcalLaserAPDPNRatios >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 55 of file EcalLaserHandler.h.

Constructor & Destructor Documentation

popcon::EcalLaserHandler::~EcalLaserHandler ( )

Definition at line 37 of file EcalLaserHandler.cc.

38 {
39  // do nothing
40 }
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, and m_user.

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

Member Function Documentation

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

Definition at line 63 of file EcalLaserHandler.cc.

References diffTreeTool::diff, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, and run_regression::ret.

65  {
66  bool ret = true;
67  if ((current.p1 < 0) || (current.p2 < 0) || (current.p3 < 0)) {
68  ret = false;
69  notifyProblems(old, current, hashedIndex, "Negative values");
70  } else if ((current.p1 > 10) || (current.p2 > 10) || (current.p3 > 10)) {
71  ret = false;
72  notifyProblems(old, current, hashedIndex, "Values too large");
73  } else if (((diff(old.p1, current.p1) > 0.2) && (old.p1 != 0) && (old.p1 != 1)) ||
74  ((diff(old.p2, current.p2) > 0.2) && (old.p2 != 0) && (old.p1 != 2)) ||
75  ((diff(old.p3, current.p3) > 0.2) && (old.p3 != 0) && (old.p1 != 3))) {
76  ret = false;
77  notifyProblems(old, current, hashedIndex, "Difference w.r.t. previous too large");
78  }
79  return ret;
80 }
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:42
double diff(float x, float old_x)
bool popcon::EcalLaserHandler::checkAPDPNs ( const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap laserMap,
const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap apdpns_popcon 
)

Definition at line 82 of file EcalLaserHandler.cc.

References EcalCondObjectContainer< T >::barrel(), cond::rpcobimon::current, EcalCondObjectContainer< T >::endcap(), ecalpyutils::hashedIndex(), and run_regression::ret.

83  {
84  bool ret = true;
85  for (int hashedIndex = 0; hashedIndex < 61200; hashedIndex++) {
88  ret = checkAPDPN(old, current, hashedIndex);
89  }
90  for (int hashedIndex = 0; hashedIndex < 14648; hashedIndex++) {
93  ret = checkAPDPN(old, current, -hashedIndex);
94  }
95  return ret;
96 }
bool checkAPDPN(const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &old, const EcalLaserAPDPNRatios::EcalLaserAPDPNpair &current, int hashedIndex)
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
const Item & barrel(size_t hashedIndex) const
const Item & endcap(size_t hashedIndex) const
double popcon::EcalLaserHandler::diff ( float  x,
float  old_x 
)

Definition at line 42 of file EcalLaserHandler.cc.

References a, and abs.

42  {
43  return std::abs(b- a)/a;
44 }
#define abs(x)
Definition: mlp_lapack.h:159
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void popcon::EcalLaserHandler::dumpBarrelPayload ( EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &  laserMap)

Definition at line 98 of file EcalLaserHandler.cc.

References EcalCondObjectContainer< T >::barrelItems(), trackerHits::c, dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, alignCSCRings::e, edm::hlt::Exception, EcalCondDBInterface::getEcalLogicID(), i, EBDetId::ieta(), EBDetId::iphi(), EcalLogicID::NULLID, and EBDetId::unhashIndex().

98  {
99  int c = 0;
100  EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap::const_iterator i = laserMap.barrelItems().begin();
102  EBDetId eb;
103  try {
105  while (i != e) {
106  if (c % 1000 == 0) {
107  std::cout << std::setw(5) << c << ": " << eb.unhashIndex(c) << " "
108  << econn->getEcalLogicID("EB_crystal_angle", eb.unhashIndex(c).ieta(),
110  "EB_crystal_number").getLogicID()
111  << " " << std::setiosflags(std::ios::fixed) << std::setprecision(9)
112  << i->p1 << " " << i->p2 << " " << i->p3 << std::endl;
113  }
114  i++;
115  c++;
116  }
117  delete econn;
118  }
119  catch (std::runtime_error &e) {
120  std::cerr << e.what() << std::endl;
121  delete econn;
122  throw cms::Exception("OMDS not available");
123  }
124 }
int i
Definition: DBlmapReader.cc:9
int iphi() const
get the crystal iphi
Definition: EBDetId.h:46
EcalCondDBInterface * econn
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="")
int ieta() const
get the crystal ieta
Definition: EBDetId.h:44
std::vector< Item >::const_iterator const_iterator
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.cc:12
static const int NULLID
Definition: EcalLogicID.h:43
tuple cout
Definition: gather_cfg.py:121
void popcon::EcalLaserHandler::dumpEndcapPayload ( EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &  laserMap)

Definition at line 126 of file EcalLaserHandler.cc.

References trackerHits::c, dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, alignCSCRings::e, EcalCondObjectContainer< T >::endcapItems(), edm::hlt::Exception, EcalCondDBInterface::getEcalLogicID(), i, EEDetId::ix(), EEDetId::iy(), EEDetId::unhashIndex(), and EEDetId::zside().

126  {
127  int c = 0;
128  EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap::const_iterator i = laserMap.endcapItems().begin();
130  EEDetId ee;
131  try {
133  while (i != e) {
134  if (c % 1000 == 0) {
135  std::cout << std::setw(5) << c << ": " << ee.unhashIndex(c) << " "
136  << econn->getEcalLogicID("EE_crystal_number", ee.unhashIndex(c).zside(),
137  ee.unhashIndex(c).ix(), ee.unhashIndex(c).iy(),
138  "EE_crystal_number").getLogicID()
139  << " " << std::setiosflags(std::ios::fixed) << std::setprecision(9)
140  << i->p1 << " " << i->p2 << " " << i->p3 << std::endl;
141  }
142  i++;
143  c++;
144  }
145  delete econn;
146  }
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 }
int i
Definition: DBlmapReader.cc:9
int ix() const
Definition: EEDetId.h:71
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:115
EcalCondDBInterface * econn
EcalLogicID getEcalLogicID(std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="")
int zside() const
Definition: EEDetId.h:65
int iy() const
Definition: EEDetId.h:77
std::vector< Item >::const_iterator const_iterator
tuple cout
Definition: gather_cfg.py:121
void popcon::EcalLaserHandler::getNewObjects ( )
virtual

Implements popcon::PopConSourceHandler< EcalLaserAPDPNRatios >.

Definition at line 154 of file EcalLaserHandler.cc.

References dtNoiseDBValidation_cfg::cerr, Tm::cmsNanoSeconds(), prof2calltree::count, gather_cfg::cout, data, LMFCorrCoefDat::debug(), alignCSCRings::e, edm::hlt::Exception, LMFCorrCoefDat::getCorrections(), ecalpyutils::hashedIndex(), i, Tm::microsTime(), EcalLogicID::NULLID, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, EcalLaserAPDPNRatios::setTime(), Tm::setToCurrentLocalTime(), Tm::setToString(), EcalLaserAPDPNRatios::setValue(), EcalCondObjectContainer< T >::size(), Tm::str(), EcalLaserAPDPNRatios::EcalLaserTimeStamp::t1, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t2, EcalLaserAPDPNRatios::EcalLaserTimeStamp::t3, cond::timestamp, tmax, and edm::Timestamp::value().

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

Implements popcon::PopConSourceHandler< EcalLaserAPDPNRatios >.

Definition at line 65 of file EcalLaserHandler.h.

References m_name.

65 { return m_name;}
void popcon::EcalLaserHandler::notifyProblems ( const EcalLaserAPDPNRatios::EcalLaserAPDPNpair old,
const EcalLaserAPDPNRatios::EcalLaserAPDPNpair current,
int  hashedIndex,
const std::string &  reason 
)

Definition at line 46 of file EcalLaserHandler.cc.

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

48  {
49  std::cout << "===== " << reason << " =====" << std::endl;
50  if (hashedIndex < 0) {
51  EEDetId ee;
52  std::cout << "Triplets for " << ee.unhashIndex(-hashedIndex) << " bad: [" << old.p1 << ", "
53  << old.p2 << ", " << old.p3 << "] ==> [" << current.p1 << ", "
54  << current.p2 << ", " << current.p3 << "]" << std::endl;
55  } else {
56  EBDetId eb;
57  std::cout << "Triplets for " << eb.unhashIndex(hashedIndex) << " bad: [" << old.p1 << ", "
58  << old.p2 << ", " << old.p3 << "] ==> [" << current.p1 << ", "
59  << current.p2 << ", " << current.p3 << "]" << std::endl;
60  }
61 }
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:115
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.cc:12
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

EcalCondDBInterface* popcon::EcalLaserHandler::econn

Definition at line 64 of file EcalLaserHandler.h.

bool popcon::EcalLaserHandler::m_debug
private

Definition at line 86 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

bool popcon::EcalLaserHandler::m_fake
private

Definition at line 87 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

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

Definition at line 85 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

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

Definition at line 84 of file EcalLaserHandler.h.

Referenced by id().

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

Definition at line 83 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

unsigned long popcon::EcalLaserHandler::m_sequences
private

Definition at line 80 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

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

Definition at line 81 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

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

Definition at line 82 of file EcalLaserHandler.h.

Referenced by EcalLaserHandler().

const EcalLaserAPDPNRatios* popcon::EcalLaserHandler::myapdpns
private

Definition at line 79 of file EcalLaserHandler.h.