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
 
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 30 of file EcalLaserHandler.cc.

31 {
32  // do nothing
33 }
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_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 
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_sequences=static_cast<unsigned int>(atoi( ps.getParameter<std::string>("sequences").c_str()));
25  m_maxtime=ps.getParameter<std::string>("maxtime").c_str();
26  std::cout << "Starting O2O process on DB: " << m_sid
27  << " User: "<< m_user << std::endl;
28 }
tuple cout
Definition: gather_cfg.py:41

Member Function Documentation

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

Definition at line 56 of file EcalLaserHandler.cc.

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

58  {
59  bool ret = true;
60  if ((current.p1 < 0) || (current.p2 < 0) || (current.p3 < 0)) {
61  ret = false;
62  notifyProblems(old, current, hashedIndex, "Negative values");
63  } else if ((current.p1 > 10) || (current.p2 > 10) || (current.p3 > 0)) {
64  ret = false;
65  notifyProblems(old, current, hashedIndex, "Values too large");
66  } else if (((diff(old.p1, current.p1) > 0.2) && (old.p1 != 0) && (old.p1 != 1)) ||
67  ((diff(old.p2, current.p2) > 0.2) && (old.p2 != 0) && (old.p1 != 2)) ||
68  ((diff(old.p3, current.p3) > 0.2) && (old.p3 != 0) && (old.p1 != 3))) {
69  ret = false;
70  notifyProblems(old, current, hashedIndex, "Difference w.r.t. previous too large");
71  }
72  return ret;
73 }
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 75 of file EcalLaserHandler.cc.

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

76  {
77  bool ret = true;
78  for (int hashedIndex = 0; hashedIndex < 61200; hashedIndex++) {
81  ret = checkAPDPN(old, current, hashedIndex);
82  }
83  for (int hashedIndex = 0; hashedIndex < 14648; hashedIndex++) {
86  ret = checkAPDPN(old, current, -hashedIndex);
87  }
88  return ret;
89 }
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 35 of file EcalLaserHandler.cc.

References a, and abs.

35  {
36  return std::abs(b- a)/a;
37 }
#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 91 of file EcalLaserHandler.cc.

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

91  {
92  int c = 0;
95  EBDetId eb;
96  try {
98  while (i != e) {
99  if (c % 1000 == 0) {
100  std::cout << std::setw(5) << c << ": " << eb.unhashIndex(c) << " "
101  << econn->getEcalLogicID("EB_crystal_angle", eb.unhashIndex(c).ieta(),
103  "EB_crystal_number").getLogicID()
104  << " " << std::setiosflags(std::ios::fixed) << std::setprecision(9)
105  << i->p1 << " " << i->p2 << " " << i->p3 << std::endl;
106  }
107  i++;
108  c++;
109  }
110  delete econn;
111  }
112  catch (std::runtime_error &e) {
113  std::cerr << e.what() << std::endl;
114  delete econn;
115  throw cms::Exception("OMDS not available");
116  }
117 }
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:41
void popcon::EcalLaserHandler::dumpEndcapPayload ( EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &  laserMap)

Definition at line 119 of file EcalLaserHandler.cc.

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

119  {
120  int c = 0;
121  EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap::const_iterator i = laserMap.endcapItems().begin();
122  EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap::const_iterator e = laserMap.endcapItems().end();
123  EEDetId ee;
124  try {
126  while (i != e) {
127  if (c % 1000 == 0) {
128  std::cout << std::setw(5) << c << ": " << ee.unhashIndex(c) << " "
129  << econn->getEcalLogicID("EE_crystal_number", ee.unhashIndex(c).zside(),
130  ee.unhashIndex(c).ix(), ee.unhashIndex(c).iy(),
131  "EE_crystal_number").getLogicID()
132  << " " << std::setiosflags(std::ios::fixed) << std::setprecision(9)
133  << i->p1 << " " << i->p2 << " " << i->p3 << std::endl;
134  }
135  i++;
136  c++;
137  }
138  delete econn;
139  }
140  catch (std::runtime_error &e) {
141  std::cerr << e.what() << std::endl;
142  delete econn;
143  throw cms::Exception("OMDS not available");
144  }
145 }
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:41
void popcon::EcalLaserHandler::getNewObjects ( )
virtual

Implements popcon::PopConSourceHandler< EcalLaserAPDPNRatios >.

Definition at line 147 of file EcalLaserHandler.cc.

References benchmark_cfg::cerr, prof2calltree::count, gather_cfg::cout, runTheMatrix::data, LMFCorrCoefDat::debug(), edm::hlt::Exception, LMFCorrCoefDat::getCorrections(), ecalpyutils::hashedIndex(), i, Tm::microsTime(), EcalLogicID::NULLID, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p1, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p2, EcalLaserAPDPNRatios::EcalLaserAPDPNpair::p3, EcalLaserAPDPNRatios::setTime(), Tm::setToMicrosTime(), 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().

