CMS 3D CMS Logo

Classes | Functions
CastorDbASCIIIO Namespace Reference

Classes

class  CastorElectronicsIdLess
 
class  DetIdLess
 

Functions

template<class T >
bool dumpCastorObject (std::ostream &fOutput, const T &fObject)
 
template<class T >
bool dumpCastorSingleFloatObject (std::ostream &fOutput, const T &fObject)
 
template<class T >
bool dumpCastorSingleIntObject (std::ostream &fOutput, const T &fObject)
 
void dumpId (std::ostream &fOutput, DetId id)
 
bool dumpObject (std::ostream &fOutput, const CastorPedestals &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorPedestalWidths &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorGains &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorGainWidths &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorQIEData &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorCalibrationQIEData &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorElectronicsMap &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorChannelQuality &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorRecoParams &fObject)
 
bool dumpObject (std::ostream &fOutput, const CastorSaturationCorrs &fObject)
 
template<class S , class T >
bool getCastorObject (std::istream &fInput, T &fObject)
 
template<class S , class T >
bool getCastorSingleFloatObject (std::istream &fInput, T &fObject)
 
template<class S , class T >
bool getCastorSingleIntObject (std::istream &fInput, T &fObject, S *fCondObject)
 
DetId getId (const std::vector< std::string > &items)
 
bool getObject (std::istream &fInput, CastorPedestals &fObject)
 
bool getObject (std::istream &fInput, CastorPedestalWidths &fObject)
 
bool getObject (std::istream &fInput, CastorGains &fObject)
 
bool getObject (std::istream &fInput, CastorGainWidths &fObject)
 
bool getObject (std::istream &fInput, CastorQIEData &fObject)
 
bool getObject (std::istream &fInput, CastorCalibrationQIEData &fObject)
 
bool getObject (std::istream &fInput, CastorElectronicsMap &fObject)
 
bool getObject (std::istream &fInput, CastorChannelQuality &fObject)
 
bool getObject (std::istream &fInput, CastorRecoParams &fObject)
 
bool getObject (std::istream &fInput, CastorSaturationCorrs &fObject)
 
std::vector< std::string > splitString (const std::string &fLine)
 

Function Documentation

template<class T >
bool CastorDbASCIIIO::dumpCastorObject ( std::ostream &  fOutput,
const T fObject 
)

Definition at line 107 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, dumpId(), and MuonErrorMatrixValues_cff::values.

Referenced by dumpObject().

107  {
108  char buffer [1024];
109  sprintf (buffer, "# %15s %15s %15s %15s %8s %8s %8s %8s %10s\n", "eta", "phi", "dep", "det", "cap0", "cap1", "cap2", "cap3", "DetId");
110  fOutput << buffer;
111  std::vector<DetId> channels = fObject.getAllChannels ();
112  //std::sort (channels.begin(), channels.end(), DetIdLess ());
113  for (std::vector<DetId>::iterator channel = channels.begin ();
114  channel != channels.end ();
115  ++channel) {
116  const float* values = fObject.getValues (*channel)->getValues ();
117  if (values) {
118  dumpId (fOutput, *channel);
119  sprintf (buffer, " %8.5f %8.5f %8.5f %8.5f %10X\n",
120  values[0], values[1], values[2], values[3], channel->rawId ());
121  fOutput << buffer;
122  }
123  }
124  return true;
125 }
void dumpId(std::ostream &fOutput, DetId id)
template<class T >
bool CastorDbASCIIIO::dumpCastorSingleFloatObject ( std::ostream &  fOutput,
const T fObject 
)

Definition at line 152 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, and dumpId().

Referenced by dumpObject().

