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 108 of file CastorDbASCIIIO.cc.

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

Referenced by dumpObject().

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

Definition at line 154 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, and dumpId().

Referenced by dumpObject().

154  {
155  char buffer [1024];
156  sprintf (buffer, "# %15s %15s %15s %15s %8s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
157  fOutput << buffer;
158  std::vector<DetId> channels = fObject.getAllChannels ();
159  std::sort (channels.begin(), channels.end(), DetIdLess ());
160  for (std::vector<DetId>::iterator channel = channels.begin ();
161  channel != channels.end ();
162  ++channel) {
163  const float value = fObject.getValues (*channel)->getValue ();
164  dumpId (fOutput, *channel);
165  sprintf (buffer, " %8.5f %10X\n",
166  value, channel->rawId ());
167  fOutput << buffer;
168  }
169  return true;
170 }
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 199 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, and dumpId().

199  {
200  char buffer [1024];
201  sprintf (buffer, "# %15s %15s %15s %15s %8s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
202  fOutput << buffer;
203  std::vector<DetId> channels = fObject.getAllChannels ();
204  std::sort (channels.begin(), channels.end(), DetIdLess ());
205  for (std::vector<DetId>::iterator channel = channels.begin ();
206  channel != channels.end ();
207  ++channel) {
208  const int value = fObject.getValues (*channel)->getValue ();
209  dumpId (fOutput, *channel);
210  sprintf (buffer, " %15d %10X\n",
211  value, channel->rawId ());
212  fOutput << buffer;
213  }
214  return true;
215 }
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 296 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().

296  {
297  char buffer [1024];
298  if (fObject.isADC() ) sprintf (buffer, "#U ADC << this is the unit \n");
299  else sprintf (buffer, "#U fC << this is the unit \n");
300  fOutput << buffer;
301 
302  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");
303  fOutput << buffer;
304 
305  std::vector<DetId> channels = fObject.getAllChannels ();
306  std::sort (channels.begin(), channels.end(), DetIdLess ());
307  for (std::vector<DetId>::iterator channel = channels.begin ();
308  channel != channels.end ();
309  ++channel) {
310  const float* values = fObject.getValues (*channel)->getValues ();
311  if (values) {
312  dumpId (fOutput, *channel);
313  sprintf (buffer, " %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
314  values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], channel->rawId ());
315  fOutput << buffer;
316  }
317  }
318  return true;
319 }
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 479 of file CastorDbASCIIIO.cc.

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

479  {
480  char buffer [1024];
481  if (fObject.isADC() ) sprintf (buffer, "#U ADC << this is the unit \n");
482  else sprintf (buffer, "#U fC << this is the unit \n");
483  fOutput << buffer;
484 
485  sprintf (buffer, "# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
486  "eta", "phi", "dep", "det",
487  "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",
488  "DetId");
489  fOutput << buffer;
490  std::vector<DetId> channels = fObject.getAllChannels ();
491  std::sort (channels.begin(), channels.end(), DetIdLess ());
492  for (std::vector<DetId>::iterator channel = channels.begin ();
493  channel != channels.end ();
494  ++channel) {
495  const CastorPedestalWidth* item = fObject.getValues (*channel);
496  if (item) {
497  dumpId (fOutput, *channel);
498  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",
499  item->getSigma (0,0), item->getSigma (0,1), item->getSigma (0,2), item->getSigma (0,3),
500  item->getSigma (1,0), item->getSigma (1,1), item->getSigma (1,2), item->getSigma (1,3),
501  item->getSigma (2,0), item->getSigma (2,1), item->getSigma (2,2), item->getSigma (2,3),
502  item->getSigma (3,0), item->getSigma (3,1), item->getSigma (3,2), item->getSigma (3,3), channel->rawId ());
503  fOutput << buffer;
504  }
505  }
506  return true;
507 }
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 219 of file CastorDbASCIIIO.cc.

References dumpCastorObject().

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