148 {
149  std::cerr << "------- " << m_name
150  << " ---> getNewObjects" << std::endl;
151 
152  std::cout << "------- Ecal -> getNewObjects\n";
153 
154 
155  unsigned long long max_since= 1;
156  Ref payload= lastPayload();
157 
158  // here popcon tells us which is the last since of the last object in the
159  // offline DB
160  max_since=tagInfo().lastInterval.first;
161  Tm max_since_tm(max_since);
162 
163  // get the last object in the orcoff
164  edm::Timestamp t_min= edm::Timestamp(18446744073709551615ULL);
165 
166  const EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap& laserRatiosMap =
167  payload->getLaserMap();
168  std::cout << "payload->getLaserMap(): OK " << std::endl;
169  std::cout << "Its size is " << laserRatiosMap.size() << std::endl;
170  const EcalLaserAPDPNRatios::EcalLaserTimeStampMap& laserTimeMap =
171  payload->getTimeMap();
172  std::cout << "payload->getTimeMap(): OK " << std::endl;
173  std::cout << "Last Object in Offline DB has SINCE = " << max_since
174  << " (" << max_since_tm.str() << ")"
175  << " and SIZE = " << tagInfo().size
176  << std::endl;
177  // loop through light modules and determine the minimum date among the
178  // available channels
179  dumpBarrelPayload(laserRatiosMap);
180  dumpEndcapPayload(laserRatiosMap);
181  for (int i=0; i<92; i++) {
183  if( t_min > timestamp.t1) {
184  t_min=timestamp.t1;
185  }
186  }
187 
188  std::cout <<"WOW: we just retrieved the last valid record from DB "
189  << std::endl;
190  std::cout <<"Its tmin is "<< Tm(t_min.value()).str() << std::endl;
191 
192  // connect to the database
193  try {
194  std::cout << "Making connection..." << std::flush;
196  std::cout << "Done." << std::endl;
197  } catch (std::runtime_error &e) {
198  std::cout << " connection parameters " << m_sid << "/" << m_user;
199  if (m_debug) {
200  std::cout << "/" << m_pass <<std::endl;
201  } else {
202  std::cout << "/**********" <<std::endl;
203  }
204  std::cerr << e.what() << std::endl;
205  throw cms::Exception("OMDS not available");
206  }
207 
208  // retrieve the lists of logic_ids, to build the detids
209  std::vector<EcalLogicID> crystals_EB =
210  econn->getEcalLogicIDSetOrdered( "EB_crystal_angle",
211  -85,85,1,360,
213  "EB_crystal_number", 4 );
214  std::vector<EcalLogicID> crystals_EE =
215  econn->getEcalLogicIDSetOrdered( "EE_crystal_number",
216  -1,1,1,100,
217  1,100,
218  "EE_crystal_number", 4 );
219 
220  std::vector<EcalLogicID>::const_iterator ieb = crystals_EB.begin();
221  std::vector<EcalLogicID>::const_iterator eeb = crystals_EB.end();
222 
223  std::cout << "Got list of " << crystals_EB.size() << " crystals in EB"
224  << std::endl;
225  std::cout << "Got list of " << crystals_EE.size() << " crystals in EE"
226  << std::endl;
227  // loop through barrel
228  int count = 0;
229  // prepare a map to associate EB logic id's to detids
230  std::map<int, int> detids;
231  while (ieb != eeb) {
232  int iEta = ieb->getID1();
233  int iPhi = ieb->getID2();
234  count++;
235  EBDetId ebdetid(iEta,iPhi);
236  // unsigned int hieb = ebdetid.hashedIndex();
237  detids[ieb->getLogicID()] = ebdetid;
238  ieb++;
239  }
240  std::cout << "Validated " << count << " logic ID's for EB" << std::endl;
241 
242  // do the same for EE
243 
244  std::vector<EcalLogicID>::const_iterator iee = crystals_EE.begin();
245  std::vector<EcalLogicID>::const_iterator eee = crystals_EE.end();
246 
247  count = 0;
248  while (iee != eee) {
249  int iSide = iee->getID1();
250  int iX = iee->getID2();
251  int iY = iee->getID3();
252  EEDetId eedetidpos(iX,iY,iSide);
253  // int hi = eedetidpos.hashedIndex();
254  detids[iee->getLogicID()] = eedetidpos;
255  count ++;
256  iee++;
257  }
258  std::cout << "Validated " << count << " logic ID's for EE" << std::endl;
259 
260  // get association between ecal logic id and LMR
261  std::map<int, int> logicId2Lmr = econn->getEcalLogicID2LmrMap();
262 
263  std::cout << "Retrieving corrections from ONLINE DB ... " << std::endl;
264 
266  if (m_debug) {
267  data.debug();
268  }
269  // get all data in the database taken after the last available time in ORCOFF
270  // we associate another map, whose key is the crystal ID and whose value is a
271  // sextuple (p1, p2, p3, t1, t2, t3)
272  Tm tmax;
273  tmax.setToString(m_maxtime);
274  Tm tmin = Tm(t_min.value());
275  // GO DEBUGGING
276  Tm tgo;
277  tgo.setToString("2011-02-24 23:59:59");
278 
279  if (tmin.microsTime() < tgo.microsTime()) {
280  tmin.setToMicrosTime(tgo.microsTime());
281  }
282  std::map<int, std::map<int, LMFSextuple> > d =
283  data.getCorrections(tmin, tmax, m_sequences);
284  // sice must be equal to the number of different SEQ_ID's found
285  std::cout << "Data organized into " << d.size() << " sequences" << std::endl;
286  // iterate over sequences
287  std::map<int, std::map<int, LMFSextuple> >::const_iterator iseq = d.begin();
288  std::map<int, std::map<int, LMFSextuple> >::const_iterator eseq = d.end();
289  std::cout << "===== Looping on Sequences" << std::endl;
290  while (iseq != eseq) {
291  std::cout << "==== SEQ_ID: " << iseq->first
292  << " contains " << iseq->second.size() << " crystals"
293  << std::endl << std::flush;
294  // iterate over crystals
295  std::map<int, LMFSextuple>::const_iterator is = iseq->second.begin();
296  std::map<int, LMFSextuple>::const_iterator es = iseq->second.end();
297  EcalLaserAPDPNRatios* apdpns_popcon = new EcalLaserAPDPNRatios();
298  Time_t t_last = t_min.value();
299  while (is != es) {
301  apdpnpair_temp.p1 = is->second.p[0];
302  apdpnpair_temp.p2 = is->second.p[1];
303  apdpnpair_temp.p3 = is->second.p[2];
305  timestamp_temp.t1 = edm::Timestamp(is->second.t[0].microsTime());
306  timestamp_temp.t2 = edm::Timestamp(is->second.t[1].microsTime());
307  timestamp_temp.t3 = edm::Timestamp(is->second.t[2].microsTime());
308  apdpns_popcon->setValue(detids[is->first], apdpnpair_temp);
309  if (logicId2Lmr.find(is->first) != logicId2Lmr.end()) {
310  int hashedIndex = logicId2Lmr[is->first] - 1;
311  if ((hashedIndex >= 0) && (hashedIndex <= 91)) {
312  apdpns_popcon->setTime( hashedIndex , timestamp_temp);
313  t_last = timestamp_temp.t1.value();
314  } else {
315  std::stringstream ss;
316  ss << "LOGIC_ID: " << is->first << " LMR: " << hashedIndex + 1
317  << " Out of range";
318  throw(std::runtime_error("[EcalLaserHandler::getNewObjects]" +
319  ss.str()));
320  }
321  } else {
322  std::stringstream ss;
323  ss << "LOGIC_ID: " << is->first << " Cannot determine LMR";
324  throw(std::runtime_error("[EcalLaserHandler::getNewObjects]" +
325  ss.str()));
326  }
327  is++;
328  }
329  if (iseq->second.size() > 0) {
330  m_to_transfer.push_back(std::make_pair(apdpns_popcon, t_last));
331  }
332  iseq++;
333  }
334  std::cout << "==== END OF LOOP ON SEQUENCES" << std::endl << std::flush;
335  delete econn;
336  std::cout << "Ecal -> end of getNewObjects -----------\n";
337 
338 
339 }
int i
Definition: DBlmapReader.cc:9
void dumpEndcapPayload(EcalLaserAPDPNRatios::EcalLaserAPDPNRatiosMap const &laserMap)
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:109
EcalCondDBInterface * econn
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
void setTime(int hashedIndex, const EcalLaserTimeStamp &value)
void setToMicrosTime(uint64_t micros)
Definition: Tm.cc:141
std::map< int, int > getEcalLogicID2LmrMap()
void setToString(const std::string s)
Definition: Tm.cc:172
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)
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:41
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 39 of file EcalLaserHandler.cc.

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

41  {
42  std::cout << "===== " << reason << " =====" << std::endl;
43  if (hashedIndex < 0) {
44  EEDetId ee;
45  std::cout << "Triplets for " << ee.unhashIndex(-hashedIndex) << " bad: [" << old.p1 << ", "
46  << old.p2 << ", " << old.p3 << "] ==> [" << current.p1 << ", "
47  << current.p2 << ", " << current.p3 << "]" << std::endl;
48  } else {
49  EBDetId eb;
50  std::cout << "Triplets for " << eb.unhashIndex(hashedIndex) << " bad: [" << old.p1 << ", "
51  << old.p2 << ", " << old.p3 << "] ==> [" << current.p1 << ", "
52  << current.p2 << ", " << current.p3 << "]" << std::endl;
53  }
54 }
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:41

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().

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.