152  {
153  char buffer [1024];
154  sprintf (buffer, "# %15s %15s %15s %15s %8s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
155  fOutput << buffer;
156  std::vector<DetId> channels = fObject.getAllChannels ();
157  std::sort (channels.begin(), channels.end(), DetIdLess ());
158  for (std::vector<DetId>::iterator channel = channels.begin ();
159  channel != channels.end ();
160  ++channel) {
161  const float value = fObject.getValues (*channel)->getValue ();
162  dumpId (fOutput, *channel);
163  sprintf (buffer, " %8.5f %10X\n",
164  value, channel->rawId ());
165  fOutput << buffer;
166  }
167  return true;
168 }
void dumpId(std::ostream &fOutput, DetId id)
Definition: value.py:1
template<class T >
bool CastorDbASCIIIO::dumpCastorSingleIntObject ( std::ostream &  fOutput,
const T fObject 
)

Definition at line 196 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, and dumpId().

196  {
197  char buffer [1024];
198  sprintf (buffer, "# %15s %15s %15s %15s %8s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
199  fOutput << buffer;
200  std::vector<DetId> channels = fObject.getAllChannels ();
201  std::sort (channels.begin(), channels.end(), DetIdLess ());
202  for (std::vector<DetId>::iterator channel = channels.begin ();
203  channel != channels.end ();
204  ++channel) {
205  const int value = fObject.getValues (*channel)->getValue ();
206  dumpId (fOutput, *channel);
207  sprintf (buffer, " %15d %10X\n",
208  value, channel->rawId ());
209  fOutput << buffer;
210  }
211  return true;
212 }
void dumpId(std::ostream &fOutput, DetId id)
Definition: value.py:1
void CastorDbASCIIIO::dumpId ( std::ostream &  fOutput,
DetId  id 
)
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorPedestals fObject 
)

Definition at line 290 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorPedestal::getValues(), CastorCondObjectContainer< Item >::getValues(), CastorPedestals::isADC(), and MuonErrorMatrixValues_cff::values.

Referenced by CastorDumpConditions::dumpIt(), CastorDbXml::dumpObject(), HcalDbXml::dumpObject(), CastorDbProducer::setupChannelQuality(), CastorDbProducer::setupElectronicsMap(), CastorDbProducer::setupGains(), CastorDbProducer::setupGainWidths(), CastorDbProducer::setupPedestals(), CastorDbProducer::setupPedestalWidths(), CastorDbProducer::setupQIEData(), and CastorPedestalsAnalysis::~CastorPedestalsAnalysis().

290  {
291  char buffer [1024];
292  if (fObject.isADC() ) sprintf (buffer, "#U ADC << this is the unit \n");
293  else sprintf (buffer, "#U fC << this is the unit \n");
294  fOutput << buffer;
295 
296  sprintf (buffer, "# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n", "eta", "phi", "dep", "det", "cap0", "cap1", "cap2", "cap3", "widthcap0", "widthcap1", "widthcap2", "widthcap3", "DetId");
297  fOutput << buffer;
298 
299  std::vector<DetId> channels = fObject.getAllChannels ();
300  std::sort (channels.begin(), channels.end(), DetIdLess ());
301  for (std::vector<DetId>::iterator channel = channels.begin ();
302  channel != channels.end ();
303  ++channel) {
304  const float* values = fObject.getValues (*channel)->getValues ();
305  if (values) {
306  dumpId (fOutput, *channel);
307  sprintf (buffer, " %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
308  values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], channel->rawId ());
309  fOutput << buffer;
310  }
311  }
312  return true;
313 }
std::vector< DetId > getAllChannels() const
void dumpId(std::ostream &fOutput, DetId id)
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool isADC() const
const float * getValues() const
get value for all capId = 0..3
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorPedestalWidths fObject 
)

Definition at line 470 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorPedestalWidth::getSigma(), CastorCondObjectContainer< Item >::getValues(), and CastorPedestalWidths::isADC().

470  {
471  char buffer [1024];
472  if (fObject.isADC() ) sprintf (buffer, "#U ADC << this is the unit \n");
473  else sprintf (buffer, "#U fC << this is the unit \n");
474  fOutput << buffer;
475 
476  sprintf (buffer, "# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
477  "eta", "phi", "dep", "det",
478  "cov_0_0", "cov_0_1", "cov_0_2", "cov_0_3", "cov_1_0", "cov_1_1", "cov_1_2", "cov_1_3", "cov_2_0", "cov_2_1", "cov_2_2", "cov_2_3", "cov_3_0", "cov_3_1", "cov_3_2", "cov_3_3",
479  "DetId");
480  fOutput << buffer;
481  std::vector<DetId> channels = fObject.getAllChannels ();
482  std::sort (channels.begin(), channels.end(), DetIdLess ());
483  for (std::vector<DetId>::iterator channel = channels.begin ();
484  channel != channels.end ();
485  ++channel) {
486  const CastorPedestalWidth* item = fObject.getValues (*channel);
487  if (item) {
488  dumpId (fOutput, *channel);
489  sprintf (buffer, " %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
490  item->getSigma (0,0), item->getSigma (0,1), item->getSigma (0,2), item->getSigma (0,3),
491  item->getSigma (1,0), item->getSigma (1,1), item->getSigma (1,2), item->getSigma (1,3),
492  item->getSigma (2,0), item->getSigma (2,1), item->getSigma (2,2), item->getSigma (2,3),
493  item->getSigma (3,0), item->getSigma (3,1), item->getSigma (3,2), item->getSigma (3,3), channel->rawId ());
494  fOutput << buffer;
495  }
496  }
497  return true;
498 }
std::vector< DetId > getAllChannels() const
void dumpId(std::ostream &fOutput, DetId id)
const Item * getValues(DetId fId, bool throwOnFail=true) const
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorGains fObject 
)

Definition at line 216 of file CastorDbASCIIIO.cc.

References dumpCastorObject().

216 {return dumpCastorObject (fOutput, fObject);}
bool dumpCastorObject(std::ostream &fOutput, const T &fObject)
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorGainWidths fObject 
)

Definition at line 218 of file CastorDbASCIIIO.cc.

References dumpCastorObject().

218 {return dumpCastorObject (fOutput, fObject);}
bool dumpCastorObject(std::ostream &fOutput, const T &fObject)
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorQIEData fObject 
)

Definition at line 550 of file CastorDbASCIIIO.cc.

References stringResolutionProvider_cfi::bin, edmScanValgrind::buffer, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorQIEData::getCoder(), CastorQIEData::getShape(), CastorQIEShape::lowEdge(), CastorQIECoder::offset(), and CastorQIECoder::slope().