Definition at line 221 of file CastorDbASCIIIO.cc.

References dumpCastorObject().

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

Definition at line 559 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().

559  {
560  char buffer [1024];
561  fOutput << "# QIE basic shape: SHAPE 32 x low edge values for first 32 channels" << std::endl;
562  sprintf (buffer, "SHAPE ");
563  fOutput << buffer;
564  for (unsigned bin = 0; bin < 32; bin++) {
565  sprintf (buffer, " %8.5f", fObject.getShape ().lowEdge (bin));
566  fOutput << buffer;
567  }
568  fOutput << std::endl;
569 
570  fOutput << "# QIE data" << std::endl;
571  sprintf (buffer, "# %15s %15s %15s %15s %36s %36s %36s %36s %36s %36s %36s %36s\n",
572  "eta", "phi", "dep", "det",
573  "4 x offsets cap0", "4 x offsets cap1", "4 x offsets cap2", "4 x offsets cap3",
574  "4 x slopes cap0", "4 x slopes cap1", "4 x slopes cap2", "4 x slopes cap3");
575  fOutput << buffer;
576  std::vector<DetId> channels = fObject.getAllChannels ();
577  std::sort (channels.begin(), channels.end(), DetIdLess ());
578  for (std::vector<DetId>::iterator channel = channels.begin ();
579  channel != channels.end ();
580  ++channel) {
581  const CastorQIECoder* coder = fObject.getCoder (*channel);
582  dumpId (fOutput, *channel);
583  for (unsigned capid = 0; capid < 4; capid++) {
584  for (unsigned range = 0; range < 4; range++) {
585  sprintf (buffer, " %8.5f", coder->offset (capid, range));
586  fOutput << buffer;
587  }
588  }
589  for (unsigned capid = 0; capid < 4; capid++) {
590  for (unsigned range = 0; range < 4; range++) {
591  sprintf (buffer, " %8.5f", coder->slope (capid, range));
592  fOutput << buffer;
593  }
594  }
595  fOutput << std::endl;
596  }
597  return true;
598 }
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 631 of file CastorDbASCIIIO.cc.

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

631  {
632  char buffer [1024];
633  fOutput << "# QIE data in calibration mode" << std::endl;
634  sprintf (buffer, "# %15s %15s %15s %15s %288s\n",
635  "eta", "phi", "dep", "det", "32 x charges");
636  fOutput << buffer;
637  std::vector<DetId> channels = fObject.getAllChannels ();
638  std::sort (channels.begin(), channels.end(), DetIdLess ());
639  for (std::vector<DetId>::iterator channel = channels.begin ();
640  channel != channels.end ();
641  ++channel) {
642  const CastorCalibrationQIECoder* coder = fObject.getCoder (*channel);
643  if (coder) {
644  dumpId (fOutput, *channel);
645  const float* lowEdge = coder->minCharges ();
646  for (unsigned bin = 0; bin < 32; bin++) {
647  sprintf (buffer, " %8.5f", lowEdge [bin]);
648  fOutput << buffer;
649  }
650  fOutput << std::endl;
651  }
652  }
653  return true;
654 }
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 724 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().

