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

◆ dumpCastorObject()

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

Definition at line 115 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, ewkTauDQM_cfi::channels, dumpId(), and contentValuesCheck::values.

Referenced by dumpObject().

115  {
116  char buffer[1024];
117  sprintf(buffer,
118  "# %15s %15s %15s %15s %8s %8s %8s %8s %10s\n",
119  "eta",
120  "phi",
121  "dep",
122  "det",
123  "cap0",
124  "cap1",
125  "cap2",
126  "cap3",
127  "DetId");
128  fOutput << buffer;
129  std::vector<DetId> channels = fObject.getAllChannels();
130  //std::sort (channels.begin(), channels.end(), DetIdLess ());
131  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
132  const float* values = fObject.getValues(*channel)->getValues();
133  if (values) {
134  dumpId(fOutput, *channel);
135  sprintf(
136  buffer, " %8.5f %8.5f %8.5f %8.5f %10X\n", values[0], values[1], values[2], values[3], channel->rawId());
137  fOutput << buffer;
138  }
139  }
140  return true;
141  }
void dumpId(std::ostream &fOutput, DetId id)

◆ dumpCastorSingleFloatObject()

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

Definition at line 171 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, ewkTauDQM_cfi::channels, dumpId(), and jetUpdater_cfi::sort.

Referenced by dumpObject().

171  {
172  char buffer[1024];
173  sprintf(buffer, "# %15s %15s %15s %15s %8s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
174  fOutput << buffer;
175  std::vector<DetId> channels = fObject.getAllChannels();
176  std::sort(channels.begin(), channels.end(), DetIdLess());
177  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
178  const float value = fObject.getValues(*channel)->getValue();
179  dumpId(fOutput, *channel);
180  sprintf(buffer, " %8.5f %10X\n", value, channel->rawId());
181  fOutput << buffer;
182  }
183  return true;
184  }
void dumpId(std::ostream &fOutput, DetId id)
Definition: value.py:1

◆ dumpCastorSingleIntObject()

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

Definition at line 215 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, ewkTauDQM_cfi::channels, dumpId(), and jetUpdater_cfi::sort.

215  {
216  char buffer[1024];
217  sprintf(buffer, "# %15s %15s %15s %15s %8s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
218  fOutput << buffer;
219  std::vector<DetId> channels = fObject.getAllChannels();
220  std::sort(channels.begin(), channels.end(), DetIdLess());
221  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
222  const int value = fObject.getValues(*channel)->getValue();
223  dumpId(fOutput, *channel);
224  sprintf(buffer, " %15d %10X\n", value, channel->rawId());
225  fOutput << buffer;
226  }
227  return true;
228  }
void dumpId(std::ostream &fOutput, DetId id)
Definition: value.py:1

◆ dumpId()

void CastorDbASCIIIO::dumpId ( std::ostream &  fOutput,
DetId  id 
)

Definition at line 73 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer.

Referenced by dumpCastorObject(), dumpCastorSingleFloatObject(), dumpCastorSingleIntObject(), dumpHcalMatrixObject(), dumpHcalObject(), dumpHcalSingleFloatObject(), dumpHcalSingleIntObject(), and dumpObject().

73  {
75  char buffer[1024];
76  sprintf(buffer,
77  " %15s %15s %15s %15s",
78  converter.getField1().c_str(),
79  converter.getField2().c_str(),
80  converter.getField3().c_str(),
81  converter.getFlavor().c_str());
82  fOutput << buffer;
83  }

◆ dumpObject() [1/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorPedestals fObject 
)

Definition at line 320 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, ewkTauDQM_cfi::channels, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorPedestal::getValues(), CastorCondObjectContainer< Item >::getValues(), CastorPedestals::isADC(), jetUpdater_cfi::sort, and contentValuesCheck::values.

Referenced by CastorDumpConditions::dumpIt(), CastorDbXml::dumpObject(), HcalDbXml::dumpObject(), CastorDbProducer::setupItem(), and CastorPedestalsAnalysis::~CastorPedestalsAnalysis().

320  {
321  char buffer[1024];
322  if (fObject.isADC())
323  sprintf(buffer, "#U ADC << this is the unit \n");
324  else
325  sprintf(buffer, "#U fC << this is the unit \n");
326  fOutput << buffer;
327 
328  sprintf(buffer,
329  "# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
330  "eta",
331  "phi",
332  "dep",
333  "det",
334  "cap0",
335  "cap1",
336  "cap2",
337  "cap3",
338  "widthcap0",
339  "widthcap1",
340  "widthcap2",
341  "widthcap3",
342  "DetId");
343  fOutput << buffer;
344 
345  std::vector<DetId> channels = fObject.getAllChannels();
346  std::sort(channels.begin(), channels.end(), DetIdLess());
347  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
348  const float* values = fObject.getValues(*channel)->getValues();
349  if (values) {
350  dumpId(fOutput, *channel);
351  sprintf(buffer,
352  " %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
353  values[0],
354  values[1],
355  values[2],
356  values[3],
357  values[4],
358  values[5],
359  values[6],
360  values[7],
361  channel->rawId());
362  fOutput << buffer;
363  }
364  }
365  return true;
366  }
bool isADC() const
const Item * getValues(DetId fId, bool throwOnFail=true) const
void dumpId(std::ostream &fOutput, DetId id)
std::vector< DetId > getAllChannels() const
const float * getValues() const
get value for all capId = 0..3