550  {
551  char buffer [1024];
552  fOutput << "# QIE basic shape: SHAPE 32 x low edge values for first 32 channels" << std::endl;
553  sprintf (buffer, "SHAPE ");
554  fOutput << buffer;
555  for (unsigned bin = 0; bin < 32; bin++) {
556  sprintf (buffer, " %8.5f", fObject.getShape ().lowEdge (bin));
557  fOutput << buffer;
558  }
559  fOutput << std::endl;
560 
561  fOutput << "# QIE data" << std::endl;
562  sprintf (buffer, "# %15s %15s %15s %15s %36s %36s %36s %36s %36s %36s %36s %36s\n",
563  "eta", "phi", "dep", "det",
564  "4 x offsets cap0", "4 x offsets cap1", "4 x offsets cap2", "4 x offsets cap3",
565  "4 x slopes cap0", "4 x slopes cap1", "4 x slopes cap2", "4 x slopes cap3");
566  fOutput << buffer;
567  std::vector<DetId> channels = fObject.getAllChannels ();
568  std::sort (channels.begin(), channels.end(), DetIdLess ());
569  for (std::vector<DetId>::iterator channel = channels.begin ();
570  channel != channels.end ();
571  ++channel) {
572  const CastorQIECoder* coder = fObject.getCoder (*channel);
573  dumpId (fOutput, *channel);
574  for (unsigned capid = 0; capid < 4; capid++) {
575  for (unsigned range = 0; range < 4; range++) {
576  sprintf (buffer, " %8.5f", coder->offset (capid, range));
577  fOutput << buffer;
578  }
579  }
580  for (unsigned capid = 0; capid < 4; capid++) {
581  for (unsigned range = 0; range < 4; range++) {
582  sprintf (buffer, " %8.5f", coder->slope (capid, range));
583  fOutput << buffer;
584  }
585  }
586  fOutput << std::endl;
587  }
588  return true;
589 }
const CastorQIEShape & getShape() const
get basic shape
Definition: CastorQIEData.h:36
std::vector< DetId > getAllChannels() const
void dumpId(std::ostream &fOutput, DetId id)
bin
set the eta bin as selection string.
const CastorQIECoder * getCoder(DetId fId) const
get QIE parameters
Definition: CastorQIEData.h:38
float offset(unsigned fCapId, unsigned fRange) const
float lowEdge(unsigned fAdc) const
float slope(unsigned fCapId, unsigned fRange) const
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorCalibrationQIEData fObject 
)

Definition at line 622 of file CastorDbASCIIIO.cc.

References stringResolutionProvider_cfi::bin, edmScanValgrind::buffer, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorCalibrationQIEData::getCoder(), and CastorCalibrationQIECoder::minCharges().

622  {
623  char buffer [1024];
624  fOutput << "# QIE data in calibration mode" << std::endl;
625  sprintf (buffer, "# %15s %15s %15s %15s %288s\n",
626  "eta", "phi", "dep", "det", "32 x charges");
627  fOutput << buffer;
628  std::vector<DetId> channels = fObject.getAllChannels ();
629  std::sort (channels.begin(), channels.end(), DetIdLess ());
630  for (std::vector<DetId>::iterator channel = channels.begin ();
631  channel != channels.end ();
632  ++channel) {
633  const CastorCalibrationQIECoder* coder = fObject.getCoder (*channel);
634  if (coder) {
635  dumpId (fOutput, *channel);
636  const float* lowEdge = coder->minCharges ();
637  for (unsigned bin = 0; bin < 32; bin++) {
638  sprintf (buffer, " %8.5f", lowEdge [bin]);
639  fOutput << buffer;
640  }
641  fOutput << std::endl;
642  }
643  }
644  return true;
645 }
std::vector< DetId > getAllChannels() const
const CastorCalibrationQIECoder * getCoder(DetId fId) const
get QIE parameters
void dumpId(std::ostream &fOutput, DetId id)
bin
set the eta bin as selection string.
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorElectronicsMap fObject 
)

Definition at line 715 of file CastorDbASCIIIO.cc.

References CastorElectronicsMap::allElectronicsId(), CastorElectronicsId::dccid(), runTauDisplay::eid, CastorElectronicsId::fiberChanId(), CastorElectronicsId::fiberIndex(), CastorText2DetIdConverter::getField1(), CastorText2DetIdConverter::getField2(), CastorText2DetIdConverter::getField3(), CastorText2DetIdConverter::getFlavor(), CastorText2DetIdConverter::getId(), CastorElectronicsId::htrSlot(), CastorElectronicsId::htrTopBottom(), mps_fire::i, CastorElectronicsId::isTriggerChainId(), CastorElectronicsMap::lookup(), CastorElectronicsMap::lookupTrigger(), DetId::rawId(), CastorElectronicsId::readoutVMECrateId(), CastorElectronicsId::slbChannelIndex(), CastorElectronicsId::slbSiteNumber(), and CastorElectronicsId::spigot().