724  {
725  std::vector<CastorElectronicsId> eids = fObject.allElectronicsId ();
726  char buf [1024];
727  // changes by Jared, 6.03.09/(included 25.03.09)
728  // sprintf (buf, "#%10s %6s %6s %6s %6s %6s %6s %6s %15s %15s %15s %15s",
729  sprintf (buf, "# %7s %3s %3s %3s %4s %7s %10s %14s %7s %5s %5s %6s",
730  "i", "cr", "sl", "tb", "dcc", "spigot", "fiber/slb", "fibcha/slbcha", "subdet", "ieta", "iphi", "depth");
731  fOutput << buf << std::endl;
732 
733  for (unsigned i = 0; i < eids.size (); i++) {
734  CastorElectronicsId eid = eids[i];
735  if (eid.isTriggerChainId()) {
736  DetId trigger = fObject.lookupTrigger (eid);
737  if (trigger.rawId ()) {
739  // changes by Jared, 6.03.09/(included 25.03.09)
740  // sprintf (buf, " %10X %6d %6d %6c %6d %6d %6d %6d %15s %15s %15s %15s",
741  sprintf (buf, " %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
742  // i,
743  converter.getId().rawId(),
744  // changes by Jared, 6.03.09/(included 25.03.09)
745  // eid.readoutVMECrateId(), eid.htrSlot(), eid.htrTopBottom()>0?'t':'b', eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId(),
746  eid.readoutVMECrateId(), eid.htrSlot(), eid.htrTopBottom()>0?'t':'b', eid.dccid(), eid.spigot(), eid.slbSiteNumber(), eid.slbChannelIndex(),
747  converter.getFlavor ().c_str (), converter.getField1 ().c_str (), converter.getField2 ().c_str (), converter.getField3 ().c_str ()
748  );
749  fOutput << buf << std::endl;
750  }
751  } else {
752  DetId channel = fObject.lookup (eid);
753  if (channel.rawId()) {
755  // changes by Jared, 6.03.09/(included 25.03.09)
756  // sprintf (buf, " %10X %6d %6d %6c %6d %6d %6d %6d %15s %15s %15s %15s",
757  sprintf (buf, " %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
758  // i,
759  converter.getId().rawId(),
760  eid.readoutVMECrateId(), eid.htrSlot(), eid.htrTopBottom()>0?'t':'b', eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId(),
761  converter.getFlavor ().c_str (), converter.getField1 ().c_str (), converter.getField2 ().c_str (), converter.getField3 ().c_str ()
762  );
763  fOutput << buf << std::endl;
764  }
765  }
766  }
767  return true;
768 }
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:47
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 364 of file CastorDbASCIIIO.cc.

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