◆ dumpObject() [2/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorPedestalWidths fObject 
)

Definition at line 521 of file CastorDbASCIIIO.cc.

References edmScanValgrind::buffer, ewkTauDQM_cfi::channels, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorCondObjectContainer< Item >::getValues(), CastorPedestalWidths::isADC(), B2GTnPMonitor_cfi::item, and jetUpdater_cfi::sort.

521  {
522  char buffer[1024];
523  if (fObject.isADC())
524  sprintf(buffer, "#U ADC << this is the unit \n");
525  else
526  sprintf(buffer, "#U fC << this is the unit \n");
527  fOutput << buffer;
528 
529  sprintf(buffer,
530  "# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
531  "eta",
532  "phi",
533  "dep",
534  "det",
535  "cov_0_0",
536  "cov_0_1",
537  "cov_0_2",
538  "cov_0_3",
539  "cov_1_0",
540  "cov_1_1",
541  "cov_1_2",
542  "cov_1_3",
543  "cov_2_0",
544  "cov_2_1",
545  "cov_2_2",
546  "cov_2_3",
547  "cov_3_0",
548  "cov_3_1",
549  "cov_3_2",
550  "cov_3_3",
551  "DetId");
552  fOutput << buffer;
553  std::vector<DetId> channels = fObject.getAllChannels();
554  std::sort(channels.begin(), channels.end(), DetIdLess());
555  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
556  const CastorPedestalWidth* item = fObject.getValues(*channel);
557  if (item) {
558  dumpId(fOutput, *channel);
559  sprintf(
560  buffer,
561  " %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",
562  item->getSigma(0, 0),
563  item->getSigma(0, 1),
564  item->getSigma(0, 2),
565  item->getSigma(0, 3),
566  item->getSigma(1, 0),
567  item->getSigma(1, 1),
568  item->getSigma(1, 2),
569  item->getSigma(1, 3),
570  item->getSigma(2, 0),
571  item->getSigma(2, 1),
572  item->getSigma(2, 2),
573  item->getSigma(2, 3),
574  item->getSigma(3, 0),
575  item->getSigma(3, 1),
576  item->getSigma(3, 2),
577  item->getSigma(3, 3),
578  channel->rawId());
579  fOutput << buffer;
580  }
581  }
582  return true;
583  }
const Item * getValues(DetId fId, bool throwOnFail=true) const
void dumpId(std::ostream &fOutput, DetId id)
std::vector< DetId > getAllChannels() const

◆ dumpObject() [3/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorGains fObject 
)

Definition at line 231 of file CastorDbASCIIIO.cc.

References dumpCastorObject().

231 { return dumpCastorObject(fOutput, fObject); }
bool dumpCastorObject(std::ostream &fOutput, const T &fObject)

◆ dumpObject() [4/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorGainWidths fObject 
)

Definition at line 235 of file CastorDbASCIIIO.cc.

References dumpCastorObject().

235 { return dumpCastorObject(fOutput, fObject); }
bool dumpCastorObject(std::ostream &fOutput, const T &fObject)

◆ dumpObject() [5/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorQIEData fObject 
)

Definition at line 640 of file CastorDbASCIIIO.cc.

References newFWLiteAna::bin, edmScanValgrind::buffer, ewkTauDQM_cfi::channels, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorQIEData::getCoder(), CastorQIEData::getShape(), CastorQIEShape::lowEdge(), CastorQIECoder::offset(), FastTimerService_cff::range, CastorQIECoder::slope(), and jetUpdater_cfi::sort.