715  {
716  std::vector<CastorElectronicsId> eids = fObject.allElectronicsId ();
717  char buf [1024];
718  // changes by Jared, 6.03.09/(included 25.03.09)
719  // sprintf (buf, "#%10s %6s %6s %6s %6s %6s %6s %6s %15s %15s %15s %15s",
720  sprintf (buf, "# %7s %3s %3s %3s %4s %7s %10s %14s %7s %5s %5s %6s",
721  "i", "cr", "sl", "tb", "dcc", "spigot", "fiber/slb", "fibcha/slbcha", "subdet", "ieta", "iphi", "depth");
722  fOutput << buf << std::endl;
723 
724  for (unsigned i = 0; i < eids.size (); i++) {
725  CastorElectronicsId eid = eids[i];
726  if (eid.isTriggerChainId()) {
727  DetId trigger = fObject.lookupTrigger (eid);
728  if (trigger.rawId ()) {
730  // changes by Jared, 6.03.09/(included 25.03.09)
731  // sprintf (buf, " %10X %6d %6d %6c %6d %6d %6d %6d %15s %15s %15s %15s",
732  sprintf (buf, " %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
733  // i,
734  converter.getId().rawId(),
735  // changes by Jared, 6.03.09/(included 25.03.09)
736  // eid.readoutVMECrateId(), eid.htrSlot(), eid.htrTopBottom()>0?'t':'b', eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId(),
737  eid.readoutVMECrateId(), eid.htrSlot(), eid.htrTopBottom()>0?'t':'b', eid.dccid(), eid.spigot(), eid.slbSiteNumber(), eid.slbChannelIndex(),
738  converter.getFlavor ().c_str (), converter.getField1 ().c_str (), converter.getField2 ().c_str (), converter.getField3 ().c_str ()
739  );
740  fOutput << buf << std::endl;
741  }
742  } else {
743  DetId channel = fObject.lookup (eid);
744  if (channel.rawId()) {
746  // changes by Jared, 6.03.09/(included 25.03.09)
747  // sprintf (buf, " %10X %6d %6d %6c %6d %6d %6d %6d %15s %15s %15s %15s",
748  sprintf (buf, " %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
749  // i,
750  converter.getId().rawId(),
751  eid.readoutVMECrateId(), eid.htrSlot(), eid.htrTopBottom()>0?'t':'b', eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId(),
752  converter.getFlavor ().c_str (), converter.getField1 ().c_str (), converter.getField2 ().c_str (), converter.getField3 ().c_str ()
753  );
754  fOutput << buf << std::endl;
755  }
756  }
757  }
758  return true;
759 }
const DetId lookupTrigger(CastorElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
int readoutVMECrateId() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const DetId lookup(CastorElectronicsId fId) const
lookup the logical detid associated with the given electronics id
bool isTriggerChainId() const
Definition: DetId.h:18
std::vector< CastorElectronicsId > allElectronicsId() const
Readout chain identification for Castor Bits for the readout chain : some names need change! [31:26] ...
int slbChannelIndex() const
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorChannelQuality fObject 
)

Definition at line 356 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorChannelStatus::getValue(), and CastorCondObjectContainer< Item >::getValues().

356  {
357  char buffer [1024];
358  sprintf (buffer, "# %15s %15s %15s %15s %15s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
359  fOutput << buffer;
360  std::vector<DetId> channels = fObject.getAllChannels ();
361  std::sort (channels.begin(), channels.end(), DetIdLess ());
362  for (std::vector<DetId>::iterator channel = channels.begin ();
363  channel != channels.end ();
364  ++channel) {
365  const int value = fObject.getValues (*channel)->getValue ();
366  dumpId (fOutput, *channel);
367  sprintf (buffer, " %15X %10X\n",
368  value, channel->rawId ());
369  fOutput << buffer;
370  }
371  return true;
372 }
std::vector< DetId > getAllChannels() const
void dumpId(std::ostream &fOutput, DetId id)
const Item * getValues(DetId fId, bool throwOnFail=true) const
uint32_t getValue() const
Definition: value.py:1
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorRecoParams fObject 
)

Definition at line 779 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, dumpId(), CastorRecoParam::firstSample(), CastorCondObjectContainer< Item >::getAllChannels(), CastorCondObjectContainer< Item >::getValues(), and CastorRecoParam::samplesToAdd().

779  {
780  char buffer [1024];
781  sprintf (buffer, "# %15s %15s %15s %15s %18s %15s %10s\n", "eta", "phi", "dep", "det", "firstSample", "samplesToAdd", "DetId");
782  fOutput << buffer;
783  std::vector<DetId> channels = fObject.getAllChannels ();
784  std::sort (channels.begin(), channels.end(), DetIdLess ());
785  for (std::vector<DetId>::iterator channel = channels.begin();channel != channels.end();++channel) {
786  dumpId (fOutput, *channel);
787  sprintf (buffer, " %15d %15d %16X\n",
788  fObject.getValues (*channel)->firstSample(), fObject.getValues (*channel)->samplesToAdd(), channel->rawId ());
789  fOutput << buffer;
790  }
791  return true;
792 }
std::vector< DetId > getAllChannels() const
void dumpId(std::ostream &fOutput, DetId id)
const Item * getValues(DetId fId, bool throwOnFail=true) const
unsigned int samplesToAdd() const
unsigned int firstSample() const
bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorSaturationCorrs fObject 
)

Definition at line 221 of file CastorDbASCIIIO.cc.

References dumpCastorSingleFloatObject().

221 {return dumpCastorSingleFloatObject (fOutput, fObject);}
bool dumpCastorSingleFloatObject(std::ostream &fOutput, const T &fObject)
template<class S , class T >
bool CastorDbASCIIIO::getCastorObject ( std::istream &  fInput,
T fObject 
)

Definition at line 82 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, getId(), mps_monitormerge::items, splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