364  {
365  char buffer [1024];
366  sprintf (buffer, "# %15s %15s %15s %15s %15s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
367  fOutput << buffer;
368  std::vector<DetId> channels = fObject.getAllChannels ();
369  std::sort (channels.begin(), channels.end(), DetIdLess ());
370  for (std::vector<DetId>::iterator channel = channels.begin ();
371  channel != channels.end ();
372  ++channel) {
373  const int value = fObject.getValues (*channel)->getValue ();
374  dumpId (fOutput, *channel);
375  sprintf (buffer, " %15X %10X\n",
376  value, channel->rawId ());
377  fOutput << buffer;
378  }
379  return true;
380 }
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 790 of file CastorDbASCIIIO.cc.

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

790  {
791  char buffer [1024];
792  sprintf (buffer, "# %15s %15s %15s %15s %18s %15s %10s\n", "eta", "phi", "dep", "det", "firstSample", "samplesToAdd", "DetId");
793  fOutput << buffer;
794  std::vector<DetId> channels = fObject.getAllChannels ();
795  std::sort (channels.begin(), channels.end(), DetIdLess ());
796  for (std::vector<DetId>::iterator channel = channels.begin();channel != channels.end();++channel) {
797  dumpId (fOutput, *channel);
798  sprintf (buffer, " %15d %15d %16X\n",
799  fObject.getValues (*channel)->firstSample(), fObject.getValues (*channel)->samplesToAdd(), channel->rawId ());
800  fOutput << buffer;
801  }
802  return true;
803 }
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 224 of file CastorDbASCIIIO.cc.

References dumpCastorSingleFloatObject().

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

Definition at line 129 of file CastorDbASCIIIO.cc.

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

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

Definition at line 173 of file CastorDbASCIIIO.cc.

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

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

Definition at line 229 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().

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

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

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

Definition at line 220 of file CastorDbASCIIIO.cc.

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

Definition at line 511 of file CastorDbASCIIIO.cc.

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

511  {
512  char buffer [1024];
513  while (fInput.getline(buffer, 1024)) {
514  if (buffer [0] == '#') continue; //ignore comment
515  std::vector <std::string> items = splitString (std::string (buffer));
516  if (items.empty()) continue;
517  if (items [0] == "SHAPE") { // basic shape
518  if (items.size () < 33) {
519  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;
520  continue;
521  }
522  //float lowEdges [32];
523  //int i = 32;
524  //while (--i >= 0) lowEdges [i] = atof (items [i+1].c_str ());
525  // fObject->setShape (lowEdges);
526  }
527  else { // QIE parameters
528  if (items.size () < 36) {
529  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;
530  continue;
531  }
532  DetId id = getId (items);
533  fObject->sort ();
534  // try {
535  // fObject->getCoder (id);
536  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
537  // }
538 // catch (cms::Exception& e) {
539  CastorQIECoder coder (id.rawId ());
540  int index = 4;
541  for (unsigned capid = 0; capid < 4; capid++) {
542  for (unsigned range = 0; range < 4; range++) {
543  coder.setOffset (capid, range, atof (items [index++].c_str ()));
544  }
545  }
546  for (unsigned capid = 0; capid < 4; capid++) {
547  for (unsigned range = 0; range < 4; range++) {
548  coder.setSlope (capid, range, atof (items [index++].c_str ()));
549  }
550  }
551  fObject->addCoder (coder);
552 // }
553  }
554  }
555  fObject->sort ();
556  return true;
557 }
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 601 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.

601  {
602  char buffer [1024];
603  while (fInput.getline(buffer, 1024)) {
604  if (buffer [0] == '#') continue; //ignore comment
605  std::vector <std::string> items = splitString (std::string (buffer));
606  if (items.size () < 36) {
607  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 36 items: eta, phi, depth, subdet, 32 bin values" << std::endl;
608  continue;
609  }
610  DetId id = getId (items);
611  fObject->sort ();
612  // try {
613  // fObject->getCoder (id);
614  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
615  // }
616 // catch (cms::Exception& e) {
617  CastorCalibrationQIECoder coder (id.rawId ());
618  int index = 4;
619  float values [32];
620  for (unsigned bin = 0; bin < 32; bin++) {
621  values[bin] = atof (items [index++].c_str ());
622  }
623  coder.setMinCharges (values);
624  fObject->addCoder (coder);
625 // }
626  }
627  fObject->sort ();
628  return true;
629 }
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 658 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.

658  {
659  char buffer [1024];
660  while (fInput.getline(buffer, 1024)) {
661  if (buffer [0] == '#') continue; //ignore comment
662  std::vector <std::string> items = splitString (std::string (buffer));
663  if (items.size () < 12) {
664  if (items.empty()) continue; // no warning here
665  if (items.size()<9) {
666  edm::LogError("MapFormat") << "CastorElectronicsMap-> line too short: " << buffer;
667  continue;
668  }
669  if (items[8]=="NA" || items[8]=="NT") {
670  while (items.size()<12) items.push_back(""); // don't worry here
671  } else if (items[8]=="HT") {
672  if (items.size()==11) items.push_back("");
673  else {
674  edm::LogError("MapFormat") << "CastorElectronicsMap-> Bad line: " << buffer
675  << "\n HT line must contain at least 11 items: i cr sl tb dcc spigot fiber fiberchan subdet=HT ieta iphi";
676  continue;
677  }
678  } else {
679  edm::LogError("MapFormat") << "CastorElectronicsMap-> Bad line: " << buffer
680  << "\n line must contain 12 items: i cr sl tb dcc spigot fiber fiberchan subdet ieta iphi depth";
681  continue;
682  }
683  }
684  // std::cout << "CastorElectronicsMap-> processing line: " << buffer << std::endl;
685  int crate = atoi (items [1].c_str());
686  int slot = atoi (items [2].c_str());
687  int top = 1;
688  if (items [3] == "b") top = 0;
689  int dcc = atoi (items [4].c_str());
690  int spigot = atoi (items [5].c_str());
691  CastorElectronicsId elId;
692  if (items[8] == "HT" || items[8] == "NT") {
693  int slb = atoi (items [6].c_str());
694  int slbCh = atoi (items [7].c_str());
695  elId=CastorElectronicsId(slbCh, slb, spigot, dcc,crate,slot,top);
696  } else {
697  int fiber = atoi (items [6].c_str());
698  int fiberCh = atoi (items [7].c_str());
699 
700  elId=CastorElectronicsId(fiberCh, fiber, spigot, dcc);
701  elId.setHTR (crate, slot, top);
702  }
703 
704  // first, handle undefined cases
705  if (items [8] == "NA") { // undefined channel
706  fObject->mapEId2chId (elId, DetId (HcalDetId::Undefined));
707  } else if (items [8] == "NT") { // undefined trigger channel
709  } else {
710  CastorText2DetIdConverter converter (items [8], items [9], items [10], items [11]);
711  if (converter.isHcalCastorDetId ()) {
712  fObject->mapEId2chId (elId, converter.getId ());
713  }
714  else {
715  edm::LogWarning("Format Error") << "CastorElectronicsMap-> Unknown subdetector: "
716  << items [8] << '/' << items [9] << '/' << items [10] << '/' << items [11] << std::endl;
717  }
718  }
719  }
720  fObject->sort ();
721  return true;
722 }
static const HcalDetId Undefined
Definition: HcalDetId.h:268
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 323 of file CastorDbASCIIIO.cc.

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

324 {
325  if (!fObject) fObject = new CastorChannelQuality;
326  char buffer [1024];
327  while (fInput.getline(buffer, 1024)) {
328  if (buffer [0] == '#') continue; //ignore comment
329  std::vector <std::string> items = splitString (std::string (buffer));
330  if (items.empty()) continue; // blank line
331  if (items.size () < 5) {
332  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 5 items: eta, phi, depth, subdet, GOOD/BAD/HOT/DEAD" << std::endl;
333  continue;
334  }
335  DetId id = getId (items);
336 
337  if (fObject->exists(id) ) {
338  edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
339  continue;
340  }
341 // else
342 // {
343  uint32_t mystatus;
344  CastorChannelStatus* fCondObject = nullptr;
345  if (items[4].substr(0,2)=="0x") {
346  sscanf(items[4].c_str(),"%X", &mystatus);
347  fCondObject = new CastorChannelStatus(id,mystatus);
348  }
349  else if (isalpha(items[4].c_str()[0])) {
350  fCondObject = new CastorChannelStatus(id, items[4]);
351  }
352  else {
353  sscanf(items[4].c_str(),"%u", &mystatus);
354  fCondObject = new CastorChannelStatus(id,mystatus);
355  }
356  fObject->addValues(*fCondObject);
357  delete fCondObject;
358  // }
359  }
360  return true;
361 }
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 770 of file CastorDbASCIIIO.cc.

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

770  {
771  if (!fObject) fObject = new CastorRecoParams();
772  char buffer [1024];
773  while (fInput.getline(buffer, 1024)) {
774  if (buffer [0] == '#') continue; //ignore comment
775  std::vector <std::string> items = splitString (std::string (buffer));
776  if (items.empty()) continue; // blank line
777  if (items.size () < 6) {
778  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line must contain 6 items: eta, phi, depth, subdet, firstSample, samplesToAdd" << std::endl;
779  continue;
780  }
781  DetId id = getId (items);
782 
783  CastorRecoParam* fCondObject = new CastorRecoParam(id, atoi (items [4].c_str()), atoi (items [5].c_str()) );
784  fObject->addValues(*fCondObject);
785  delete fCondObject;
786  }
787  return true;
788 }
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 223 of file CastorDbASCIIIO.cc.

223 {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