640  {
641  char buffer[1024];
642  fOutput << "# QIE basic shape: SHAPE 32 x low edge values for first 32 channels" << std::endl;
643  sprintf(buffer, "SHAPE ");
644  fOutput << buffer;
645  for (unsigned bin = 0; bin < 32; bin++) {
646  sprintf(buffer, " %8.5f", fObject.getShape().lowEdge(bin));
647  fOutput << buffer;
648  }
649  fOutput << std::endl;
650 
651  fOutput << "# QIE data" << std::endl;
652  sprintf(buffer,
653  "# %15s %15s %15s %15s %36s %36s %36s %36s %36s %36s %36s %36s\n",
654  "eta",
655  "phi",
656  "dep",
657  "det",
658  "4 x offsets cap0",
659  "4 x offsets cap1",
660  "4 x offsets cap2",
661  "4 x offsets cap3",
662  "4 x slopes cap0",
663  "4 x slopes cap1",
664  "4 x slopes cap2",
665  "4 x slopes cap3");
666  fOutput << buffer;
667  std::vector<DetId> channels = fObject.getAllChannels();
668  std::sort(channels.begin(), channels.end(), DetIdLess());
669  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
670  const CastorQIECoder* coder = fObject.getCoder(*channel);
671  dumpId(fOutput, *channel);
672  for (unsigned capid = 0; capid < 4; capid++) {
673  for (unsigned range = 0; range < 4; range++) {
674  sprintf(buffer, " %8.5f", coder->offset(capid, range));
675  fOutput << buffer;
676  }
677  }
678  for (unsigned capid = 0; capid < 4; capid++) {
679  for (unsigned range = 0; range < 4; range++) {
680  sprintf(buffer, " %8.5f", coder->slope(capid, range));
681  fOutput << buffer;
682  }
683  }
684  fOutput << std::endl;
685  }
686  return true;
687  }
float lowEdge(unsigned fAdc) const
void dumpId(std::ostream &fOutput, DetId id)
std::vector< DetId > getAllChannels() const
float slope(unsigned fCapId, unsigned fRange) const
float offset(unsigned fCapId, unsigned fRange) const
const CastorQIEShape & getShape() const
get basic shape
Definition: CastorQIEData.h:35
const CastorQIECoder * getCoder(DetId fId) const
get QIE parameters
Definition: CastorQIEData.h:37

◆ dumpObject() [6/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorCalibrationQIEData fObject 
)

Definition at line 723 of file CastorDbASCIIIO.cc.

References newFWLiteAna::bin, edmScanValgrind::buffer, ewkTauDQM_cfi::channels, dumpId(), CastorCondObjectContainer< Item >::getAllChannels(), CastorCalibrationQIEData::getCoder(), CastorCalibrationQIECoder::minCharges(), and jetUpdater_cfi::sort.

723  {
724  char buffer[1024];
725  fOutput << "# QIE data in calibration mode" << std::endl;
726  sprintf(buffer, "# %15s %15s %15s %15s %288s\n", "eta", "phi", "dep", "det", "32 x charges");
727  fOutput << buffer;
728  std::vector<DetId> channels = fObject.getAllChannels();
729  std::sort(channels.begin(), channels.end(), DetIdLess());
730  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
731  const CastorCalibrationQIECoder* coder = fObject.getCoder(*channel);
732  if (coder) {
733  dumpId(fOutput, *channel);
734  const float* lowEdge = coder->minCharges();
735  for (unsigned bin = 0; bin < 32; bin++) {
736  sprintf(buffer, " %8.5f", lowEdge[bin]);
737  fOutput << buffer;
738  }
739  fOutput << std::endl;
740  }
741  }
742  return true;
743  }
void dumpId(std::ostream &fOutput, DetId id)
std::vector< DetId > getAllChannels() const
const CastorCalibrationQIECoder * getCoder(DetId fId) const
get QIE parameters

◆ dumpObject() [7/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorElectronicsMap fObject 
)

Definition at line 818 of file CastorDbASCIIIO.cc.

References CastorElectronicsMap::allElectronicsId(), visDQMUpload::buf, runTauDisplay::eid, mps_fire::i, CastorElectronicsMap::lookup(), CastorElectronicsMap::lookupTrigger(), and DetId::rawId().