82  {
83  char buffer [1024];
84  while (fInput.getline(buffer, 1024)) {
85  if (buffer [0] == '#') continue; //ignore comment
86  std::vector <std::string> items = splitString (std::string (buffer));
87  if (items.empty()) continue; // blank line
88  if (items.size () < 8) {
89  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
90  continue;
91  }
92  DetId id = getId (items);
93 
94 // if (fObject->exists(id) )
95 // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
96 // else
97 // {
98  S fCondObject(id, atof (items [4].c_str()), atof (items [5].c_str()), atof (items [6].c_str()), atof (items [7].c_str()));
99  fObject.addValues(fCondObject);
100  // }
101  }
102 
103  return true;
104 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:18
template<class S , class T >
bool CastorDbASCIIIO::getCastorSingleFloatObject ( std::istream &  fInput,
T fObject 
)

Definition at line 128 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, getId(), mps_monitormerge::items, splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

128  {
129  char buffer [1024];
130  while (fInput.getline(buffer, 1024)) {
131  if (buffer [0] == '#') continue; //ignore comment
132  std::vector <std::string> items = splitString (std::string (buffer));
133  if (items.empty()) continue; // blank line
134  if (items.size () < 5) {
135  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
136  continue;
137  }
138  DetId id = getId (items);
139 
140 // if (fObject->exists(id) )
141 // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
142 // else
143 // {
144  S fCondObject(id, atof (items [4].c_str()) );
145  fObject.addValues(fCondObject);
146  // }
147  }
148  return true;
149 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:18
template<class S , class T >
bool CastorDbASCIIIO::getCastorSingleIntObject ( std::istream &  fInput,
T fObject,
S fCondObject 
)

Definition at line 171 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, getId(), mps_monitormerge::items, S(), splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

171  {
172  char buffer [1024];
173  while (fInput.getline(buffer, 1024)) {
174  if (buffer [0] == '#') continue; //ignore comment
175  std::vector <std::string> items = splitString (std::string (buffer));
176  if (items.empty()) continue; // blank line
177  if (items.size () < 5) {
178  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
179  continue;
180  }
181  DetId id = getId (items);
182 
183 // if (fObject->exists(id) )
184 // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
185 // else
186 // {
187  fCondObject = new S(id, atoi (items [4].c_str()) );
188  fObject.addValues(*fCondObject);
189  delete fCondObject;
190  // }
191  }
192  return true;
193 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:18
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99
DetId CastorDbASCIIIO::getId ( const std::vector< std::string > &  items)
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorPedestals fObject 
)

Definition at line 226 of file CastorDbASCIIIO.cc.

References CastorCondObjectContainer< Item >::addValues(), edmScanValgrind::buffer, getId(), mps_monitormerge::items, CastorPedestals::setUnitADC(), splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by produce_impl().

226  {
227  char buffer [1024];
228 
229  while (fInput.getline(buffer, 1024)) {
230  std::vector <std::string> items = splitString (std::string (buffer));
231  if (items.empty()) continue; // blank line
232  else {
233  if (items[0] == "#U")
234  {
235  if (items[1] == (std::string)"ADC") fObject.setUnitADC(true);
236  else if (items[1] == (std::string)"fC") fObject.setUnitADC(false);
237  else
238  {
239  edm::LogWarning("Pedestal Unit Error") << "Unrecognized unit for pedestals. Assuming fC." << std::endl;
240  fObject.setUnitADC(false);
241  }
242  break;
243  }
244  else
245  {
246  edm::LogWarning("Pedestal Unit Missing") << "The unit for the pedestals is missing in the txt file." << std::endl;
247  return false;
248  }
249  }
250  }
251  while (fInput.getline(buffer, 1024)) {
252  if (buffer [0] == '#') continue;
253  std::vector <std::string> items = splitString (std::string (buffer));
254  if (items.empty()) continue; // blank line
255  if (items.size () < 8) {
256  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 8 items: eta, phi, depth, subdet, 4x values"
257  << " or 12 items: eta, phi, depth, subdet, 4x values for mean, 4x values for width"
258  << std::endl;
259  continue;
260  }
261  DetId id = getId (items);
262 
263 // if (fObject.exists(id) )
264 // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
265 // else
266 // {
267 
268  if (items.size() < 12) // old format without widths
269  {
270  CastorPedestal fCondObject(id, atof (items [4].c_str()), atof (items [5].c_str()),
271  atof (items [6].c_str()), atof (items [7].c_str()),
272  0., 0., 0., 0. );
273  fObject.addValues(fCondObject);
274  }
275  else // new format with widths
276  {
277  CastorPedestal fCondObject(id, atof (items [4].c_str()), atof (items [5].c_str()),
278  atof (items [6].c_str()), atof (items [7].c_str()),
279  atof (items [8].c_str()), atof (items [9].c_str()),
280  atof (items [10].c_str()), atof (items [11].c_str()) );
281  fObject.addValues(fCondObject);
282  }
283 
284  // }
285  }
286  return true;
287 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
void setUnitADC(bool isADC)
Definition: DetId.h:18
bool addValues(const Item &myItem)
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorPedestalWidths fObject 
)

Definition at line 376 of file CastorDbASCIIIO.cc.

References CastorCondObjectContainer< Item >::addValues(), edmScanValgrind::buffer, getId(), mps_monitormerge::items, CastorPedestalWidth::setSigma(), CastorPedestalWidths::setUnitADC(), splitString(), AlCaHLTBitMon_QueryRunRegistry::string, and MuonErrorMatrixValues_cff::values.

376  {
377  char buffer [1024];
378  int linecounter = 0;
379 
380  while (fInput.getline(buffer, 1024)) {
381  linecounter++;
382  std::vector <std::string> items = splitString (std::string (buffer));
383  if (items.empty()) continue; // blank line
384  else {
385  if (items[0] == (std::string)"#U")
386  {
387  if (items[1] == (std::string)"ADC") fObject.setUnitADC(true);
388  else if (items[1] == (std::string)"fC") fObject.setUnitADC(false);
389  else
390  {
391  edm::LogWarning("Pedestal Width Unit Error") << "Unrecognized unit for pedestal widths. Assuming fC." << std::endl;
392  fObject.setUnitADC(false);
393  }
394  break;
395  }
396  else
397  {
398  edm::LogWarning("Pedestal Width Unit Missing") << "The unit for the pedestal widths is missing in the txt file." << std::endl;
399  return false;
400  }
401  }
402  }
403 
404  while (fInput.getline(buffer, 1024)) {
405  linecounter++;
406  if (buffer [0] == '#') continue; //ignore comment
407  std::vector <std::string> items = splitString (std::string (buffer));
408  if (items.empty()) continue; // blank line
409  if (items.size () < 14) {
410  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line number: " << linecounter << "\n line must contain 14 items: eta, phi, depth, subdet, 10x correlations"
411  << " or 20 items: eta, phi, depth, subdet, 16x correlations"
412  << std::endl;
413  continue;
414  }
415  DetId id = getId (items);
416 
417 // if (fObject.exists(id) )
418 // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
419 // else
420 // {
421 
422  if (items.size() < 20) //old format
423  {
425  values.setSigma (0, 0, atof (items [4].c_str()));
426  values.setSigma (1, 0, atof (items [5].c_str()));
427  values.setSigma (1, 1, atof (items [6].c_str()));
428  values.setSigma (2, 0, atof (items [7].c_str()));
429  values.setSigma (2, 1, atof (items [8].c_str()));
430  values.setSigma (2, 2, atof (items [9].c_str()));
431  values.setSigma (3, 0, atof (items [10].c_str()));
432  values.setSigma (3, 1, atof (items [11].c_str()));
433  values.setSigma (3, 2, atof (items [12].c_str()));
434  values.setSigma (3, 3, atof (items [13].c_str()));
435  values.setSigma (0, 1, 0.);
436  values.setSigma (0, 2, 0.);
437  values.setSigma (0, 3, 0.);
438  values.setSigma (1, 2, 0.);
439  values.setSigma (1, 3, 0.);
440  values.setSigma (2, 3, 0.);
441  fObject.addValues(values);
442  }
443  else // new format
444  {
446  values.setSigma (0, 0, atof (items [4].c_str()) );
447  values.setSigma (0, 1, atof (items [5].c_str()) );
448  values.setSigma (0, 2, atof (items [6].c_str()) );
449  values.setSigma (0, 3, atof (items [7].c_str()) );
450  values.setSigma (1, 0, atof (items [8].c_str()) );
451  values.setSigma (1, 1, atof (items [9].c_str()) );
452  values.setSigma (1, 2, atof (items [10].c_str()) );
453  values.setSigma (1, 3, atof (items [11].c_str()) );
454  values.setSigma (2, 0, atof (items [12].c_str()) );
455  values.setSigma (2, 1, atof (items [13].c_str()) );
456  values.setSigma (2, 2, atof (items [14].c_str()) );
457  values.setSigma (2, 3, atof (items [15].c_str()) );
458  values.setSigma (3, 0, atof (items [16].c_str()) );
459  values.setSigma (3, 1, atof (items [17].c_str()) );
460  values.setSigma (3, 2, atof (items [18].c_str()) );
461  values.setSigma (3, 3, atof (items [19].c_str()) );
462  fObject.addValues(values);
463  }
464 
465  // }
466  }
467  return true;
468 }
static unsigned int getId()
void setUnitADC(bool isADC)
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:18
bool addValues(const Item &myItem)
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorGains fObject 
)

Definition at line 215 of file CastorDbASCIIIO.cc.

215 {return getCastorObject<CastorGain> (fInput, fObject);}
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorGainWidths fObject 
)

