23 bool operator () (
DetId fFirst,
DetId fSecond)
const {
26 if (
first.genericSubdet () !=
second.genericSubdet ())
return first.genericSubdet () <
second.genericSubdet ();
27 if (
first.isHcalDetId ()) {
30 return f1.zside () != s1.zside () ?
f1.zside () < s1.zside () :
31 f1.iphi () != s1.iphi () ?
f1.iphi () < s1.iphi () :
32 f1.ietaAbs () != s1.ietaAbs () ?
f1.ietaAbs () < s1.ietaAbs () :
33 f1.depth () < s1.depth ();
40 class HcalElectronicsIdLess {
56 std::vector <std::string>
result;
59 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
60 if (fLine [
i] ==
' ' ||
i == fLine.size ()) {
63 result.push_back (item);
69 if (empty) empty =
false;
76 std::vector <unsigned int>
result;
79 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
80 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
83 result.push_back (atoi (itemString.c_str()) );
89 if (empty) empty =
false;
96 std::vector <float>
result;
99 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
100 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
103 result.push_back (atof (itemString.c_str()) );
109 if (empty) empty =
false;
116 std::vector <double>
result;
119 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
120 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
123 result.push_back (atof (itemString.c_str()) );
129 if (empty) empty =
false;
137 return converter.
getId ();
143 sprintf (buffer,
" %15s %15s %15s %15s",
151 sprintf (buffer,
" %5s %4s %4s %10s",
161 std::istringstream iss(s);
162 return !(iss >>
f >>
t).
fail();
165 template <
class S,
class T>
167 if (!fObject)
return false;
169 while (fInput.getline(buffer, 1024)) {
170 if (buffer [0] ==
'#')
continue;
172 if (items.empty())
continue;
173 if (items.size () < 8) {
174 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
183 S fCondObject(
id, atof (items [4].c_str()), atof (items [5].c_str()), atof (items [6].c_str()), atof (items [7].c_str()));
184 fObject->addValues(fCondObject);
194 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"cap0",
"cap1",
"cap2",
"cap3",
"DetId");
196 std::vector<DetId> channels = fObject.getAllChannels ();
197 std::sort (channels.begin(), channels.end(), DetIdLess ());
198 for (std::vector<DetId>::iterator channel = channels.begin ();
199 channel != channels.end ();
201 const float*
values = fObject.getValues (*channel)->getValues ();
204 sprintf (buffer,
" %10.7f %10.7f %10.7f %10.7f %10X\n",
205 values[0], values[1], values[2], values[3], channel->rawId ());
212 template <
class ObjectPrimitiveType,
class S,
class T>
214 if (!fObject)
return false;
216 while (fInput.getline(buffer, 1024)) {
217 if (buffer [0] ==
'#')
continue;
219 if (items.empty())
continue;
220 if (items.size () < 5) {
221 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
230 std::stringstream ss(items[4]);
231 ObjectPrimitiveType
x = 0;
233 S fCondObject(
id, x );
234 fObject->addValues(fCondObject);
243 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
245 std::vector<DetId> channels = fObject.getAllChannels ();
246 std::sort (channels.begin(), channels.end(), DetIdLess ());
247 for (std::vector<DetId>::iterator channel = channels.begin ();
248 channel != channels.end ();
250 const float value = fObject.getValues (*channel)->getValue ();
252 sprintf (buffer,
" %8.5f %10X\n",
253 value, channel->rawId ());
262 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
264 std::vector<DetId> channels = fObject.getAllChannels ();
265 std::sort (channels.begin(), channels.end(), DetIdLess ());
266 for (std::vector<DetId>::iterator channel = channels.begin ();
267 channel != channels.end ();
269 const int value = fObject.getValues (*channel)->getValue ();
271 sprintf (buffer,
" %15d %10X\n",
272 value, channel->rawId ());
278 template <
class S,
class T>
280 if (!fObject)
return false;
282 while (fInput.getline(buffer, 1024)) {
283 if (buffer [0] ==
'#')
continue;
285 if (items.empty())
continue;
287 fCondObject =
new S(firstid.
rawId());
288 for(
int j = 0; j != 10; j++) fCondObject->setValue(atoi(items[4].c_str()), 0, j, atof(items[j+5].c_str()));
289 for(
int i = 1;
i != 40;
i++){
290 fInput.getline(buffer, 1024);
293 if(
id.rawId() != firstid.
rawId())
break;
294 for(
int j = 0; j != 10; j++) fCondObject->setValue(atoi(items[4].c_str()),
i%10, j, atof(items[j+5].c_str()));
296 fObject->addValues(*fCondObject);
305 sprintf (buffer,
"# %5s %5s %5s %5s %5s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
306 "eta",
"phi",
"dep",
"det",
"capid",
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
"c7",
"c8",
"c9",
"DetId");
308 std::vector<DetId> channels = fObject.getAllChannels ();
309 std::sort (channels.begin(), channels.end(), DetIdLess ());
310 for (std::vector<DetId>::iterator channel = channels.begin ();
311 channel != channels.end ();
314 for(
int m = 0;
m != 4;
m++){
315 for(
int i = 0;
i != 10;
i++){
316 for(
int j = 0; j != 10; j++){
318 thisline[j] = fObject.getValues(*channel)->getValue(
m,
i,j);
322 sprintf(buffer,
" %5i %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
323 m, thisline[0], thisline[1], thisline[2], thisline[3], thisline[4], thisline[5], thisline[6], thisline[7],
324 thisline[8], thisline[9], channel->rawId());
336 bool getObject (std::istream& fInput,
HcalGains* fObject) {
return getHcalObject<HcalGain> (fInput, fObject);}
341 bool getObject (std::istream& fInput,
HcalRespCorrs* fObject) {
return getHcalSingleObject<float,HcalRespCorr> (fInput, fObject); }
344 bool getObject (std::istream& fInput,
HcalLUTCorrs* fObject) {
return getHcalSingleObject<float,HcalLUTCorr> (fInput, fObject); }
347 bool getObject (std::istream& fInput,
HcalPFCorrs* fObject) {
return getHcalSingleObject<float,HcalPFCorr> (fInput, fObject); }
350 bool getObject (std::istream& fInput,
HcalTimeCorrs* fObject) {
return getHcalSingleObject<float,HcalTimeCorr> (fInput, fObject); }
362 bool getObject (std::istream& fInput,
HcalQIETypes* fObject) {
return getHcalSingleObject<int,HcalQIEType> (fInput, fObject); }
369 if (!fObject)
return false;
371 while (fInput.getline(buffer, 1024)) {
372 if (buffer [0] ==
'#')
continue;
374 if (items.empty())
continue;
375 if (items.size () < 6) {
376 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, param1, param2" << std::endl;
381 int packingScheme =0;
382 if(items.size ()>22) {
383 packingScheme = atoi (items [22].c_str());
388 if(packingScheme==0) {
389 param1=atoi (items [4].c_str());
390 param2=atoi (items [5].c_str());
393 if(packingScheme==1) {
395 int aabits[6]= {1,1, 8, 4, 4, 9};
396 int aamax[ 6]= {1,1,255,15,15,511};
398 int bbbits[10]={1, 4,1, 4,1, 4, 4, 4, 4, 4};
399 int bbmax [10]={1,15,1,15,1,15,15,15,15,15};
405 for(
int i=0;
i<6;
i++) {
408 float phase=atof (items [j].c_str());
409 float xphase=(phase+32.0)*4.0;
412 aa=atoi (items [j].c_str());
414 if(aa>aamax[
i] || aa<0) {
415 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for a"<<
i<<
" should be less than"<<aamax[
i]<< std::endl;
417 param1=param1|aa<<aashift;
418 aashift=aashift+aabits[
i];
424 for(
int i=0;
i<10;
i++) {
426 bb=atoi (items [j].c_str());
428 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for b"<<i<<
" should be less than"<<bbmax[
i]<< std::endl;
430 param2=param2|bb<<bbshift;
431 bbshift=bbshift+bbbits[
i];
452 std::sort (channels.begin(), channels.end(), DetIdLess ());
454 for (std::vector<DetId>::iterator channel = channels.begin ();
455 channel != channels.end ();
464 if(packingScheme==0) {
467 sprintf (buffer,
"# %15s %15s %15s %15s %18s %15s %10s\n",
"eta",
"phi",
"dep",
"det",
"firstSample",
"samplesToAdd",
"DetId");
470 sprintf (buffer,
" %15d %15d %16X\n",
475 if(packingScheme==1) {
478 char lineT[100],lineA[200],lineB[200];
480 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
481 sprintf (lineA,
" %31s",
"a0: correctForPhaseContainment"); fOutput << lineA;
482 sprintf (lineB,
" %36s",
"b0: useLeakCorrection\n"); fOutput << lineB;
484 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
485 sprintf (lineA,
" %31s",
"a1: correctForLeadingEdge"); fOutput << lineA;
486 sprintf (lineB,
" %36s",
"b1: leakCorrectionID\n"); fOutput << lineB;
488 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
489 sprintf (lineA,
" %31s",
"a2: correctionPhaseNS"); fOutput << lineA;
490 sprintf (lineB,
" %36s",
"b2: correctForTimeslew\n"); fOutput << lineB;
492 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
493 sprintf (lineA,
" %31s",
"a3: firstSample"); fOutput << lineA;
494 sprintf (lineB,
" %36s",
"b3: timeslewCorrectionID\n"); fOutput << lineB;
496 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
497 sprintf (lineA,
" %31s",
"a4: samplesToAdd"); fOutput << lineA;
498 sprintf (lineB,
" %36s",
"b4: correctTiming\n"); fOutput << lineB;
500 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
501 sprintf (lineA,
" %31s",
"a5: pulseShapeID"); fOutput << lineA;
502 sprintf (lineB,
" %36s",
"b5: firstAuxTS\n"); fOutput << lineB;
504 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
505 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
506 sprintf (lineB,
" %36s",
"b6: specialCaseID\n"); fOutput << lineB;
508 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
509 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
510 sprintf (lineB,
" %36s",
"b7: noiseFlaggingID\n"); fOutput << lineB;
512 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
513 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
514 sprintf (lineB,
" %36s",
"b8: pileupCleaningID\n"); fOutput << lineB;
516 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
517 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
518 sprintf (lineB,
" %36s",
"b9: packingScheme\n"); fOutput << lineB;
521 sprintf (lineT,
"# %5s %4s %4s %10s %11s %10s %10s",
"eta",
"phi",
"dep",
"det",
"param1",
"param2",
"DetId");
524 sprintf (lineA,
" %6s %4s %6s %4s %4s %4s",
"a0",
"a1",
"a2",
"a3",
"a4",
"a5");
527 sprintf (lineB,
" %6s %3s %3s %3s %3s %3s %3s %3s %3s\n",
"b0",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"b7",
"b8");
532 sprintf (buffer,
" %11d %10d %10X", param1, param2, channel->rawId ());
541 sprintf (buffer,
" %6d %4d %6.1f %4d %4d %4d",aa0,aa1,aa2,aa3,aa4,aa5);
554 sprintf(buffer,
" %6d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n",bb0,bb1,bb2,bb3,bb4,bb5,bb6,bb7,bb8,bb9);
564 if (!fObject)
return false;
566 while (fInput.getline(buffer, 1024)) {
567 if (buffer [0] ==
'#')
continue;
569 if (items.empty())
continue;
570 if (items.size() < 5) {
571 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, signalTSs, noiseTSs" << std::endl;
574 if (items.size() > 7) {
575 edm::LogWarning(
"Format Error") <<
"Check line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, signalTSs, noiseTSs. " 576 <<
"\n ! signalTS and noiseTS must be of format <ts1,ts2,ts3,...> withOUT spaces. Ignoring line for safety" << std::endl;
593 if (!fObject)
return false;
595 while (fInput.getline(buffer, 1024)) {
596 if (buffer [0] ==
'#')
continue;
598 if (items.empty())
continue;
599 if (items.size () < 7) {
600 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, nhit, phase, rms,detid" << std::endl;
622 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s\n",
"eta",
"phi",
"dep",
"det",
"nhit",
"mean",
"rms" ,
"DetId");
625 std::sort (channels.begin(), channels.end(), DetIdLess ());
626 for (std::vector<DetId>::iterator channel = channels.begin ();
627 channel != channels.end ();
630 sprintf (buffer,
" %15d %8.5f %8.5f %16X\n",
640 sprintf (buffer,
"# %15s %15s %15s %15s %10s %10s %10s\n",
"eta",
"phi",
"dep",
"det",
"signalTSs",
"noiseTSs",
"DetId");
643 std::sort (channels.begin(), channels.end(), DetIdLess ());
644 for (std::vector<DetId>::iterator channel = channels.begin ();
645 channel != channels.end ();
651 std::vector<unsigned int> vNoiseTS = fObject.
getValues (*channel)->
noiseTS();
653 sprintf (buffer,
" ");
655 for (
unsigned int i=0;
i<vSignalTS.size();
i++)
657 if (
i>0) {sprintf (buffer,
","); fOutput <<
buffer;}
658 sprintf (buffer,
"%u", vSignalTS.at(
i));
661 sprintf (buffer,
" ");
663 for (
unsigned int i=0;
i<vNoiseTS.size();
i++)
665 if (
i>0) { sprintf (buffer,
","); fOutput <<
buffer;}
666 sprintf (buffer,
"%u", vNoiseTS.at(
i));
669 sprintf (buffer,
" %10X\n", channel->rawId ());
678 if (!fObject)
return false;
680 while (fInput.getline(buffer, 1024)) {
681 if (buffer [0] ==
'#')
continue;
683 if (items.empty())
continue;
684 if (items.size () < 5) {
685 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, signalShape" << std::endl;
691 if(items.size ()>11) {
692 packingScheme = atoi (items [11].c_str());
696 if(packingScheme==0) {
697 param1=atoi (items [4].c_str());
700 if(packingScheme==1) {
701 int aabits[6]={ 9,1, 4, 8,5, 4};
702 int aamax [6]={511,1,15,255,1,16};
706 for(
int i=0;
i<6;
i++) {
709 float phase=atof (items [j].c_str());
710 float xphase=(phase+32.0)*4.0;
713 aa=atoi (items [j].c_str());
715 if(aa>aamax[
i] || aa<0) {
716 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for a"<<
i<<
" should be less than"<<aamax[
i]<< std::endl;
719 param1=param1|aa<<aashift;
720 aashift=aashift+aabits[
i];
737 std::sort (channels.begin(), channels.end(), DetIdLess ());
739 for (std::vector<DetId>::iterator channel = channels.begin ();
740 channel != channels.end ();
744 if(packingScheme==0) {
746 sprintf (buffer,
"# %15s %15s %15s %15s %14s %10s\n",
"eta",
"phi",
"dep",
"det",
"signalShape",
"DetId");
751 sprintf (buffer,
" %10d %17X\n", value, channel->rawId ());
754 if(packingScheme==1) {
756 char lineT[100],lineA[200];
758 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
759 sprintf (lineA,
" %31s",
"a0: signalShape\n"); fOutput << lineA;
760 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
761 sprintf (lineA,
" %31s",
"a1: syncPhase\n"); fOutput << lineA;
762 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
763 sprintf (lineA,
" %31s",
"a2: binOfMaximum\n"); fOutput << lineA;
764 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
765 sprintf (lineA,
" %31s",
"a3: timePhase\n"); fOutput << lineA;
766 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
767 sprintf (lineA,
" %31s",
"a4: timeSmearing\n"); fOutput << lineA;
768 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
769 sprintf (lineA,
" %31s",
"a5: packingScheme\n"); fOutput << lineA;
770 sprintf (lineT,
"# %5s %4s %4s %10s %11s %10s",
"eta",
"phi",
"dep",
"det",
"param1",
"DetId");
772 sprintf (lineA,
" %6s %4s %4s %6s %4s %4s\n",
"a0",
"a1",
"a2",
"a3",
"a4",
"a5");
777 sprintf (buffer,
" %11d %10X", param1, channel->rawId ());
785 sprintf (buffer,
"%6d %4d %4d %6.1f %4d %4d\n",aa0,aa1,aa2,aa3,aa4,aa5);
795 while (fInput.getline(buffer, 1024)) {
797 if (items.empty())
continue;
799 if (items[0] ==
"#U")
805 edm::LogWarning(
"Pedestal Unit Error") <<
"Unrecognized unit for pedestals. Assuming fC." << std::endl;
812 edm::LogWarning(
"Pedestal Unit Missing") <<
"The unit for the pedestals is missing in the txt file." << std::endl;
817 while (fInput.getline(buffer, 1024)) {
818 if (buffer [0] ==
'#')
continue;
820 if (items.empty())
continue;
821 if (items.size () < 8) {
822 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" 823 <<
" or 12 items: eta, phi, depth, subdet, 4x values for mean, 4x values for width" 834 if (items.size() < 12)
837 atof (items [6].c_str()), atof (items [7].c_str()),
845 atof (items [6].c_str()), atof (items [7].c_str()),
846 atof (items [8].c_str()), atof (items [9].c_str()),
847 atof (items [10].c_str()), atof (items [11].c_str()) );
860 if (fObject.
isADC() ) sprintf (buffer,
"#U ADC << this is the unit \n");
861 else sprintf (buffer,
"#U fC << this is the unit \n");
864 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");
868 std::sort (channels.begin(), channels.end(), DetIdLess ());
869 for (std::vector<DetId>::iterator channel = channels.begin ();
870 channel != channels.end ();
874 dumpId (fOutput, *channel);
875 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
876 values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], channel->rawId ());
887 if (!fObject)
return false;
889 while (fInput.getline(buffer, 1024)) {
890 if (buffer [0] ==
'#')
continue;
892 if (items.empty())
continue;
893 if (items.size () < 6) {
894 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, base - either (hex) or (dec), value" << std::endl;
904 if (items[4] ==
"(hex)")
905 sscanf(items[5].c_str(),
"%X", &mystatus);
906 else if (items[4] ==
"(dec)")
907 sscanf(items[5].c_str(),
"%u", &mystatus);
910 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value field must contain the base: one of (hex), (dec)" << std::endl;
925 sprintf (buffer,
"# %15s %15s %15s %15s %15s %10s\n",
"eta",
"phi",
"dep",
"det",
"(base) value",
"DetId");
928 std::sort (channels.begin(), channels.end(), DetIdLess ());
929 for (std::vector<DetId>::iterator channel = channels.begin ();
930 channel != channels.end ();
933 dumpId (fOutput, *channel);
934 sprintf (buffer,
"%6s %15X %10X\n",
"(hex)",
935 value, channel->rawId ());
947 while (fInput.getline(buffer, 1024)) {
948 if (buffer [0] ==
'#')
950 if (buffer [1] ==
'T')
956 if (buffer [1] ==
'A')
965 if (items.empty())
continue;
966 if (items.size () < 7) {
967 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, pedestal, resp.corr.gain, flag" << std::endl;
984 sprintf (buffer,
"#T %s << this is the tag name \n", fObject.
getTagString().c_str() );
986 sprintf (buffer,
"#A %s << this is the algorithm name \n", fObject.
getAlgoString().c_str() );
990 sprintf (buffer,
"# %15s %15s %15s %15s %8s %13s %8s %10s\n",
991 "eta",
"phi",
"dep",
"det",
"ped",
"respcorrgain",
"flag",
996 for (std::vector<DetId>::iterator channel = channels.begin ();
997 channel != channels.end ();
1001 dumpId (fOutput, *channel);
1002 sprintf (buffer,
" %12.7f %13.10f %12d %10X\n",
1015 int linecounter = 0;
1017 while (fInput.getline(buffer, 1024)) {
1020 if (items.empty())
continue;
1028 edm::LogWarning(
"Pedestal Width Unit Error") <<
"Unrecognized unit for pedestal widths. Assuming fC." << std::endl;
1035 edm::LogWarning(
"Pedestal Width Unit Missing") <<
"The unit for the pedestal widths is missing in the txt file." << std::endl;
1041 while (fInput.getline(buffer, 1024)) {
1043 if (buffer [0] ==
'#')
continue;
1045 if (items.empty())
continue;
1046 if (items.size () < 14) {
1047 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line number: " << linecounter <<
"\n line must contain 14 items: eta, phi, depth, subdet, 10x correlations" 1048 <<
" or 20 items: eta, phi, depth, subdet, 16x correlations" 1059 if (items.size() < 20)
1062 values.
setSigma (0, 0, atof (items [4].c_str()));
1063 values.
setSigma (1, 0, atof (items [5].c_str()));
1064 values.
setSigma (1, 1, atof (items [6].c_str()));
1065 values.
setSigma (2, 0, atof (items [7].c_str()));
1066 values.
setSigma (2, 1, atof (items [8].c_str()));
1067 values.
setSigma (2, 2, atof (items [9].c_str()));
1068 values.
setSigma (3, 0, atof (items [10].c_str()));
1069 values.
setSigma (3, 1, atof (items [11].c_str()));
1070 values.
setSigma (3, 2, atof (items [12].c_str()));
1071 values.
setSigma (3, 3, atof (items [13].c_str()));
1083 values.
setSigma (0, 0, atof (items [4].c_str()) );
1084 values.
setSigma (0, 1, atof (items [5].c_str()) );
1085 values.
setSigma (0, 2, atof (items [6].c_str()) );
1086 values.
setSigma (0, 3, atof (items [7].c_str()) );
1087 values.
setSigma (1, 0, atof (items [8].c_str()) );
1088 values.
setSigma (1, 1, atof (items [9].c_str()) );
1089 values.
setSigma (1, 2, atof (items [10].c_str()) );
1090 values.
setSigma (1, 3, atof (items [11].c_str()) );
1091 values.
setSigma (2, 0, atof (items [12].c_str()) );
1092 values.
setSigma (2, 1, atof (items [13].c_str()) );
1093 values.
setSigma (2, 2, atof (items [14].c_str()) );
1094 values.
setSigma (2, 3, atof (items [15].c_str()) );
1095 values.
setSigma (3, 0, atof (items [16].c_str()) );
1096 values.
setSigma (3, 1, atof (items [17].c_str()) );
1097 values.
setSigma (3, 2, atof (items [18].c_str()) );
1098 values.
setSigma (3, 3, atof (items [19].c_str()) );
1109 if (fObject.
isADC() ) sprintf (buffer,
"#U ADC << this is the unit \n");
1110 else sprintf (buffer,
"#U fC << this is the unit \n");
1113 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
1114 "eta",
"phi",
"dep",
"det",
1115 "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",
1119 std::sort (channels.begin(), channels.end(), DetIdLess ());
1120 for (std::vector<DetId>::iterator channel = channels.begin ();
1121 channel != channels.end ();
1125 dumpId (fOutput, *channel);
1126 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",
1141 while (fInput.getline(buffer, 1024)) {
1142 if (buffer [0] ==
'#')
continue;
1144 if (items.empty())
continue;
1145 if (items [0] ==
"SHAPE") {
1149 if (items.size () < 36) {
1150 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;
1162 for (
unsigned capid = 0; capid < 4; capid++) {
1163 for (
unsigned range = 0; range < 4; range++) {
1164 coder.
setOffset (capid, range, atof (items [index++].c_str ()));
1167 for (
unsigned capid = 0; capid < 4; capid++) {
1168 for (
unsigned range = 0; range < 4; range++) {
1169 coder.
setSlope (capid, range, atof (items [index++].c_str ()));
1185 fOutput <<
"# QIE data" << std::endl;
1186 sprintf (buffer,
"# %15s %15s %15s %15s %36s %36s %36s %36s %36s %36s %36s %36s\n",
1187 "eta",
"phi",
"dep",
"det",
1188 "4 x offsets cap0",
"4 x offsets cap1",
"4 x offsets cap2",
"4 x offsets cap3",
1189 "4 x slopes cap0",
"4 x slopes cap1",
"4 x slopes cap2",
"4 x slopes cap3");
1192 std::sort (channels.begin(), channels.end(), DetIdLess ());
1193 for (std::vector<DetId>::iterator channel = channels.begin ();
1194 channel != channels.end ();
1197 dumpId (fOutput, *channel);
1198 for (
unsigned capid = 0; capid < 4; capid++) {
1199 for (
unsigned range = 0; range < 4; range++) {
1200 sprintf (buffer,
" %8.5f", coder->
offset (capid, range));
1204 for (
unsigned capid = 0; capid < 4; capid++) {
1205 for (
unsigned range = 0; range < 4; range++) {
1206 sprintf (buffer,
" %8.5f", coder->
slope (capid, range));
1210 fOutput << std::endl;
1218 while (fInput.getline(buffer, 1024)) {
1219 if (buffer [0] ==
'#')
continue;
1221 if (items.size () < 36) {
1222 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 36 items: eta, phi, depth, subdet, 32 bin values" << std::endl;
1235 for (
unsigned bin = 0;
bin < 32;
bin++) {
1236 values[
bin] = atof (items [index++].c_str ());
1248 fOutput <<
"# QIE data in calibration mode" << std::endl;
1249 sprintf (buffer,
"# %15s %15s %15s %15s %288s\n",
1250 "eta",
"phi",
"dep",
"det",
"32 x charges");
1253 std::sort (channels.begin(), channels.end(), DetIdLess ());
1254 for (std::vector<DetId>::iterator channel = channels.begin ();
1255 channel != channels.end ();
1259 dumpId (fOutput, *channel);
1261 for (
unsigned bin = 0;
bin < 32;
bin++) {
1262 sprintf (buffer,
" %8.5f", lowEdge [
bin]);
1265 fOutput << std::endl;
1277 while (fInput.getline(buffer, 1024)) {
1278 if (buffer [0] ==
'#')
continue;
1280 if (items.size () < 12) {
1281 if (items.empty())
continue;
1282 if (items.size()<9) {
1286 if (items[8]==
"NA" || items[8]==
"NT") {
1287 while (items.size()<12) items.push_back(
"");
1288 }
else if (items[8]==
"HT") {
1289 if (items.size()==11) items.push_back(
"");
1291 edm::LogError(
"MapFormat") <<
"HcalElectronicsMap-> Bad line: " << buffer
1292 <<
"\n HT line must contain at least 11 items: i cr sl tb dcc spigot fiber fiberchan subdet=HT ieta iphi";
1296 edm::LogError(
"MapFormat") <<
"HcalElectronicsMap-> Bad line: " << buffer
1297 <<
"\n line must contain 12 items: i cr sl tb dcc spigot fiber fiberchan subdet ieta iphi depth";
1301 int crate = atoi (items [1].c_str());
1302 int slot = atoi (items [2].c_str());
1304 if (items [3] ==
"b") top = 0;
1305 int dcc = atoi (items [4].c_str());
1306 int spigot = atoi (items [5].c_str());
1308 if (items[3][0] ==
'u') {
1309 int fiber = atoi (items [6].c_str());
1310 int fiberCh = atoi (items [7].c_str());
1311 bool isTrig=(items[8] ==
"HT" || items[8] ==
"NT");
1313 }
else if (items[8] ==
"HT" || items[8] ==
"NT") {
1314 int slb = atoi (items [6].c_str());
1315 int slbCh = atoi (items [7].c_str());
1318 int fiber = atoi (items [6].c_str());
1319 int fiberCh = atoi (items [7].c_str());
1322 elId.
setHTR (crate, slot, top);
1326 if (items [8] ==
"NA") {
1328 }
else if (items [8] ==
"NT") {
1339 edm::LogWarning(
"Format Error") <<
"HcalElectronicsMap-> Unknown subdetector: " 1340 << items [8] <<
'/' << items [9] <<
'/' << items [10] <<
'/' << items [11] << std::endl;
1344 auto fObject = std::make_unique<HcalElectronicsMap>(fObjectHelper);
1354 sprintf (buf,
"# %7s %3s %3s %3s %4s %7s %10s %14s %7s %5s %5s %6s",
1355 "i",
"cr",
"sl",
"tb",
"dcc",
"spigot",
"fiber/slb",
"fibcha/slbcha",
"subdet",
"ieta",
"iphi",
"depth");
1356 fOutput << buf << std::endl;
1358 for (
unsigned i = 0;
i < eids.size ();
i++) {
1362 if (trigger.
rawId ()) {
1367 sprintf (buf,
" %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
1375 fOutput << buf << std::endl;
1377 sprintf (buf,
" %7X %3d %3d u %4d %7d %10d %14d %7s %5s %5s %6s",
1383 fOutput << buf << std::endl;
1385 sprintf (buf,
"NOT SUPPORTED!");
1386 fOutput << buf << std::endl;
1391 if (channel.
rawId()) {
1396 sprintf (buf,
" %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
1403 sprintf (buf,
" %7X %3d %3d u %4d %7d %10d %14d %7s %5s %5s %6s",
1411 fOutput << buf << std::endl;
1420 if (!fObject)
return false;
1422 while (fInput.getline(buffer, 1024)) {
1423 if (buffer [0] ==
'#')
continue;
1425 if (items.empty())
continue;
1427 if (items.size() > 1 &&
1428 items[0].find(
"RctLsb")!=std::string::npos){
1429 fObject->
setRctLsb( atof( items[1].c_str() ) );
1432 if (items.size() > 1 &&
1433 items[0].find(
"Gain")!=std::string::npos){
1438 if (items.size () < 7) {
1439 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, Rcalib, LutGranularity, OutputLutThreshold" << std::endl;
1445 atof (items [4].c_str()),
1446 atoi (items [5].c_str()),
1447 atoi (items [6].c_str()));
1457 const float _rctLsb = fObject.
getRctLsb();
1459 sprintf (buffer,
"# %20s\n",
"Non-channel data");
1461 sprintf (buffer,
"%8s %8.5f\n",
"RctLsb", _rctLsb);
1463 sprintf (buffer,
"%8s %8.5f\n",
"Gain", _gain);
1465 sprintf (buffer,
"# %15s %15s %15s %15s %8s %15s %19s %10s\n",
"eta",
"phi",
"dep",
"det",
"Rcalib",
"LutGranularity",
"OutputLutThreshold",
"DetId");
1468 std::sort (channels.begin(), channels.end(), DetIdLess ());
1469 for (std::vector<DetId>::iterator channel = channels.begin ();
1470 channel != channels.end ();
1475 dumpId (fOutput, *channel);
1476 sprintf (buffer,
" %8.5f %15d %19d %10X\n",
1479 _outputLutThreshold,
1488 if (!fObject)
return false;
1490 while (getline(fInput, buffer)) {
1491 if (buffer.at(0) ==
'#')
continue;
1492 std::vector <std::string> items =
splitString (buffer);
1493 if (items.empty())
continue;
1495 if (items.size() < 9) {
1496 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 9 items: subDet, side_ring, slice, type, subChannel, LS, Value, UpperLimit, LowerLimit" << std::endl;
1502 unsigned int slice, subchan;
1503 switch (items[0].at(1)) {
1520 from_string<int>(sidering, items[1],
std::dec);
1521 from_string<unsigned int>(slice, items[2],
std::dec);
1523 from_string<unsigned int>(subchan, items[4],
std::dec);
1530 from_string<int>(LS, items[5],
std::dec);
1533 from_string<float>(lower, items[8],
std::dec);
1541 if (!(fObject->
addValue(newVal))) {
1543 <<
"\nwas not added to the HcalDcsValues object." << std::endl;
1553 fOutput <<
"# subDet side_ring slice type subChan LS Value UpperLimit LowerLimit DcsId\n";
1559 for (HcalDcsValues::DcsSet::const_iterator
val = vals.begin();
1560 val != vals.end(); ++
val) {
1563 switch (valId.subdet()) {
1577 fOutput << valId.subdet() <<
' ';
1581 fOutput << valId.ring() <<
' ';
1583 fOutput << valId.zside() <<
' ';
1585 fOutput << valId.slice() <<
' ' 1586 << valId.typeString(valId.type()) <<
' ' 1587 << valId.subchannel() <<
' ';
1588 fOutput <<
val->LS() <<
' ' 1589 <<
val->getValue() <<
' ' 1590 <<
val->getUpperLimit() <<
' ' 1591 <<
val->getLowerLimit() <<
' ';
1592 fOutput << std::hex <<
val->DcsId() <<
std::dec <<
'\n';
1613 while (fInput.getline(buffer, 1024)) {
1614 if (buffer [0] ==
'#')
continue;
1616 if (items.size () < 8) {
1617 if (items.empty())
continue;
1619 edm::LogError(
"MapFormat") <<
"HcalDcsMap-> Bad line: " << buffer
1620 <<
"\n line must contain 8 items: line side_ring slice subchannel subdet ieta iphi depth";
1624 int ring = atoi(items[1].c_str());
1625 unsigned int slice = atoi (items [2].c_str());
1626 unsigned int subchannel = atoi (items [3].c_str());
1629 if (items[4].
find(
"CALIB")!=std::string::npos){
1632 else if (items[4].
find(
"HB")!=std::string::npos){
1635 else if (items[4].
find(
"HE")!=std::string::npos){
1638 else if (items[4].
find(
"HO")!=std::string::npos){
1641 else if (items[4].
find(
"HF")!=std::string::npos){
1645 edm::LogError(
"MapFormat") <<
"HcalDcsMap-> Unknown subdetector, line is not accepted: " << items[5];
1648 HcalDcsDetId dcsId(subdet, ring, slice, type, subchannel);
1652 id = converter.
getId();
1655 edm::LogWarning(
"Invalid HCAL channel") <<
"HcalDcsMap-> invalid channel: " 1659 << items [7] << std::endl;
1664 auto fObject = std::make_unique<HcalDcsMap>(fObjectHelper);
1674 sprintf (buf,
"# %7s %10s %6s %8s %7s %5s %5s %6s",
1675 "i",
"side_ring",
"slice",
"subchan",
"subdet",
"ieta",
"iphi",
"depth");
1676 fOutput << buf << std::endl;
1678 unsigned int line_counter = 0;
1685 sprintf (buf,
" %8X %10d %6d %8d %7s %5s %5s %6s",
1690 _converter.getFlavor().c_str(),
1691 _converter.getField1().c_str(),
1692 _converter.getField2().c_str(),
1693 _converter.getField3().c_str()
1695 fOutput << buf << std::endl;
1705 if (!fObject)
return false;
1707 while (fInput.getline(buffer, 1024)) {
1708 if (buffer [0] ==
'#')
continue;
1710 if (items.empty())
continue;
1711 if (items.size () != 9) {
1712 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain at 9 least items: eta, phi, depth, subdet, firstSample, samplesToAdd, ExpectedPeak, MinEnergy, and a set of comma-separated coefficients" << std::endl;
1720 atoi (items [4].c_str()),
1721 atoi (items [5].c_str()),
1722 atoi (items [6].c_str()),
1723 atof (items [7].c_str()),
1735 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s %30s\n",
"eta",
"phi",
"dep",
"det",
"FirstSample",
"SamplesToAdd",
"ExpectedPeak",
"MinEnergy",
"Coefficients");
1738 std::sort (channels.begin(), channels.end(), DetIdLess ());
1739 for (std::vector<DetId>::iterator channel = channels.begin ();
1740 channel != channels.end ();
1745 sprintf (buffer,
" %15u %15u %15u %15f",
1760 if (
x<coef.size()-1)
1763 sprintf(buffer,
"\n");
1775 unsigned int all(0), good(0);
1776 while (fInput.getline(buffer, 1024)) {
1778 if (buffer [0] ==
'#')
continue;
1780 if (items.size () != 6) {
1786 int rm = atoi (items [5].c_str());
1789 edm::LogInfo(
"MapFormat") <<
"HcalFrontEndMap:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
1790 auto fObject = std::make_unique<HcalFrontEndMap>(fObjectHelper);
1798 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s\n",
"eta",
"phi",
"dep",
"det",
"rbx",
"rm");
1801 std::vector<DetId> channels = fObject.
allDetIds();
1802 std::sort (channels.begin(), channels.end(), DetIdLess ());
1803 for (std::vector<DetId>::iterator channel = channels.begin ();
1804 channel != channels.end (); ++channel) {
1807 dumpId (fOutput, *channel);
1808 sprintf (buffer,
" %8s %8d \n", rbx.c_str(),
rm);
1817 if (!fObject)
return false;
1819 while (fInput.getline(buffer, 1024)) {
1820 if (buffer [0] ==
'#')
continue;
1822 if (items.empty())
continue;
1823 if (items.size () < 9) {
1824 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 9 items: eta, phi, depth, subdet, 5x values" << std::endl;
1830 atof(items[5].c_str()),
1831 atof(items[6].c_str()),
1832 atoi(items[7].c_str()),
1833 atof(items[8].c_str()));
1843 sprintf (buffer,
"# %15s %15s %15s %15s %8s %15s %15s %8s %15s\n",
1844 "eta",
"phi",
"dep",
"det",
"type",
"fcByPE",
"darkCurrent",
1848 std::sort (channels.begin(), channels.end(), DetIdLess ());
1849 for (std::vector<DetId>::iterator channel = channels.begin ();
1850 channel != channels.end ();
1858 sprintf (buffer,
" %8d %15.6f %15.6f %8d %15.6f\n", type, fcByPE,
1859 darkC, auxi1, auxi2);
1871 unsigned int all(0), good(0);
1872 while (fInput.getline(buffer, 1024)) {
1874 if (buffer [0] ==
'#')
continue;
1876 if (items.size () != 8) {
1882 int type = atoi (items [0].c_str());
1883 int pixels = atoi (items [1].c_str());
1884 float parL0 = atof (items [2].c_str());
1885 float parL1 = atof (items [3].c_str());
1886 float parL2 = atof (items [4].c_str());
1887 float cTalk = atof (items [5].c_str());
1888 int auxi1 = atoi (items [6].c_str());
1889 float auxi2 = atof (items [7].c_str());
1890 fObjectHelper.
loadObject (type, pixels, parL0, parL1, parL2, cTalk, auxi1, auxi2);
1892 edm::LogInfo(
"MapFormat") <<
"HcalSiPMCharacteristics:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
1893 auto fObject = std::make_unique<HcalSiPMCharacteristics>(fObjectHelper);
1901 sprintf (buffer,
"# %8s %8s %15s %15s %15s %15s %8s %15s\n",
"type",
1902 "pixels",
"parLin1",
"parLin2",
"parLin3",
"crossTalk",
"auxi1",
1907 for (
unsigned int k=0;
k<
size; ++
k) {
1909 const int pixels = fObject.
getPixels(type);
1912 const int auxi1 = fObject.
getAuxi1(type);
1913 const float auxi2 = fObject.
getAuxi2(type);
1914 const float par0 = (!pars.empty()) ? pars[0] : 0;
1915 const float par1 = (pars.size() > 1) ? pars[1] : 0;
1916 const float par2 = (pars.size() > 2) ? pars[2] : 0;
1917 sprintf (buffer,
" %8d %8d %15.6e %15.6e %15.6e %15.6f %8d %15.6f\n",
1918 type, pixels, par0, par1, par2, cTalk, auxi1, auxi2);
1927 if (!fObject)
return false;
1929 while (fInput.getline(buffer, 1024)) {
1930 if (buffer [0] ==
'#')
continue;
1932 if (items.empty())
continue;
1933 if (items.size () < 8) {
1934 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
1940 atoi(items[4].c_str()),
1941 atoi(items[5].c_str()),
1942 atoi(items[6].c_str()),
1943 atoi(items[7].c_str()));
1953 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s\n",
1954 "eta",
"phi",
"dep",
"det",
"Mask",
"FGBitInfo",
"auxi1",
"auxi2");
1957 std::sort (channels.begin(), channels.end(), DetIdLess ());
1958 for (std::vector<DetId>::iterator channel = channels.begin ();
1959 channel != channels.end ();
1966 sprintf (buffer,
" %15d %15d %15d %15d \n", mask, fgBitInfo, auxi1, auxi2);
1976 unsigned int all(0), good(0);
1977 while (fInput.getline(buffer, 1024)) {
1979 if (buffer [0] ==
'#')
continue;
1981 if (items.size () != 6) {
1987 int version = atoi (items [0].c_str());
1988 int adcCut = atoi (items [1].c_str());
1989 uint64_t tdcMask = strtoull(items [2].c_str(),
nullptr,16);
1990 uint32_t tbits = atoi (items [3].c_str());
1991 int auxi1 = atoi (items [4].c_str());
1992 int auxi2 = atoi (items [5].c_str());
1993 fObject->
loadObject (version, adcCut, tdcMask, tbits, auxi1, auxi2);
1996 edm::LogInfo(
"MapFormat") <<
"HcalTPParameters:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
2003 sprintf (buffer,
"# %15s %15s %16s %15s %15s %15s\n",
"FGAlgo_HBHE",
2004 "ADCThrHF",
"TDCMaskHF",
"STBitsHF",
"auxi1",
"auxi2");
2011 const int auxi1 = fObject.
getAuxi1();
2012 const int auxi2 = fObject.
getAuxi2();
2014 sprintf (buffer,
" %15d %15d %16jx %15x %15d %15d\n", version, adcCut, tdcMask, tbits, auxi1, auxi2);
2024 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %11s %11s %11s %11s %9s %9s %9s %9s %10s\n",
2025 "eta",
"phi",
"dep",
"det",
2026 "pedcap0",
"pedcap1",
"pedcap2",
"pedcap3",
2027 "effpedcap0",
"effpedcap1",
"effpedcap2",
"effpedcap3",
2028 "gaincap0",
"gaincap1",
"gaincap2",
"gaincap3",
"DetId");
2032 std::sort (channels.begin(), channels.end(), DetIdLess ());
2033 for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); ++channel) {
2034 dumpId (fOutput, *channel);
2036 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %11.5f %11.5f %11.5f %11.5f %9.5f %9.5f %9.5f %9.5f %10X\n",
2047 sprintf (buffer,
"# %15s %15s %15s %15s %9s %9s %9s %9s %12s %12s %12s %12s %10s %10s %10s %10s %10s\n",
2048 "eta",
"phi",
"dep",
"det",
2049 "pedwcap0",
"pedwcap1",
"pedwcap2",
"pedwcap3",
2050 "effpedwcap0",
"effpedwcap1",
"effpedwcap2",
"effpedwcap3",
2051 "gainwcap0",
"gainwcap1",
"gainwcap2",
"gainwcap3",
"DetId");
2055 std::sort (channels.begin(), channels.end(), DetIdLess ());
2056 for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); ++channel) {
2057 dumpId (fOutput, *channel);
2059 sprintf (buffer,
" %9.5f %9.5f %9.5f %9.5f %12.5f %12.5f %12.5f %12.5f %10.5f %10.5f %10.5f %10.5f %10X\n",
2062 values.
gain(0), values.
gain(1), values.
gain(2), values.
gain(3), channel->rawId ());
const std::string & getField1() const
void dumpIdShort(std::ostream &fOutput, DetId id)
std::unique_ptr< HcalFrontEndMap > createObject< HcalFrontEndMap >(std::istream &fInput)
constexpr void setHTR(int crate, int slot, int tb)
float getPedestal() const
constexpr unsigned int pulseShapeID() const
static const HcalDetId Undefined
constexpr unsigned int param2() const
static unsigned int getId()
bool mapEId2chId(HcalElectronicsId fElectronicsId, DetId fId)
constexpr unsigned int samplesToAdd() const
void setUnitADC(bool isADC)
double gain(int fCapId) const
get gain width for capid=0..3
float slope(unsigned fCapId, unsigned fRange) const
int getAuxi1() const
get Axiliary words
std::vector< DetId > getAllChannels() const
uint64_t getTDCMaskHF() const
get TDC mask for HF
std::vector< unsigned int > signalTS() const
bool from_string(T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &))
bool isHcalZDCDetId() const
constexpr unsigned int pileupCleaningID() const
bool loadObject(DetId fId, int rm, std::string rbx)
load a new entry
static int slb(const HcalTriggerPrimitiveSample &theSample)
const HcalQIECoder * getCoder(DetId fId) const
get QIE parameters
bool timeSmearing() const
TObject * getObject(TDirectory *fDir, const std::vector< std::string > &fObjectName)
unsigned int packingScheme() const
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
uint32_t HFdigiflagSamplesToAdd() const
bool getHcalMatrixObject(std::istream &fInput, T *fObject, S *fCondObject)
std::vector< float > splitStringToFloatByComma(const std::string &fLine)
DcsSet const & getAllSubdetValues(DcsSubDet subd) const
int getType() const
get SiPM type
constexpr uint32_t rawId() const
get the raw id
double effpedestal(int fCapId) const
get effective pedestal width for capid=0..3
std::vector< unsigned int > splitStringToIntByComma(const std::string &fLine)
const Item * getValues(DetId fId, bool throwOnFail=true) const
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
constexpr int slbChannelIndex() const
get the SLB channel index (valid only for VME trigger-chain ids)
bool dumpHcalSingleFloatObject(std::ostream &fOutput, const T &fObject)
void dumpId(std::ostream &fOutput, DetId id)
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const HcalCalibrationQIECoder * getCoder(DetId fId) const
get QIE parameters
std::vector< std::string > splitString(const std::string &fLine)
std::vector< DetId > getAllChannels() const
bool addCoder(const HcalQIECoder &fCoder)
void dumpId(std::ostream &fOutput, DetId id)
float getCrossTalk(int type) const
get cross talk
constexpr unsigned int timeslewCorrectionID() const
unsigned int param1() const
U second(std::pair< T, U > const &p)
const_iterator endById(void) const
constexpr bool isUTCAid() const
bool isHcalZDCDetId() const
const std::string & getField3() const
bool isHcalTrigTowerDetId() const
constexpr int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
std::unique_ptr< HcalSiPMCharacteristics > createObject< HcalSiPMCharacteristics >(std::istream &fInput)
std::vector< HcalDcsValue > DcsSet
constexpr unsigned int noiseFlaggingID() const
void setUnitADC(bool isADC)
float getRespGain() const
double pedestal(int fCapId) const
get pedestal width for capid=0..3
float offset(unsigned fCapId, unsigned fRange) const
constexpr bool isVMEid() const
const_iterator beginById(void) const
std::vector< DetId > getAllChannels() const
constexpr float correctionPhaseNS() const
unsigned int nhits() const
std::vector< DetId > allDetIds() const
constexpr int htrSlot() const
get the htr slot
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
HcalDetId getHcalDetId(void)
int getFGVersionHBHE() const
get FineGrain Algorithm Version for HBHE
constexpr double effpedestal(int fCapId) const
get effective pedestal for capid=0..3
HcalDcsDetId getHcalDcsDetId(void)
bool dumpHcalMatrixObject(std::ostream &fOutput, const T &fObject)
constexpr int readoutVMECrateId() const
get the readout VME crate number
constexpr unsigned int firstAuxTS() const
uint32_t HFdigiflagExpectedPeak() const
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
constexpr int crateId() const
get the readout VME crate number
constexpr bool correctTiming() const
unsigned int getTypes() const
get # of types
bool mapGeomId2DcsId(HcalDetId fId, HcalDcsDetId fDcsId)
constexpr bool useLeakCorrection() const
float getDarkCurrent() const
get dark current
std::string getTagString() const
void setMinCharges(const float fValue[32])
uint32_t getHFTriggerInfo() const
get Self Trigger bits
bool mapEId2tId(HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
bool getHcalSingleObject(std::istream &fInput, T *fObject)
static DcsType DcsTypeFromString(const std::string &str)
bin
set the eta bin as selection string.
const HcalCalibrationWidths & getCalibrationWidths(const DetId id) const
std::vector< double > HFdigiflagCoefficients() const
constexpr int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
constexpr bool correctForPhaseContainment() const
constexpr double pedestal(int fCapId) const
get pedestal for capid=0..3
constexpr bool correctForTimeslew() const
const std::string & getField2() const
bool dumpObject(std::ostream &fOutput, const CastorPedestals &fObject)
int getAuxi1(int type) const
get auxiliary words
std::string getAlgoString() const
std::vector< HcalElectronicsId > allElectronicsId() const
unsigned long long uint64_t
bool getHcalObject(std::istream &fInput, T *fObject)
int getType(unsigned int k) const
constexpr bool correctForLeadingEdge() const
uint32_t HFdigiflagFirstSample() const
bool isHcalCalibDetId() const
const int lookupRM(DetId fId) const
brief lookup the RM associated with the given logical id
const HcalCalibrations & getCalibrations(const DetId id) const
bool loadObject(int type, int pixels, float parLin1, float parLin2, float parLin3, float crossTalk, int auxi1=0, float auxi2=0)
std::vector< float > getNonLinearities(int type) const
get nonlinearity constants
double S(const TLorentzVector &, const TLorentzVector &)
void loadObject(int version, int adcCut, uint64_t tdcMask, uint32_t tbits, int auxi1, int auxi2)
unsigned int signalShape() const
static const HcalTrigTowerDetId Undefined
bool addValue(HcalDcsValue const &newVal)
constexpr unsigned int param1() const
bool getObject(std::istream &fInput, HcalPedestals *fObject)
void setTagString(std::string const &fTag)
constexpr int slot() const
get the htr or uHTR slot
DetId getId(const std::vector< std::string > &items)
unsigned int binOfMaximum() const
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
constexpr unsigned int leakCorrectionID() const
constexpr int slbSiteNumber() const
get the SLB site number (valid only for VME trigger-chain ids)
uint32_t getFGBitInfo() const
get FG bit information
const float * getValues() const
get value for all capId = 0..3
bool dumpHcalObject(std::ostream &fOutput, const T &fObject)
constexpr unsigned int packingScheme() const
std::vector< unsigned int > noiseTS() const
constexpr bool isTriggerChainId() const
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
float getAuxi2(int type) const
const std::string & getFlavor() const
const float * minCharges() const
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
constexpr unsigned int specialCaseID() const
std::unique_ptr< HcalDcsMap > createObject< HcalDcsMap >(std::istream &fInput)
uint32_t getValue() const
bool addCoder(const HcalCalibrationQIECoder &fCoder)
bool addValues(const Item &myItem)
int getPixels(int type) const
get # of pixels
void setAlgoString(std::string const &fAlgo)
std::unique_ptr< HcalElectronicsMap > createObject< HcalElectronicsMap >(std::istream &fInput)
Readout chain identification for Hcal.
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
void setSigma(int fCapId1, int fCapId2, float fSigma)
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
const std::string lookupRBX(DetId fId) const
brief lookup the RBX associated with the given logical id
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
int getADCThresholdHF() const
get ADC threshold fof TDC mask of HF
float getFCByPE() const
get fcByPE
constexpr unsigned int firstSample() const
bool dumpHcalSingleIntObject(std::ostream &fOutput, const T &fObject)
uint32_t getMask() const
get mask for channel validity and self trigger information
std::vector< double > splitStringToDoubleByComma(const std::string &fLine)
double HFdigiflagMinEThreshold() const