818  {
819  std::vector<CastorElectronicsId> eids = fObject.allElectronicsId();
820  char buf[1024];
821  // changes by Jared, 6.03.09/(included 25.03.09)
822  // sprintf (buf, "#%10s %6s %6s %6s %6s %6s %6s %6s %15s %15s %15s %15s",
823  sprintf(buf,
824  "# %7s %3s %3s %3s %4s %7s %10s %14s %7s %5s %5s %6s",
825  "i",
826  "cr",
827  "sl",
828  "tb",
829  "dcc",
830  "spigot",
831  "fiber/slb",
832  "fibcha/slbcha",
833  "subdet",
834  "ieta",
835  "iphi",
836  "depth");
837  fOutput << buf << std::endl;
838 
839  for (unsigned i = 0; i < eids.size(); i++) {
840  CastorElectronicsId eid = eids[i];
841  if (eid.isTriggerChainId()) {
842  DetId trigger = fObject.lookupTrigger(eid);
843  if (trigger.rawId()) {
845  // changes by Jared, 6.03.09/(included 25.03.09)
846  // sprintf (buf, " %10X %6d %6d %6c %6d %6d %6d %6d %15s %15s %15s %15s",
847  sprintf(
848  buf,
849  " %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
850  // i,
851  converter.getId().rawId(),
852  // changes by Jared, 6.03.09/(included 25.03.09)
853  // eid.readoutVMECrateId(), eid.htrSlot(), eid.htrTopBottom()>0?'t':'b', eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId(),
854  eid.readoutVMECrateId(),
855  eid.htrSlot(),
856  eid.htrTopBottom() > 0 ? 't' : 'b',
857  eid.dccid(),
858  eid.spigot(),
859  eid.slbSiteNumber(),
860  eid.slbChannelIndex(),
861  converter.getFlavor().c_str(),
862  converter.getField1().c_str(),
863  converter.getField2().c_str(),
864  converter.getField3().c_str());
865  fOutput << buf << std::endl;
866  }
867  } else {
868  DetId channel = fObject.lookup(eid);
869  if (channel.rawId()) {
871  // changes by Jared, 6.03.09/(included 25.03.09)
872  // sprintf (buf, " %10X %6d %6d %6c %6d %6d %6d %6d %15s %15s %15s %15s",
873  sprintf(buf,
874  " %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
875  // i,
876  converter.getId().rawId(),
877  eid.readoutVMECrateId(),
878  eid.htrSlot(),
879  eid.htrTopBottom() > 0 ? 't' : 'b',
880  eid.dccid(),
881  eid.spigot(),
882  eid.fiberIndex(),
883  eid.fiberChanId(),
884  converter.getFlavor().c_str(),
885  converter.getField1().c_str(),
886  converter.getField2().c_str(),
887  converter.getField3().c_str());
888  fOutput << buf << std::endl;
889  }
890  }
891  }
892  return true;
893  }
const DetId lookupTrigger(CastorElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
std::vector< CastorElectronicsId > allElectronicsId() const
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const DetId lookup(CastorElectronicsId fId) const
lookup the logical detid associated with the given electronics id
Readout chain identification for Castor Bits for the readout chain : some names need change! [31:26] ...

◆ dumpObject() [8/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorChannelQuality fObject 
)

Definition at line 409 of file CastorDbASCIIIO.cc.

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

409  {
410  char buffer[1024];
411  sprintf(buffer, "# %15s %15s %15s %15s %15s %10s\n", "eta", "phi", "dep", "det", "value", "DetId");
412  fOutput << buffer;
413  std::vector<DetId> channels = fObject.getAllChannels();
414  std::sort(channels.begin(), channels.end(), DetIdLess());
415  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
416  const int value = fObject.getValues(*channel)->getValue();
417  dumpId(fOutput, *channel);
418  sprintf(buffer, " %15X %10X\n", value, channel->rawId());
419  fOutput << buffer;
420  }
421  return true;
422  }
const Item * getValues(DetId fId, bool throwOnFail=true) const
void dumpId(std::ostream &fOutput, DetId id)
std::vector< DetId > getAllChannels() const
Definition: value.py:1
uint32_t getValue() const

◆ dumpObject() [9/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorRecoParams fObject 
)

Definition at line 917 of file CastorDbASCIIIO.cc.

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

917  {
918  char buffer[1024];
919  sprintf(buffer,
920  "# %15s %15s %15s %15s %18s %15s %10s\n",
921  "eta",
922  "phi",
923  "dep",
924  "det",
925  "firstSample",
926  "samplesToAdd",
927  "DetId");
928  fOutput << buffer;
929  std::vector<DetId> channels = fObject.getAllChannels();
930  std::sort(channels.begin(), channels.end(), DetIdLess());
931  for (std::vector<DetId>::iterator channel = channels.begin(); channel != channels.end(); ++channel) {
932  dumpId(fOutput, *channel);
933  sprintf(buffer,
934  " %15d %15d %16X\n",
935  fObject.getValues(*channel)->firstSample(),
936  fObject.getValues(*channel)->samplesToAdd(),
937  channel->rawId());
938  fOutput << buffer;
939  }
940  return true;
941  }
const Item * getValues(DetId fId, bool throwOnFail=true) const
void dumpId(std::ostream &fOutput, DetId id)
std::vector< DetId > getAllChannels() const
unsigned int samplesToAdd() const
unsigned int firstSample() const

◆ dumpObject() [10/10]

bool CastorDbASCIIIO::dumpObject ( std::ostream &  fOutput,
const CastorSaturationCorrs fObject 
)

Definition at line 240 of file CastorDbASCIIIO.cc.

References dumpCastorSingleFloatObject().

240  {
241  return dumpCastorSingleFloatObject(fOutput, fObject);
242  }
bool dumpCastorSingleFloatObject(std::ostream &fOutput, const T &fObject)

◆ getCastorObject()

template<class S , class T >
bool CastorDbASCIIIO::getCastorObject ( std::istream &  fInput,
T fObject 
)

Definition at line 86 of file CastorDbASCIIIO.cc.

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

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

◆ getCastorSingleFloatObject()

template<class S , class T >
bool CastorDbASCIIIO::getCastorSingleFloatObject ( std::istream &  fInput,
T fObject 
)

Definition at line 144 of file CastorDbASCIIIO.cc.

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