Definition at line 217 of file CastorDbASCIIIO.cc.

217 {return getCastorObject<CastorGainWidth> (fInput, fObject);}
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorQIEData fObject 
)

Definition at line 502 of file CastorDbASCIIIO.cc.

References CastorQIEData::addCoder(), edmScanValgrind::buffer, getId(), mps_monitormerge::items, CastorQIECoder::setOffset(), CastorQIECoder::setSlope(), CastorQIEData::sort(), splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

502  {
503  char buffer [1024];
504  while (fInput.getline(buffer, 1024)) {
505  if (buffer [0] == '#') continue; //ignore comment
506  std::vector <std::string> items = splitString (std::string (buffer));
507  if (items.empty()) continue;
508  if (items [0] == "SHAPE") { // basic shape
509  if (items.size () < 33) {
510  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 33 items: SHAPE 32 x low QIE edges for first 32 bins" << std::endl;
511  continue;
512  }
513  //float lowEdges [32];
514  //int i = 32;
515  //while (--i >= 0) lowEdges [i] = atof (items [i+1].c_str ());
516  // fObject.setShape (lowEdges);
517  }
518  else { // QIE parameters
519  if (items.size () < 36) {
520  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 36 items: eta, phi, depth, subdet, 4 capId x 4 Ranges x offsets, 4 capId x 4 Ranges x slopes" << std::endl;
521  continue;
522  }
523  DetId id = getId (items);
524  fObject.sort ();
525  // try {
526  // fObject.getCoder (id);
527  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
528  // }
529 // catch (cms::Exception& e) {
530  CastorQIECoder coder (id.rawId ());
531  int index = 4;
532  for (unsigned capid = 0; capid < 4; capid++) {
533  for (unsigned range = 0; range < 4; range++) {
534  coder.setOffset (capid, range, atof (items [index++].c_str ()));
535  }
536  }
537  for (unsigned capid = 0; capid < 4; capid++) {
538  for (unsigned range = 0; range < 4; range++) {
539  coder.setSlope (capid, range, atof (items [index++].c_str ()));
540  }
541  }
542  fObject.addCoder (coder);
543 // }
544  }
545  }
546  fObject.sort ();
547  return true;
548 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:18
bool addCoder(const CastorQIECoder &fCoder)
Definition: CastorQIEData.h:43
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorCalibrationQIEData fObject 
)