144  {
145  char buffer[1024];
146  while (fInput.getline(buffer, 1024)) {
147  if (buffer[0] == '#')
148  continue; //ignore comment
149  std::vector<std::string> items = splitString(std::string(buffer));
150  if (items.empty())
151  continue; // blank line
152  if (items.size() < 5) {
153  edm::LogWarning("Format Error") << "Bad line: " << buffer
154  << "\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
155  continue;
156  }
157  DetId id = getId(items);
158 
159  // if (fObject->exists(id) )
160  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
161  // else
162  // {
163  S fCondObject(id, atof(items[4].c_str()));
164  fObject.addValues(fCondObject);
165  // }
166  }
167  return true;
168  }
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:17
static unsigned int getId()
Log< level::Warning, false > LogWarning

◆ getCastorSingleIntObject()

template<class S , class T >
bool CastorDbASCIIIO::getCastorSingleIntObject ( std::istream &  fInput,
T fObject,
S fCondObject 
)

Definition at line 187 of file CastorDbASCIIIO.cc.

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

187  {
188  char buffer[1024];
189  while (fInput.getline(buffer, 1024)) {
190  if (buffer[0] == '#')
191  continue; //ignore comment
192  std::vector<std::string> items = splitString(std::string(buffer));
193  if (items.empty())
194  continue; // blank line
195  if (items.size() < 5) {
196  edm::LogWarning("Format Error") << "Bad line: " << buffer
197  << "\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
198  continue;
199  }
200  DetId id = getId(items);
201 
202  // if (fObject->exists(id) )
203  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
204  // else
205  // {
206  fCondObject = new S(id, atoi(items[4].c_str()));
207  fObject.addValues(*fCondObject);
208  delete fCondObject;
209  // }
210  }
211  return true;
212  }
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:17
static unsigned int getId()
Log< level::Warning, false > LogWarning

◆ getId()

DetId CastorDbASCIIIO::getId ( const std::vector< std::string > &  items)

◆ getObject() [1/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorPedestals fObject 
)

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

245  {
246  char buffer[1024];
247 
248  while (fInput.getline(buffer, 1024)) {
249  std::vector<std::string> items = splitString(std::string(buffer));
250  if (items.empty())
251  continue; // blank line
252  else {
253  if (items[0] == "#U") {
254  if (items[1] == (std::string) "ADC")
255  fObject.setUnitADC(true);
256  else if (items[1] == (std::string) "fC")
257  fObject.setUnitADC(false);
258  else {
259  edm::LogWarning("Pedestal Unit Error") << "Unrecognized unit for pedestals. Assuming fC." << std::endl;
260  fObject.setUnitADC(false);
261  }
262  break;
263  } else {
264  edm::LogWarning("Pedestal Unit Missing")
265  << "The unit for the pedestals is missing in the txt file." << std::endl;
266  return false;
267  }
268  }
269  }
270  while (fInput.getline(buffer, 1024)) {
271  if (buffer[0] == '#')
272  continue;
273  std::vector<std::string> items = splitString(std::string(buffer));
274  if (items.empty())
275  continue; // blank line
276  if (items.size() < 8) {
277  edm::LogWarning("Format Error")
278  << "Bad line: " << buffer << "\n line must contain 8 items: eta, phi, depth, subdet, 4x values"
279  << " or 12 items: eta, phi, depth, subdet, 4x values for mean, 4x values for width" << std::endl;
280  continue;
281  }
282  DetId id = getId(items);
283 
284  // if (fObject.exists(id) )
285  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
286  // else
287  // {
288 
289  if (items.size() < 12) // old format without widths
290  {
291  CastorPedestal fCondObject(id,
292  atof(items[4].c_str()),
293  atof(items[5].c_str()),
294  atof(items[6].c_str()),
295  atof(items[7].c_str()),
296  0.,
297  0.,
298  0.,
299  0.);
300  fObject.addValues(fCondObject);
301  } else // new format with widths
302  {
303  CastorPedestal fCondObject(id,
304  atof(items[4].c_str()),
305  atof(items[5].c_str()),
306  atof(items[6].c_str()),
307  atof(items[7].c_str()),
308  atof(items[8].c_str()),
309  atof(items[9].c_str()),
310  atof(items[10].c_str()),
311  atof(items[11].c_str()));
312  fObject.addValues(fCondObject);
313  }
314 
315  // }
316  }
317  return true;
318  }
std::vector< std::string > splitString(const std::string &fLine)
void setUnitADC(bool isADC)
Definition: DetId.h:17
static unsigned int getId()
bool addValues(const Item &myItem)
Log< level::Warning, false > LogWarning

◆ getObject() [2/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorPedestalWidths fObject 
)

Definition at line 425 of file CastorDbASCIIIO.cc.

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

425  {
426  char buffer[1024];
427  int linecounter = 0;
428 
429  while (fInput.getline(buffer, 1024)) {
430  linecounter++;
431  std::vector<std::string> items = splitString(std::string(buffer));
432  if (items.empty())
433  continue; // blank line
434  else {
435  if (items[0] == (std::string) "#U") {
436  if (items[1] == (std::string) "ADC")
437  fObject.setUnitADC(true);
438  else if (items[1] == (std::string) "fC")
439  fObject.setUnitADC(false);
440  else {
441  edm::LogWarning("Pedestal Width Unit Error")
442  << "Unrecognized unit for pedestal widths. Assuming fC." << std::endl;
443  fObject.setUnitADC(false);
444  }
445  break;
446  } else {
447  edm::LogWarning("Pedestal Width Unit Missing")
448  << "The unit for the pedestal widths is missing in the txt file." << std::endl;
449  return false;
450  }
451  }
452  }
453 
454  while (fInput.getline(buffer, 1024)) {
455  linecounter++;
456  if (buffer[0] == '#')
457  continue; //ignore comment
458  std::vector<std::string> items = splitString(std::string(buffer));
459  if (items.empty())
460  continue; // blank line
461  if (items.size() < 14) {
462  edm::LogWarning("Format Error") << "Bad line: " << buffer << "\n line number: " << linecounter
463  << "\n line must contain 14 items: eta, phi, depth, subdet, 10x correlations"
464  << " or 20 items: eta, phi, depth, subdet, 16x correlations" << std::endl;
465  continue;
466  }
467  DetId id = getId(items);
468 
469  // if (fObject.exists(id) )
470  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
471  // else
472  // {
473 
474  if (items.size() < 20) //old format
475  {
477  values.setSigma(0, 0, atof(items[4].c_str()));
478  values.setSigma(1, 0, atof(items[5].c_str()));
479  values.setSigma(1, 1, atof(items[6].c_str()));
480  values.setSigma(2, 0, atof(items[7].c_str()));
481  values.setSigma(2, 1, atof(items[8].c_str()));
482  values.setSigma(2, 2, atof(items[9].c_str()));
483  values.setSigma(3, 0, atof(items[10].c_str()));
484  values.setSigma(3, 1, atof(items[11].c_str()));
485  values.setSigma(3, 2, atof(items[12].c_str()));
486  values.setSigma(3, 3, atof(items[13].c_str()));
487  values.setSigma(0, 1, 0.);
488  values.setSigma(0, 2, 0.);
489  values.setSigma(0, 3, 0.);
490  values.setSigma(1, 2, 0.);
491  values.setSigma(1, 3, 0.);
492  values.setSigma(2, 3, 0.);
493  fObject.addValues(values);
494  } else // new format
495  {
497  values.setSigma(0, 0, atof(items[4].c_str()));
498  values.setSigma(0, 1, atof(items[5].c_str()));
499  values.setSigma(0, 2, atof(items[6].c_str()));
500  values.setSigma(0, 3, atof(items[7].c_str()));
501  values.setSigma(1, 0, atof(items[8].c_str()));
502  values.setSigma(1, 1, atof(items[9].c_str()));
503  values.setSigma(1, 2, atof(items[10].c_str()));
504  values.setSigma(1, 3, atof(items[11].c_str()));
505  values.setSigma(2, 0, atof(items[12].c_str()));
506  values.setSigma(2, 1, atof(items[13].c_str()));
507  values.setSigma(2, 2, atof(items[14].c_str()));
508  values.setSigma(2, 3, atof(items[15].c_str()));
509  values.setSigma(3, 0, atof(items[16].c_str()));
510  values.setSigma(3, 1, atof(items[17].c_str()));
511  values.setSigma(3, 2, atof(items[18].c_str()));
512  values.setSigma(3, 3, atof(items[19].c_str()));
513  fObject.addValues(values);
514  }
515 
516  // }
517  }
518  return true;
519  }
void setUnitADC(bool isADC)
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:17
static unsigned int getId()
bool addValues(const Item &myItem)
Log< level::Warning, false > LogWarning

◆ getObject() [3/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorGains fObject 
)

Definition at line 230 of file CastorDbASCIIIO.cc.

230 { return getCastorObject<CastorGain>(fInput, fObject); }

◆ getObject() [4/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorGainWidths fObject 
)

Definition at line 232 of file CastorDbASCIIIO.cc.

232  {
233  return getCastorObject<CastorGainWidth>(fInput, fObject);
234  }

◆ getObject() [5/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorQIEData fObject 
)

Definition at line 586 of file CastorDbASCIIIO.cc.

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