Definition at line 592 of file CastorDbASCIIIO.cc.

References CastorCalibrationQIEData::addCoder(), stringResolutionProvider_cfi::bin, edmScanValgrind::buffer, getId(), mps_monitormerge::items, CastorCalibrationQIECoder::setMinCharges(), CastorCalibrationQIEData::sort(), splitString(), AlCaHLTBitMon_QueryRunRegistry::string, and MuonErrorMatrixValues_cff::values.

592  {
593  char buffer [1024];
594  while (fInput.getline(buffer, 1024)) {
595  if (buffer [0] == '#') continue; //ignore comment
596  std::vector <std::string> items = splitString (std::string (buffer));
597  if (items.size () < 36) {
598  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 36 items: eta, phi, depth, subdet, 32 bin values" << std::endl;
599  continue;
600  }
601  DetId id = getId (items);
602  fObject.sort ();
603  // try {
604  // fObject.getCoder (id);
605  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
606  // }
607 // catch (cms::Exception& e) {
608  CastorCalibrationQIECoder coder (id.rawId ());
609  int index = 4;
610  float values [32];
611  for (unsigned bin = 0; bin < 32; bin++) {
612  values[bin] = atof (items [index++].c_str ());
613  }
614  coder.setMinCharges (values);
615  fObject.addCoder (coder);
616 // }
617  }
618  fObject.sort ();
619  return true;
620 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
bool addCoder(const CastorCalibrationQIECoder &fCoder)
bin
set the eta bin as selection string.
Definition: DetId.h:18
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorElectronicsMap fObject 
)

Definition at line 649 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, CastorText2DetIdConverter::getId(), CastorText2DetIdConverter::isHcalCastorDetId(), mps_monitormerge::items, CastorElectronicsMap::mapEId2chId(), CastorElectronicsMap::mapEId2tId(), CastorElectronicsId::setHTR(), slb(), CastorElectronicsMap::sort(), splitString(), AlCaHLTBitMon_QueryRunRegistry::string, HcalTrigTowerDetId::Undefined, and HcalDetId::Undefined.

649  {
650  char buffer [1024];
651  while (fInput.getline(buffer, 1024)) {
652  if (buffer [0] == '#') continue; //ignore comment
653  std::vector <std::string> items = splitString (std::string (buffer));
654  if (items.size () < 12) {
655  if (items.empty()) continue; // no warning here
656  if (items.size()<9) {
657  edm::LogError("MapFormat") << "CastorElectronicsMap-> line too short: " << buffer;
658  continue;
659  }
660  if (items[8]=="NA" || items[8]=="NT") {
661  while (items.size()<12) items.push_back(""); // don't worry here
662  } else if (items[8]=="HT") {
663  if (items.size()==11) items.push_back("");
664  else {
665  edm::LogError("MapFormat") << "CastorElectronicsMap-> Bad line: " << buffer
666  << "\n HT line must contain at least 11 items: i cr sl tb dcc spigot fiber fiberchan subdet=HT ieta iphi";
667  continue;
668  }
669  } else {
670  edm::LogError("MapFormat") << "CastorElectronicsMap-> Bad line: " << buffer
671  << "\n line must contain 12 items: i cr sl tb dcc spigot fiber fiberchan subdet ieta iphi depth";
672  continue;
673  }
674  }
675  // std::cout << "CastorElectronicsMap-> processing line: " << buffer << std::endl;
676  int crate = atoi (items [1].c_str());
677  int slot = atoi (items [2].c_str());
678  int top = 1;
679  if (items [3] == "b") top = 0;
680  int dcc = atoi (items [4].c_str());
681  int spigot = atoi (items [5].c_str());
682  CastorElectronicsId elId;
683  if (items[8] == "HT" || items[8] == "NT") {
684  int slb = atoi (items [6].c_str());
685  int slbCh = atoi (items [7].c_str());
686  elId=CastorElectronicsId(slbCh, slb, spigot, dcc,crate,slot,top);
687  } else {
688  int fiber = atoi (items [6].c_str());
689  int fiberCh = atoi (items [7].c_str());
690 
691  elId=CastorElectronicsId(fiberCh, fiber, spigot, dcc);
692  elId.setHTR (crate, slot, top);
693  }
694 
695  // first, handle undefined cases
696  if (items [8] == "NA") { // undefined channel
697  fObject.mapEId2chId (elId, DetId (HcalDetId::Undefined));
698  } else if (items [8] == "NT") { // undefined trigger channel
700  } else {
701  CastorText2DetIdConverter converter (items [8], items [9], items [10], items [11]);
702  if (converter.isHcalCastorDetId ()) {
703  fObject.mapEId2chId (elId, converter.getId ());
704  }
705  else {
706  edm::LogWarning("Format Error") << "CastorElectronicsMap-> Unknown subdetector: "
707  << items [8] << '/' << items [9] << '/' << items [10] << '/' << items [11] << std::endl;
708  }
709  }
710  }
711  fObject.sort ();
712  return true;
713 }
static const HcalDetId Undefined
Definition: HcalDetId.h:272
static int slb(const HcalTriggerPrimitiveSample &theSample)
std::vector< std::string > splitString(const std::string &fLine)
void setHTR(int crate, int slot, int tb)
bool mapEId2tId(CastorElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
Definition: DetId.h:18
static const HcalTrigTowerDetId Undefined
bool mapEId2chId(CastorElectronicsId fElectronicsId, DetId fId)
Readout chain identification for Castor Bits for the readout chain : some names need change! [31:26] ...
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorChannelQuality fObject 
)