586  {
587  char buffer[1024];
588  while (fInput.getline(buffer, 1024)) {
589  if (buffer[0] == '#')
590  continue; //ignore comment
591  std::vector<std::string> items = splitString(std::string(buffer));
592  if (items.empty())
593  continue;
594  if (items[0] == "SHAPE") { // basic shape
595  if (items.size() < 33) {
596  edm::LogWarning("Format Error")
597  << "Bad line: " << buffer << "\n line must contain 33 items: SHAPE 32 x low QIE edges for first 32 bins"
598  << std::endl;
599  continue;
600  }
601  //float lowEdges [32];
602  //int i = 32;
603  //while (--i >= 0) lowEdges [i] = atof (items [i+1].c_str ());
604  // fObject.setShape (lowEdges);
605  } else { // QIE parameters
606  if (items.size() < 36) {
607  edm::LogWarning("Format Error") << "Bad line: " << buffer
608  << "\n line must contain 36 items: eta, phi, depth, subdet, 4 capId x 4 "
609  "Ranges x offsets, 4 capId x 4 Ranges x slopes"
610  << std::endl;
611  continue;
612  }
613  DetId id = getId(items);
614  fObject.sort();
615  // try {
616  // fObject.getCoder (id);
617  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
618  // }
619  // catch (cms::Exception& e) {
620  CastorQIECoder coder(id.rawId());
621  int index = 4;
622  for (unsigned capid = 0; capid < 4; capid++) {
623  for (unsigned range = 0; range < 4; range++) {
624  coder.setOffset(capid, range, atof(items[index++].c_str()));
625  }
626  }
627  for (unsigned capid = 0; capid < 4; capid++) {
628  for (unsigned range = 0; range < 4; range++) {
629  coder.setSlope(capid, range, atof(items[index++].c_str()));
630  }
631  }
632  fObject.addCoder(coder);
633  // }
634  }
635  }
636  fObject.sort();
637  return true;
638  }
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:17
static unsigned int getId()
Log< level::Warning, false > LogWarning
bool addCoder(const CastorQIECoder &fCoder)
Definition: CastorQIEData.h:42

◆ getObject() [6/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorCalibrationQIEData fObject 
)

Definition at line 690 of file CastorDbASCIIIO.cc.

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

690  {
691  char buffer[1024];
692  while (fInput.getline(buffer, 1024)) {
693  if (buffer[0] == '#')
694  continue; //ignore comment
695  std::vector<std::string> items = splitString(std::string(buffer));
696  if (items.size() < 36) {
697  edm::LogWarning("Format Error") << "Bad line: " << buffer
698  << "\n line must contain 36 items: eta, phi, depth, subdet, 32 bin values"
699  << std::endl;
700  continue;
701  }
702  DetId id = getId(items);
703  fObject.sort();
704  // try {
705  // fObject.getCoder (id);
706  // edm::LogWarning("Redefining Channel") << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
707  // }
708  // catch (cms::Exception& e) {
709  CastorCalibrationQIECoder coder(id.rawId());
710  int index = 4;
711  float values[32];
712  for (unsigned bin = 0; bin < 32; bin++) {
713  values[bin] = atof(items[index++].c_str());
714  }
715  coder.setMinCharges(values);
716  fObject.addCoder(coder);
717  // }
718  }
719  fObject.sort();
720  return true;
721  }
bool addCoder(const CastorCalibrationQIECoder &fCoder)
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:17
static unsigned int getId()
Log< level::Warning, false > LogWarning

◆ getObject() [7/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorElectronicsMap fObject 
)

Definition at line 746 of file CastorDbASCIIIO.cc.

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

746  {
747  char buffer[1024];
748  while (fInput.getline(buffer, 1024)) {
749  if (buffer[0] == '#')
750  continue; //ignore comment
751  std::vector<std::string> items = splitString(std::string(buffer));
752  if (items.size() < 12) {
753  if (items.empty())
754  continue; // no warning here
755  if (items.size() < 9) {
756  edm::LogError("MapFormat") << "CastorElectronicsMap-> line too short: " << buffer;
757  continue;
758  }
759  if (items[8] == "NA" || items[8] == "NT") {
760  while (items.size() < 12)
761  items.push_back(""); // don't worry here
762  } else if (items[8] == "HT") {
763  if (items.size() == 11)
764  items.push_back("");
765  else {
766  edm::LogError("MapFormat") << "CastorElectronicsMap-> Bad line: " << buffer
767  << "\n HT line must contain at least 11 items: i cr sl tb dcc spigot fiber "
768  "fiberchan subdet=HT ieta iphi";
769  continue;
770  }
771  } else {
772  edm::LogError("MapFormat")
773  << "CastorElectronicsMap-> Bad line: " << buffer
774  << "\n line must contain 12 items: i cr sl tb dcc spigot fiber fiberchan subdet ieta iphi depth";
775  continue;
776  }
777  }
778  // std::cout << "CastorElectronicsMap-> processing line: " << buffer << std::endl;
779  int crate = atoi(items[1].c_str());
780  int slot = atoi(items[2].c_str());
781  int top = 1;
782  if (items[3] == "b")
783  top = 0;
784  int dcc = atoi(items[4].c_str());
785  int spigot = atoi(items[5].c_str());
786  CastorElectronicsId elId;
787  if (items[8] == "HT" || items[8] == "NT") {
788  int slb = atoi(items[6].c_str());
789  int slbCh = atoi(items[7].c_str());
790  elId = CastorElectronicsId(slbCh, slb, spigot, dcc, crate, slot, top);
791  } else {
792  int fiber = atoi(items[6].c_str());
793  int fiberCh = atoi(items[7].c_str());
794 
795  elId = CastorElectronicsId(fiberCh, fiber, spigot, dcc);
796  elId.setHTR(crate, slot, top);
797  }
798 
799  // first, handle undefined cases
800  if (items[8] == "NA") { // undefined channel
801  fObject.mapEId2chId(elId, DetId(HcalDetId::Undefined));
802  } else if (items[8] == "NT") { // undefined trigger channel
804  } else {
806  if (converter.isHcalCastorDetId()) {
807  fObject.mapEId2chId(elId, converter.getId());
808  } else {
809  edm::LogWarning("Format Error") << "CastorElectronicsMap-> Unknown subdetector: " << items[8] << '/'
810  << items[9] << '/' << items[10] << '/' << items[11] << std::endl;
811  }
812  }
813  }
814  fObject.sort();
815  return true;
816  }
static const HcalDetId Undefined
Definition: HcalDetId.h:273
static int slb(const HcalTriggerPrimitiveSample &theSample)
void setHTR(int crate, int slot, int tb)
Log< level::Error, false > LogError
std::vector< std::string > splitString(const std::string &fLine)
bool mapEId2tId(CastorElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
Definition: DetId.h:17
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] ...
Log< level::Warning, false > LogWarning

◆ getObject() [8/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorChannelQuality fObject 
)

Definition at line 369 of file CastorDbASCIIIO.cc.

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

369  {
370  char buffer[1024];
371  while (fInput.getline(buffer, 1024)) {
372  if (buffer[0] == '#')
373  continue; //ignore comment
374  std::vector<std::string> items = splitString(std::string(buffer));
375  if (items.empty())
376  continue; // blank line
377  if (items.size() < 5) {
378  edm::LogWarning("Format Error") << "Bad line: " << buffer
379  << "\n line must contain 5 items: eta, phi, depth, subdet, GOOD/BAD/HOT/DEAD"
380  << std::endl;
381  continue;
382  }
383  DetId id = getId(items);
384 
385  if (fObject.exists(id)) {
386  edm::LogWarning("Redefining Channel")
387  << "line: " << buffer << "\n attempts to redefine data. Ignored" << std::endl;
388  continue;
389  }
390  // else
391  // {
392  uint32_t mystatus;
393  std::unique_ptr<CastorChannelStatus> fCondObject;
394  if (items[4].substr(0, 2) == "0x") {
395  sscanf(items[4].c_str(), "%X", &mystatus);
396  fCondObject = std::make_unique<CastorChannelStatus>(id, mystatus);
397  } else if (isalpha(items[4].c_str()[0])) {
398  fCondObject = std::make_unique<CastorChannelStatus>(id, items[4]);
399  } else {
400  sscanf(items[4].c_str(), "%u", &mystatus);
401  fCondObject = std::make_unique<CastorChannelStatus>(id, mystatus);
402  }
403  fObject.addValues(*fCondObject);
404  // }
405  }
406  return true;
407  }
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:17
static unsigned int getId()
bool addValues(const Item &myItem)
const bool exists(DetId fId) const
Log< level::Warning, false > LogWarning

◆ getObject() [9/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorRecoParams fObject 
)

Definition at line 895 of file CastorDbASCIIIO.cc.

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

895  {
896  char buffer[1024];
897  while (fInput.getline(buffer, 1024)) {
898  if (buffer[0] == '#')
899  continue; //ignore comment
900  std::vector<std::string> items = splitString(std::string(buffer));
901  if (items.empty())
902  continue; // blank line
903  if (items.size() < 6) {
904  edm::LogWarning("Format Error")
905  << "Bad line: " << buffer
906  << "\n line must contain 6 items: eta, phi, depth, subdet, firstSample, samplesToAdd" << std::endl;
907  continue;
908  }
909  DetId id = getId(items);
910 
911  CastorRecoParam fCondObject(id, atoi(items[4].c_str()), atoi(items[5].c_str()));
912  fObject.addValues(fCondObject);
913  }
914  return true;
915  }
std::vector< std::string > splitString(const std::string &fLine)
Definition: DetId.h:17
static unsigned int getId()
bool addValues(const Item &myItem)
Log< level::Warning, false > LogWarning

◆ getObject() [10/10]

bool CastorDbASCIIIO::getObject ( std::istream &  fInput,
CastorSaturationCorrs fObject 
)

Definition at line 237 of file CastorDbASCIIIO.cc.

237  {
238  return getCastorSingleFloatObject<CastorSaturationCorr>(fInput, fObject);
239  }

◆ splitString()

std::vector<std::string> CastorDbASCIIIO::splitString ( const std::string &  fLine)

Definition at line 48 of file CastorDbASCIIIO.cc.

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

Referenced by getCastorObject(), getCastorSingleFloatObject(), getCastorSingleIntObject(), and getObject().

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  } else {
61  if (empty)
62  empty = false;
63  }
64  }
65  return result;
66  }
Definition: start.py:1