Definition at line 317 of file CastorDbASCIIIO.cc.

References CastorCondObjectContainer< Item >::addValues(), edmScanValgrind::buffer, CastorCondObjectContainer< Item >::exists(), getId(), triggerObjects_cff::id, mps_monitormerge::items, splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

318 {
319  char buffer [1024];
320  while (fInput.getline(buffer, 1024)) {
321  if (buffer [0] == '#') continue; //ignore comment
322  std::vector <std::string> items = splitString (std::string (buffer));
323  if (items.empty()) continue; // blank line
324  if (items.size () < 5) {
325  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 5 items: eta, phi, depth, subdet, GOOD/BAD/HOT/DEAD" << std::endl;
326  continue;
327  }
328  DetId id = getId (items);
329 
330  if (fObject.exists(id) ) {
331  edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
332  continue;
333  }
334 // else
335 // {
336  uint32_t mystatus;
337  std::unique_ptr<CastorChannelStatus> fCondObject;
338  if (items[4].substr(0,2)=="0x") {
339  sscanf(items[4].c_str(),"%X", &mystatus);
340  fCondObject = std::make_unique<CastorChannelStatus>(id,mystatus);
341  }
342  else if (isalpha(items[4].c_str()[0])) {
343  fCondObject = std::make_unique<CastorChannelStatus>(id, items[4]);
344  }
345  else {
346  sscanf(items[4].c_str(),"%u", &mystatus);
347  fCondObject = std::make_unique<CastorChannelStatus>(id,mystatus);
348  }
349  fObject.addValues(*fCondObject);
350  // }
351  }
352  return true;
353 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
const bool exists(DetId fId) const
Definition: DetId.h:18
bool addValues(const Item &myItem)
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorRecoParams fObject 
)

Definition at line 761 of file CastorDbASCIIIO.cc.

References CastorCondObjectContainer< Item >::addValues(), edmScanValgrind::buffer, getId(), mps_monitormerge::items, splitString(), and AlCaHLTBitMon_QueryRunRegistry::string.

761  {
762  char buffer [1024];
763  while (fInput.getline(buffer, 1024)) {
764  if (buffer [0] == '#') continue; //ignore comment
765  std::vector <std::string> items = splitString (std::string (buffer));
766  if (items.empty()) continue; // blank line
767  if (items.size () < 6) {
768  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 6 items: eta, phi, depth, subdet, firstSample, samplesToAdd" << std::endl;
769  continue;
770  }
771  DetId id = getId (items);
772 
773  CastorRecoParam fCondObject(id, atoi (items [4].c_str()), atoi (items [5].c_str()) );
774  fObject.addValues(fCondObject);
775  }
776  return true;
777 }
static unsigned int getId()
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:18
bool addValues(const Item &myItem)
bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorSaturationCorrs fObject 
)

Definition at line 220 of file CastorDbASCIIIO.cc.

220 {return getCastorSingleFloatObject<CastorSaturationCorr> (fInput, fObject);}
std::vector<std::string> CastorDbASCIIIO::splitString ( const std::string &  fLine)

Definition at line 48 of file CastorDbASCIIIO.cc.

References relativeConstraints::empty, mps_fire::i, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EgHLTOfflineClient::createLooseTightTrigEff(), ElectronEnergyCalibrator::ElectronEnergyCalibrator(), getCastorObject(), getCastorSingleFloatObject(), getCastorSingleIntObject(), HcalQIEManager::getHfQieTable(), getObject(), HcalQIEManager::getQIETableFromFile(), egHLT::MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(), egHLT::MonElemFuncs::initTightLooseTrigHists(), and egHLT::MonElemFuncs::initTightLooseTrigHistsTrigCuts().

48  {
49  std::vector <std::string> result;
50  int start = 0;
51  bool empty = true;
52  for (unsigned i = 0; i <= fLine.size (); i++) {
53  if (fLine [i] == ' ' || i == fLine.size ()) {
54  if (!empty) {
55  std::string item (fLine, start, i-start);
56  result.push_back (item);
57  empty = true;
58  }
59  start = i+1;
60  }
61  else {
62  if (empty) empty = false;
63  }
64  }
65  return result;
66 }
Definition: start.py:1