22 bool operator () (
DetId fFirst,
DetId fSecond)
const {
25 if (
first.genericSubdet () !=
second.genericSubdet ())
return first.genericSubdet () <
second.genericSubdet ();
26 if (
first.isHcalDetId ()) {
29 return f1.zside () != s1.zside () ?
f1.zside () < s1.zside () :
30 f1.iphi () != s1.iphi () ?
f1.iphi () < s1.iphi () :
31 f1.ietaAbs () != s1.ietaAbs () ?
f1.ietaAbs () < s1.ietaAbs () :
32 f1.depth () < s1.depth ();
39 class HcalElectronicsIdLess {
55 std::vector <std::string>
result;
58 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
59 if (fLine [
i] ==
' ' ||
i == fLine.size ()) {
62 result.push_back (item);
68 if (empty) empty =
false;
75 std::vector <unsigned int>
result;
78 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
79 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
82 result.push_back (atoi (itemString.c_str()) );
88 if (empty) empty =
false;
95 std::vector <float>
result;
98 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
99 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
102 result.push_back (atof (itemString.c_str()) );
108 if (empty) empty =
false;
115 std::vector <double>
result;
118 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
119 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
122 result.push_back (atof (itemString.c_str()) );
128 if (empty) empty =
false;
136 return converter.
getId ();
142 sprintf (buffer,
" %15s %15s %15s %15s",
150 sprintf (buffer,
" %5s %4s %4s %10s",
160 std::istringstream iss(s);
161 return !(iss >>
f >>
t).
fail();
164 template <
class T,
class S>
166 if (!fObject)
return false;
168 while (fInput.getline(buffer, 1024)) {
169 if (buffer [0] ==
'#')
continue;
171 if (items.empty())
continue;
172 if (items.size () < 8) {
173 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
182 fCondObject =
new S(
id, atof (items [4].c_str()), atof (items [5].c_str()),
183 atof (items [6].c_str()), atof (items [7].c_str()));
184 fObject->addValues(*fCondObject);
195 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"cap0",
"cap1",
"cap2",
"cap3",
"DetId");
197 std::vector<DetId> channels = fObject.getAllChannels ();
198 std::sort (channels.begin(), channels.end(), DetIdLess ());
199 for (std::vector<DetId>::iterator channel = channels.begin ();
200 channel != channels.end ();
202 const float*
values = fObject.getValues (*channel)->getValues ();
205 sprintf (buffer,
" %10.7f %10.7f %10.7f %10.7f %10X\n",
206 values[0], values[1], values[2], values[3], channel->rawId ());
213 template <
class T,
class S>
215 if (!fObject)
return false;
217 while (fInput.getline(buffer, 1024)) {
218 if (buffer [0] ==
'#')
continue;
220 if (items.empty())
continue;
221 if (items.size () < 5) {
222 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
231 fCondObject =
new S(
id, atof (items [4].c_str()) );
232 fObject->addValues(*fCondObject);
242 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
244 std::vector<DetId> channels = fObject.getAllChannels ();
245 std::sort (channels.begin(), channels.end(), DetIdLess ());
246 for (std::vector<DetId>::iterator channel = channels.begin ();
247 channel != channels.end ();
249 const float value = fObject.getValues (*channel)->getValue ();
251 sprintf (buffer,
" %8.5f %10X\n",
252 value, channel->rawId ());
258 template <
class T,
class S>
260 if (!fObject)
return false;
262 while (fInput.getline(buffer, 1024)) {
263 if (buffer [0] ==
'#')
continue;
265 if (items.empty())
continue;
266 if (items.size () < 5) {
267 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
276 fCondObject =
new S(
id, atoi (items [4].c_str()) );
277 fObject->addValues(*fCondObject);
287 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
289 std::vector<DetId> channels = fObject.getAllChannels ();
290 std::sort (channels.begin(), channels.end(), DetIdLess ());
291 for (std::vector<DetId>::iterator channel = channels.begin ();
292 channel != channels.end ();
294 const int value = fObject.getValues (*channel)->getValue ();
296 sprintf (buffer,
" %15d %10X\n",
297 value, channel->rawId ());
303 template <
class T,
class S>
305 if (!fObject)
return false;
307 while (fInput.getline(buffer, 1024)) {
308 if (buffer [0] ==
'#')
continue;
310 if (items.empty())
continue;
312 fCondObject =
new S(firstid.
rawId());
313 for(
int j = 0; j != 10; j++) fCondObject->setValue(atoi(items[4].c_str()), 0, j, atof(items[j+5].c_str()));
314 for(
int i = 1;
i != 40;
i++){
315 fInput.getline(buffer, 1024);
318 if(
id.rawId() != firstid.
rawId())
break;
319 for(
int j = 0; j != 10; j++) fCondObject->setValue(atoi(items[4].c_str()),
i%10, j, atof(items[j+5].c_str()));
321 fObject->addValues(*fCondObject);
330 sprintf (buffer,
"# %5s %5s %5s %5s %5s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
331 "eta",
"phi",
"dep",
"det",
"capid",
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
"c7",
"c8",
"c9",
"DetId");
333 std::vector<DetId> channels = fObject.getAllChannels ();
334 std::sort (channels.begin(), channels.end(), DetIdLess ());
335 for (std::vector<DetId>::iterator channel = channels.begin ();
336 channel != channels.end ();
339 for(
int m = 0;
m != 4;
m++){
340 for(
int i = 0;
i != 10;
i++){
341 for(
int j = 0; j != 10; j++){
343 thisline[j] = fObject.getValues(*channel)->getValue(
m,
i,j);
347 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",
348 m, thisline[0], thisline[1], thisline[2], thisline[3], thisline[4], thisline[5], thisline[6], thisline[7],
349 thisline[8], thisline[9], channel->rawId());
392 if (!fObject)
return false;
394 while (fInput.getline(buffer, 1024)) {
395 if (buffer [0] ==
'#')
continue;
397 if (items.empty())
continue;
398 if (items.size () < 6) {
399 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, param1, param2" << std::endl;
404 int packingScheme =0;
405 if(items.size ()>22) {
406 packingScheme = atoi (items [22].c_str());
411 if(packingScheme==0) {
412 param1=atoi (items [4].c_str());
413 param2=atoi (items [5].c_str());
416 if(packingScheme==1) {
418 int aabits[6]= {1,1, 8, 4, 4, 9};
419 int aamax[ 6]= {1,1,255,15,15,511};
421 int bbbits[10]={1, 4,1, 4,1, 4, 4, 4, 4, 4};
422 int bbmax [10]={1,15,1,15,1,15,15,15,15,15};
428 for(
int i=0;
i<6;
i++) {
431 float phase=atof (items [j].c_str());
432 float xphase=(phase+32.0)*4.0;
435 aa=atoi (items [j].c_str());
437 if(aa>aamax[
i] || aa<0) {
438 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for a"<<
i<<
" should be less than"<<aamax[
i]<< std::endl;
440 param1=param1|aa<<aashift;
441 aashift=aashift+aabits[
i];
447 for(
int i=0;
i<10;
i++) {
449 bb=atoi (items [j].c_str());
451 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for b"<<i<<
" should be less than"<<bbmax[
i]<< std::endl;
453 param2=param2|bb<<bbshift;
454 bbshift=bbshift+bbbits[
i];
475 std::sort (channels.begin(), channels.end(), DetIdLess ());
477 for (std::vector<DetId>::iterator channel = channels.begin ();
478 channel != channels.end ();
487 if(packingScheme==0) {
490 sprintf (buffer,
"# %15s %15s %15s %15s %18s %15s %10s\n",
"eta",
"phi",
"dep",
"det",
"firstSample",
"samplesToAdd",
"DetId");
493 sprintf (buffer,
" %15d %15d %16X\n",
498 if(packingScheme==1) {
501 char lineT[100],lineA[200],lineB[200];
503 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
504 sprintf (lineA,
" %31s",
"a0: correctForPhaseContainment"); fOutput << lineA;
505 sprintf (lineB,
" %36s",
"b0: useLeakCorrection\n"); fOutput << lineB;
507 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
508 sprintf (lineA,
" %31s",
"a1: correctForLeadingEdge"); fOutput << lineA;
509 sprintf (lineB,
" %36s",
"b1: leakCorrectionID\n"); fOutput << lineB;
511 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
512 sprintf (lineA,
" %31s",
"a2: correctionPhaseNS"); fOutput << lineA;
513 sprintf (lineB,
" %36s",
"b2: correctForTimeslew\n"); fOutput << lineB;
515 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
516 sprintf (lineA,
" %31s",
"a3: firstSample"); fOutput << lineA;
517 sprintf (lineB,
" %36s",
"b3: timeslewCorrectionID\n"); fOutput << lineB;
519 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
520 sprintf (lineA,
" %31s",
"a4: samplesToAdd"); fOutput << lineA;
521 sprintf (lineB,
" %36s",
"b4: correctTiming\n"); fOutput << lineB;
523 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
524 sprintf (lineA,
" %31s",
"a5: pulseShapeID"); fOutput << lineA;
525 sprintf (lineB,
" %36s",
"b5: firstAuxTS\n"); fOutput << lineB;
527 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
528 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
529 sprintf (lineB,
" %36s",
"b6: specialCaseID\n"); fOutput << lineB;
531 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
532 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
533 sprintf (lineB,
" %36s",
"b7: noiseFlaggingID\n"); fOutput << lineB;
535 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
536 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
537 sprintf (lineB,
" %36s",
"b8: pileupCleaningID\n"); fOutput << lineB;
539 sprintf (lineT,
"#%50s",
" "); fOutput << lineT;
540 sprintf (lineA,
" %31s",
" "); fOutput << lineA;
541 sprintf (lineB,
" %36s",
"b9: packingScheme\n"); fOutput << lineB;
544 sprintf (lineT,
"# %5s %4s %4s %10s %11s %10s %10s",
"eta",
"phi",
"dep",
"det",
"param1",
"param2",
"DetId");
547 sprintf (lineA,
" %6s %4s %6s %4s %4s %4s",
"a0",
"a1",
"a2",
"a3",
"a4",
"a5");
550 sprintf (lineB,
" %6s %3s %3s %3s %3s %3s %3s %3s %3s\n",
"b0",
"b1",
"b2",
"b3",
"b4",
"b5",
"b6",
"b7",
"b8");
555 sprintf (buffer,
" %11d %10d %10X", param1, param2, channel->rawId ());
564 sprintf (buffer,
" %6d %4d %6.1f %4d %4d %4d",aa0,aa1,aa2,aa3,aa4,aa5);
577 sprintf(buffer,
" %6d %3d %3d %3d %3d %3d %3d %3d %3d %3d\n",bb0,bb1,bb2,bb3,bb4,bb5,bb6,bb7,bb8,bb9);
587 if (!fObject)
return false;
589 while (fInput.getline(buffer, 1024)) {
590 if (buffer [0] ==
'#')
continue;
592 if (items.empty())
continue;
593 if (items.size() < 5) {
594 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, signalTSs, noiseTSs" << std::endl;
597 if (items.size() > 7) {
598 edm::LogWarning(
"Format Error") <<
"Check line: " << buffer <<
"\n line must contain 6 items: eta, phi, depth, subdet, signalTSs, noiseTSs. " 599 <<
"\n ! signalTS and noiseTS must be of format <ts1,ts2,ts3,...> withOUT spaces. Ignoring line for safety" << std::endl;
616 if (!fObject)
return false;
618 while (fInput.getline(buffer, 1024)) {
619 if (buffer [0] ==
'#')
continue;
621 if (items.empty())
continue;
622 if (items.size () < 7) {
623 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, nhit, phase, rms,detid" << std::endl;
645 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s\n",
"eta",
"phi",
"dep",
"det",
"nhit",
"mean",
"rms" ,
"DetId");
648 std::sort (channels.begin(), channels.end(), DetIdLess ());
649 for (std::vector<DetId>::iterator channel = channels.begin ();
650 channel != channels.end ();
653 sprintf (buffer,
" %15d %8.5f %8.5f %16X\n",
663 sprintf (buffer,
"# %15s %15s %15s %15s %10s %10s %10s\n",
"eta",
"phi",
"dep",
"det",
"signalTSs",
"noiseTSs",
"DetId");
666 std::sort (channels.begin(), channels.end(), DetIdLess ());
667 for (std::vector<DetId>::iterator channel = channels.begin ();
668 channel != channels.end ();
674 std::vector<unsigned int> vNoiseTS = fObject.
getValues (*channel)->
noiseTS();
676 sprintf (buffer,
" ");
678 for (
unsigned int i=0;
i<vSignalTS.size();
i++)
680 if (
i>0) {sprintf (buffer,
","); fOutput <<
buffer;}
681 sprintf (buffer,
"%u", vSignalTS.at(
i));
684 sprintf (buffer,
" ");
686 for (
unsigned int i=0;
i<vNoiseTS.size();
i++)
688 if (
i>0) { sprintf (buffer,
","); fOutput <<
buffer;}
689 sprintf (buffer,
"%u", vNoiseTS.at(
i));
692 sprintf (buffer,
" %10X\n", channel->rawId ());
701 if (!fObject)
return false;
703 while (fInput.getline(buffer, 1024)) {
704 if (buffer [0] ==
'#')
continue;
706 if (items.empty())
continue;
707 if (items.size () < 5) {
708 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, signalShape" << std::endl;
714 if(items.size ()>11) {
715 packingScheme = atoi (items [11].c_str());
719 if(packingScheme==0) {
720 param1=atoi (items [4].c_str());
723 if(packingScheme==1) {
724 int aabits[6]={ 9,1, 4, 8,5, 4};
725 int aamax [6]={511,1,15,255,1,16};
729 for(
int i=0;
i<6;
i++) {
732 float phase=atof (items [j].c_str());
733 float xphase=(phase+32.0)*4.0;
736 aa=atoi (items [j].c_str());
738 if(aa>aamax[
i] || aa<0) {
739 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value for a"<<
i<<
" should be less than"<<aamax[
i]<< std::endl;
742 param1=param1|aa<<aashift;
743 aashift=aashift+aabits[
i];
760 std::sort (channels.begin(), channels.end(), DetIdLess ());
762 for (std::vector<DetId>::iterator channel = channels.begin ();
763 channel != channels.end ();
767 if(packingScheme==0) {
769 sprintf (buffer,
"# %15s %15s %15s %15s %14s %10s\n",
"eta",
"phi",
"dep",
"det",
"signalShape",
"DetId");
774 sprintf (buffer,
" %10d %17X\n", value, channel->rawId ());
777 if(packingScheme==1) {
779 char lineT[100],lineA[200];
781 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
782 sprintf (lineA,
" %31s",
"a0: signalShape\n"); fOutput << lineA;
783 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
784 sprintf (lineA,
" %31s",
"a1: syncPhase\n"); fOutput << lineA;
785 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
786 sprintf (lineA,
" %31s",
"a2: binOfMaximum\n"); fOutput << lineA;
787 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
788 sprintf (lineA,
" %31s",
"a3: timePhase\n"); fOutput << lineA;
789 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
790 sprintf (lineA,
" %31s",
"a4: timeSmearing\n"); fOutput << lineA;
791 sprintf (lineT,
"#%40s",
" "); fOutput << lineT;
792 sprintf (lineA,
" %31s",
"a5: packingScheme\n"); fOutput << lineA;
793 sprintf (lineT,
"# %5s %4s %4s %10s %11s %10s",
"eta",
"phi",
"dep",
"det",
"param1",
"DetId");
795 sprintf (lineA,
" %6s %4s %4s %6s %4s %4s\n",
"a0",
"a1",
"a2",
"a3",
"a4",
"a5");
800 sprintf (buffer,
" %11d %10X", param1, channel->rawId ());
808 sprintf (buffer,
"%6d %4d %4d %6.1f %4d %4d\n",aa0,aa1,aa2,aa3,aa4,aa5);
818 while (fInput.getline(buffer, 1024)) {
820 if (items.empty())
continue;
822 if (items[0] ==
"#U")
828 edm::LogWarning(
"Pedestal Unit Error") <<
"Unrecognized unit for pedestals. Assuming fC." << std::endl;
835 edm::LogWarning(
"Pedestal Unit Missing") <<
"The unit for the pedestals is missing in the txt file." << std::endl;
840 while (fInput.getline(buffer, 1024)) {
841 if (buffer [0] ==
'#')
continue;
843 if (items.empty())
continue;
844 if (items.size () < 8) {
845 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" 846 <<
" or 12 items: eta, phi, depth, subdet, 4x values for mean, 4x values for width" 857 if (items.size() < 12)
860 atof (items [6].c_str()), atof (items [7].c_str()),
868 atof (items [6].c_str()), atof (items [7].c_str()),
869 atof (items [8].c_str()), atof (items [9].c_str()),
870 atof (items [10].c_str()), atof (items [11].c_str()) );
883 if (fObject.
isADC() ) sprintf (buffer,
"#U ADC << this is the unit \n");
884 else sprintf (buffer,
"#U fC << this is the unit \n");
887 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");
891 std::sort (channels.begin(), channels.end(), DetIdLess ());
892 for (std::vector<DetId>::iterator channel = channels.begin ();
893 channel != channels.end ();
897 dumpId (fOutput, *channel);
898 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
899 values[0], values[1], values[2], values[3], values[4], values[5], values[6], values[7], channel->rawId ());
910 if (!fObject)
return false;
912 while (fInput.getline(buffer, 1024)) {
913 if (buffer [0] ==
'#')
continue;
915 if (items.empty())
continue;
916 if (items.size () < 6) {
917 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;
927 if (items[4] ==
"(hex)")
928 sscanf(items[5].c_str(),
"%X", &mystatus);
929 else if (items[4] ==
"(dec)")
930 sscanf(items[5].c_str(),
"%u", &mystatus);
933 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n value field must contain the base: one of (hex), (dec)" << std::endl;
948 sprintf (buffer,
"# %15s %15s %15s %15s %15s %10s\n",
"eta",
"phi",
"dep",
"det",
"(base) value",
"DetId");
951 std::sort (channels.begin(), channels.end(), DetIdLess ());
952 for (std::vector<DetId>::iterator channel = channels.begin ();
953 channel != channels.end ();
956 dumpId (fOutput, *channel);
957 sprintf (buffer,
"%6s %15X %10X\n",
"(hex)",
958 value, channel->rawId ());
970 while (fInput.getline(buffer, 1024)) {
971 if (buffer [0] ==
'#')
973 if (buffer [1] ==
'T')
979 if (buffer [1] ==
'A')
988 if (items.empty())
continue;
989 if (items.size () < 7) {
990 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, pedestal, resp.corr.gain, flag" << std::endl;
1007 sprintf (buffer,
"#T %s << this is the tag name \n", fObject.
getTagString().c_str() );
1009 sprintf (buffer,
"#A %s << this is the algorithm name \n", fObject.
getAlgoString().c_str() );
1013 sprintf (buffer,
"# %15s %15s %15s %15s %8s %13s %8s %10s\n",
1014 "eta",
"phi",
"dep",
"det",
"ped",
"respcorrgain",
"flag",
1019 for (std::vector<DetId>::iterator channel = channels.begin ();
1020 channel != channels.end ();
1024 dumpId (fOutput, *channel);
1025 sprintf (buffer,
" %12.7f %13.10f %12d %10X\n",
1038 int linecounter = 0;
1040 while (fInput.getline(buffer, 1024)) {
1043 if (items.empty())
continue;
1051 edm::LogWarning(
"Pedestal Width Unit Error") <<
"Unrecognized unit for pedestal widths. Assuming fC." << std::endl;
1058 edm::LogWarning(
"Pedestal Width Unit Missing") <<
"The unit for the pedestal widths is missing in the txt file." << std::endl;
1064 while (fInput.getline(buffer, 1024)) {
1066 if (buffer [0] ==
'#')
continue;
1068 if (items.empty())
continue;
1069 if (items.size () < 14) {
1070 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line number: " << linecounter <<
"\n line must contain 14 items: eta, phi, depth, subdet, 10x correlations" 1071 <<
" or 20 items: eta, phi, depth, subdet, 16x correlations" 1082 if (items.size() < 20)
1085 values.
setSigma (0, 0, atof (items [4].c_str()));
1086 values.
setSigma (1, 0, atof (items [5].c_str()));
1087 values.
setSigma (1, 1, atof (items [6].c_str()));
1088 values.
setSigma (2, 0, atof (items [7].c_str()));
1089 values.
setSigma (2, 1, atof (items [8].c_str()));
1090 values.
setSigma (2, 2, atof (items [9].c_str()));
1091 values.
setSigma (3, 0, atof (items [10].c_str()));
1092 values.
setSigma (3, 1, atof (items [11].c_str()));
1093 values.
setSigma (3, 2, atof (items [12].c_str()));
1094 values.
setSigma (3, 3, atof (items [13].c_str()));
1106 values.
setSigma (0, 0, atof (items [4].c_str()) );
1107 values.
setSigma (0, 1, atof (items [5].c_str()) );
1108 values.
setSigma (0, 2, atof (items [6].c_str()) );
1109 values.
setSigma (0, 3, atof (items [7].c_str()) );
1110 values.
setSigma (1, 0, atof (items [8].c_str()) );
1111 values.
setSigma (1, 1, atof (items [9].c_str()) );
1112 values.
setSigma (1, 2, atof (items [10].c_str()) );
1113 values.
setSigma (1, 3, atof (items [11].c_str()) );
1114 values.
setSigma (2, 0, atof (items [12].c_str()) );
1115 values.
setSigma (2, 1, atof (items [13].c_str()) );
1116 values.
setSigma (2, 2, atof (items [14].c_str()) );
1117 values.
setSigma (2, 3, atof (items [15].c_str()) );
1118 values.
setSigma (3, 0, atof (items [16].c_str()) );
1119 values.
setSigma (3, 1, atof (items [17].c_str()) );
1120 values.
setSigma (3, 2, atof (items [18].c_str()) );
1121 values.
setSigma (3, 3, atof (items [19].c_str()) );
1132 if (fObject.
isADC() ) sprintf (buffer,
"#U ADC << this is the unit \n");
1133 else sprintf (buffer,
"#U fC << this is the unit \n");
1136 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
1137 "eta",
"phi",
"dep",
"det",
1138 "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",
1142 std::sort (channels.begin(), channels.end(), DetIdLess ());
1143 for (std::vector<DetId>::iterator channel = channels.begin ();
1144 channel != channels.end ();
1148 dumpId (fOutput, *channel);
1149 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",
1164 while (fInput.getline(buffer, 1024)) {
1165 if (buffer [0] ==
'#')
continue;
1167 if (items.empty())
continue;
1168 if (items [0] ==
"SHAPE") {
1172 if (items.size () < 36) {
1173 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;
1185 for (
unsigned capid = 0; capid < 4; capid++) {
1186 for (
unsigned range = 0; range < 4; range++) {
1187 coder.
setOffset (capid, range, atof (items [index++].c_str ()));
1190 for (
unsigned capid = 0; capid < 4; capid++) {
1191 for (
unsigned range = 0; range < 4; range++) {
1192 coder.
setSlope (capid, range, atof (items [index++].c_str ()));
1208 fOutput <<
"# QIE data" << std::endl;
1209 sprintf (buffer,
"# %15s %15s %15s %15s %36s %36s %36s %36s %36s %36s %36s %36s\n",
1210 "eta",
"phi",
"dep",
"det",
1211 "4 x offsets cap0",
"4 x offsets cap1",
"4 x offsets cap2",
"4 x offsets cap3",
1212 "4 x slopes cap0",
"4 x slopes cap1",
"4 x slopes cap2",
"4 x slopes cap3");
1215 std::sort (channels.begin(), channels.end(), DetIdLess ());
1216 for (std::vector<DetId>::iterator channel = channels.begin ();
1217 channel != channels.end ();
1220 dumpId (fOutput, *channel);
1221 for (
unsigned capid = 0; capid < 4; capid++) {
1222 for (
unsigned range = 0; range < 4; range++) {
1223 sprintf (buffer,
" %8.5f", coder->
offset (capid, range));
1227 for (
unsigned capid = 0; capid < 4; capid++) {
1228 for (
unsigned range = 0; range < 4; range++) {
1229 sprintf (buffer,
" %8.5f", coder->
slope (capid, range));
1233 fOutput << std::endl;
1241 while (fInput.getline(buffer, 1024)) {
1242 if (buffer [0] ==
'#')
continue;
1244 if (items.size () < 36) {
1245 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 36 items: eta, phi, depth, subdet, 32 bin values" << std::endl;
1258 for (
unsigned bin = 0;
bin < 32;
bin++) {
1259 values[
bin] = atof (items [index++].c_str ());
1271 fOutput <<
"# QIE data in calibration mode" << std::endl;
1272 sprintf (buffer,
"# %15s %15s %15s %15s %288s\n",
1273 "eta",
"phi",
"dep",
"det",
"32 x charges");
1276 std::sort (channels.begin(), channels.end(), DetIdLess ());
1277 for (std::vector<DetId>::iterator channel = channels.begin ();
1278 channel != channels.end ();
1282 dumpId (fOutput, *channel);
1284 for (
unsigned bin = 0;
bin < 32;
bin++) {
1285 sprintf (buffer,
" %8.5f", lowEdge [
bin]);
1288 fOutput << std::endl;
1300 while (fInput.getline(buffer, 1024)) {
1301 if (buffer [0] ==
'#')
continue;
1303 if (items.size () < 12) {
1304 if (items.empty())
continue;
1305 if (items.size()<9) {
1309 if (items[8]==
"NA" || items[8]==
"NT") {
1310 while (items.size()<12) items.push_back(
"");
1311 }
else if (items[8]==
"HT") {
1312 if (items.size()==11) items.push_back(
"");
1314 edm::LogError(
"MapFormat") <<
"HcalElectronicsMap-> Bad line: " << buffer
1315 <<
"\n HT line must contain at least 11 items: i cr sl tb dcc spigot fiber fiberchan subdet=HT ieta iphi";
1319 edm::LogError(
"MapFormat") <<
"HcalElectronicsMap-> Bad line: " << buffer
1320 <<
"\n line must contain 12 items: i cr sl tb dcc spigot fiber fiberchan subdet ieta iphi depth";
1324 int crate = atoi (items [1].c_str());
1325 int slot = atoi (items [2].c_str());
1327 if (items [3] ==
"b") top = 0;
1328 int dcc = atoi (items [4].c_str());
1329 int spigot = atoi (items [5].c_str());
1331 if (items[3][0] ==
'u') {
1332 int fiber = atoi (items [6].c_str());
1333 int fiberCh = atoi (items [7].c_str());
1334 bool isTrig=(items[8] ==
"HT" || items[8] ==
"NT");
1336 }
else if (items[8] ==
"HT" || items[8] ==
"NT") {
1337 int slb = atoi (items [6].c_str());
1338 int slbCh = atoi (items [7].c_str());
1341 int fiber = atoi (items [6].c_str());
1342 int fiberCh = atoi (items [7].c_str());
1345 elId.
setHTR (crate, slot, top);
1349 if (items [8] ==
"NA") {
1351 }
else if (items [8] ==
"NT") {
1362 edm::LogWarning(
"Format Error") <<
"HcalElectronicsMap-> Unknown subdetector: " 1363 << items [8] <<
'/' << items [9] <<
'/' << items [10] <<
'/' << items [11] << std::endl;
1367 auto fObject = std::make_unique<HcalElectronicsMap>(fObjectHelper);
1377 sprintf (buf,
"# %7s %3s %3s %3s %4s %7s %10s %14s %7s %5s %5s %6s",
1378 "i",
"cr",
"sl",
"tb",
"dcc",
"spigot",
"fiber/slb",
"fibcha/slbcha",
"subdet",
"ieta",
"iphi",
"depth");
1379 fOutput << buf << std::endl;
1381 for (
unsigned i = 0;
i < eids.size ();
i++) {
1385 if (trigger.
rawId ()) {
1390 sprintf (buf,
" %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
1398 fOutput << buf << std::endl;
1400 sprintf (buf,
" %7X %3d %3d u %4d %7d %10d %14d %7s %5s %5s %6s",
1406 fOutput << buf << std::endl;
1408 sprintf (buf,
"NOT SUPPORTED!");
1409 fOutput << buf << std::endl;
1414 if (channel.
rawId()) {
1419 sprintf (buf,
" %7X %3d %3d %3c %4d %7d %10d %14d %7s %5s %5s %6s",
1426 sprintf (buf,
" %7X %3d %3d u %4d %7d %10d %14d %7s %5s %5s %6s",
1434 fOutput << buf << std::endl;
1443 if (!fObject)
return false;
1445 while (fInput.getline(buffer, 1024)) {
1446 if (buffer [0] ==
'#')
continue;
1448 if (items.empty())
continue;
1450 if (items.size() > 1 &&
1451 items[0].find(
"RctLsb")!=std::string::npos){
1452 fObject->
setRctLsb( atof( items[1].c_str() ) );
1455 if (items.size() > 1 &&
1456 items[0].find(
"Gain")!=std::string::npos){
1461 if (items.size () < 7) {
1462 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 7 items: eta, phi, depth, subdet, Rcalib, LutGranularity, OutputLutThreshold" << std::endl;
1468 atof (items [4].c_str()),
1469 atoi (items [5].c_str()),
1470 atoi (items [6].c_str()));
1480 const float _rctLsb = fObject.
getRctLsb();
1482 sprintf (buffer,
"# %20s\n",
"Non-channel data");
1484 sprintf (buffer,
"%8s %8.5f\n",
"RctLsb", _rctLsb);
1486 sprintf (buffer,
"%8s %8.5f\n",
"Gain", _gain);
1488 sprintf (buffer,
"# %15s %15s %15s %15s %8s %15s %19s %10s\n",
"eta",
"phi",
"dep",
"det",
"Rcalib",
"LutGranularity",
"OutputLutThreshold",
"DetId");
1491 std::sort (channels.begin(), channels.end(), DetIdLess ());
1492 for (std::vector<DetId>::iterator channel = channels.begin ();
1493 channel != channels.end ();
1498 dumpId (fOutput, *channel);
1499 sprintf (buffer,
" %8.5f %15d %19d %10X\n",
1502 _outputLutThreshold,
1511 if (!fObject)
return false;
1513 while (getline(fInput, buffer)) {
1514 if (buffer.at(0) ==
'#')
continue;
1515 std::vector <std::string> items =
splitString (buffer);
1516 if (items.empty())
continue;
1518 if (items.size() < 9) {
1519 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;
1525 unsigned int slice, subchan;
1526 switch (items[0].at(1)) {
1543 from_string<int>(sidering, items[1],
std::dec);
1544 from_string<unsigned int>(slice, items[2],
std::dec);
1546 from_string<unsigned int>(subchan, items[4],
std::dec);
1553 from_string<int>(LS, items[5],
std::dec);
1556 from_string<float>(lower, items[8],
std::dec);
1564 if (!(fObject->
addValue(newVal))) {
1566 <<
"\nwas not added to the HcalDcsValues object." << std::endl;
1576 fOutput <<
"# subDet side_ring slice type subChan LS Value UpperLimit LowerLimit DcsId\n";
1582 for (HcalDcsValues::DcsSet::const_iterator
val = vals.begin();
1583 val != vals.end(); ++
val) {
1586 switch (valId.subdet()) {
1600 fOutput << valId.subdet() <<
' ';
1604 fOutput << valId.ring() <<
' ';
1606 fOutput << valId.zside() <<
' ';
1608 fOutput << valId.slice() <<
' ' 1609 << valId.typeString(valId.type()) <<
' ' 1610 << valId.subchannel() <<
' ';
1611 fOutput <<
val->LS() <<
' ' 1612 <<
val->getValue() <<
' ' 1613 <<
val->getUpperLimit() <<
' ' 1614 <<
val->getLowerLimit() <<
' ';
1615 fOutput << std::hex <<
val->DcsId() <<
std::dec <<
'\n';
1636 while (fInput.getline(buffer, 1024)) {
1637 if (buffer [0] ==
'#')
continue;
1639 if (items.size () < 8) {
1640 if (items.empty())
continue;
1642 edm::LogError(
"MapFormat") <<
"HcalDcsMap-> Bad line: " << buffer
1643 <<
"\n line must contain 8 items: line side_ring slice subchannel subdet ieta iphi depth";
1647 int ring = atoi(items[1].c_str());
1648 unsigned int slice = atoi (items [2].c_str());
1649 unsigned int subchannel = atoi (items [3].c_str());
1652 if (items[4].
find(
"CALIB")!=std::string::npos){
1655 else if (items[4].
find(
"HB")!=std::string::npos){
1658 else if (items[4].
find(
"HE")!=std::string::npos){
1661 else if (items[4].
find(
"HO")!=std::string::npos){
1664 else if (items[4].
find(
"HF")!=std::string::npos){
1668 edm::LogError(
"MapFormat") <<
"HcalDcsMap-> Unknown subdetector, line is not accepted: " << items[5];
1671 HcalDcsDetId dcsId(subdet, ring, slice, type, subchannel);
1675 id = converter.
getId();
1678 edm::LogWarning(
"Invalid HCAL channel") <<
"HcalDcsMap-> invalid channel: " 1682 << items [7] << std::endl;
1687 auto fObject = std::make_unique<HcalDcsMap>(fObjectHelper);
1697 sprintf (buf,
"# %7s %10s %6s %8s %7s %5s %5s %6s",
1698 "i",
"side_ring",
"slice",
"subchan",
"subdet",
"ieta",
"iphi",
"depth");
1699 fOutput << buf << std::endl;
1701 unsigned int line_counter = 0;
1708 sprintf (buf,
" %8X %10d %6d %8d %7s %5s %5s %6s",
1713 _converter.getFlavor().c_str(),
1714 _converter.getField1().c_str(),
1715 _converter.getField2().c_str(),
1716 _converter.getField3().c_str()
1718 fOutput << buf << std::endl;
1728 if (!fObject)
return false;
1730 while (fInput.getline(buffer, 1024)) {
1731 if (buffer [0] ==
'#')
continue;
1733 if (items.empty())
continue;
1734 if (items.size () != 9) {
1735 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;
1743 atoi (items [4].c_str()),
1744 atoi (items [5].c_str()),
1745 atoi (items [6].c_str()),
1746 atof (items [7].c_str()),
1758 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s %30s\n",
"eta",
"phi",
"dep",
"det",
"FirstSample",
"SamplesToAdd",
"ExpectedPeak",
"MinEnergy",
"Coefficients");
1761 std::sort (channels.begin(), channels.end(), DetIdLess ());
1762 for (std::vector<DetId>::iterator channel = channels.begin ();
1763 channel != channels.end ();
1768 sprintf (buffer,
" %15u %15u %15u %15f",
1783 if (
x<coef.size()-1)
1786 sprintf(buffer,
"\n");
1798 unsigned int all(0), good(0);
1799 while (fInput.getline(buffer, 1024)) {
1801 if (buffer [0] ==
'#')
continue;
1803 if (items.size () != 6) {
1809 int rm = atoi (items [5].c_str());
1812 edm::LogInfo(
"MapFormat") <<
"HcalFrontEndMap:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
1813 auto fObject = std::make_unique<HcalFrontEndMap>(fObjectHelper);
1821 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s\n",
"eta",
"phi",
"dep",
"det",
"rbx",
"rm");
1824 std::vector<DetId> channels = fObject.
allDetIds();
1825 std::sort (channels.begin(), channels.end(), DetIdLess ());
1826 for (std::vector<DetId>::iterator channel = channels.begin ();
1827 channel != channels.end (); ++channel) {
1830 dumpId (fOutput, *channel);
1831 sprintf (buffer,
" %8s %8d \n", rbx.c_str(),
rm);
1840 if (!fObject)
return false;
1842 while (fInput.getline(buffer, 1024)) {
1843 if (buffer [0] ==
'#')
continue;
1845 if (items.empty())
continue;
1846 if (items.size () < 9) {
1847 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 9 items: eta, phi, depth, subdet, 5x values" << std::endl;
1853 atof(items[5].c_str()),
1854 atof(items[6].c_str()),
1855 atoi(items[7].c_str()),
1856 atof(items[8].c_str()));
1866 sprintf (buffer,
"# %15s %15s %15s %15s %8s %15s %15s %8s %15s\n",
1867 "eta",
"phi",
"dep",
"det",
"type",
"fcByPE",
"darkCurrent",
1871 std::sort (channels.begin(), channels.end(), DetIdLess ());
1872 for (std::vector<DetId>::iterator channel = channels.begin ();
1873 channel != channels.end ();
1881 sprintf (buffer,
" %8d %15.6f %15.6f %8d %15.6f\n", type, fcByPE,
1882 darkC, auxi1, auxi2);
1894 unsigned int all(0), good(0);
1895 while (fInput.getline(buffer, 1024)) {
1897 if (buffer [0] ==
'#')
continue;
1899 if (items.size () != 8) {
1905 int type = atoi (items [0].c_str());
1906 int pixels = atoi (items [1].c_str());
1907 float parL0 = atof (items [2].c_str());
1908 float parL1 = atof (items [3].c_str());
1909 float parL2 = atof (items [4].c_str());
1910 float cTalk = atof (items [5].c_str());
1911 int auxi1 = atoi (items [6].c_str());
1912 float auxi2 = atof (items [7].c_str());
1913 fObjectHelper.
loadObject (type, pixels, parL0, parL1, parL2, cTalk, auxi1, auxi2);
1915 edm::LogInfo(
"MapFormat") <<
"HcalSiPMCharacteristics:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
1916 auto fObject = std::make_unique<HcalSiPMCharacteristics>(fObjectHelper);
1924 sprintf (buffer,
"# %8s %8s %15s %15s %15s %15s %8s %15s\n",
"type",
1925 "pixels",
"parLin1",
"parLin2",
"parLin3",
"crossTalk",
"auxi1",
1930 for (
unsigned int k=0;
k<
size; ++
k) {
1932 const int pixels = fObject.
getPixels(type);
1935 const int auxi1 = fObject.
getAuxi1(type);
1936 const float auxi2 = fObject.
getAuxi2(type);
1937 const float par0 = (!pars.empty()) ? pars[0] : 0;
1938 const float par1 = (pars.size() > 1) ? pars[1] : 0;
1939 const float par2 = (pars.size() > 2) ? pars[2] : 0;
1940 sprintf (buffer,
" %8d %8d %15.6e %15.6e %15.6e %15.6f %8d %15.6f\n",
1941 type, pixels, par0, par1, par2, cTalk, auxi1, auxi2);
1950 if (!fObject)
return false;
1952 while (fInput.getline(buffer, 1024)) {
1953 if (buffer [0] ==
'#')
continue;
1955 if (items.empty())
continue;
1956 if (items.size () < 8) {
1957 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
1963 atoi(items[4].c_str()),
1964 atoi(items[5].c_str()),
1965 atoi(items[6].c_str()),
1966 atoi(items[7].c_str()));
1976 sprintf (buffer,
"# %15s %15s %15s %15s %15s %15s %15s %15s\n",
1977 "eta",
"phi",
"dep",
"det",
"Mask",
"FGBitInfo",
"auxi1",
"auxi2");
1980 std::sort (channels.begin(), channels.end(), DetIdLess ());
1981 for (std::vector<DetId>::iterator channel = channels.begin ();
1982 channel != channels.end ();
1989 sprintf (buffer,
" %15d %15d %15d %15d \n", mask, fgBitInfo, auxi1, auxi2);
1999 unsigned int all(0), good(0);
2000 while (fInput.getline(buffer, 1024)) {
2002 if (buffer [0] ==
'#')
continue;
2004 if (items.size () != 6) {
2010 int version = atoi (items [0].c_str());
2011 int adcCut = atoi (items [1].c_str());
2012 uint64_t tdcMask = strtoull(items [2].c_str(),
nullptr,16);
2013 uint32_t tbits = atoi (items [3].c_str());
2014 int auxi1 = atoi (items [4].c_str());
2015 int auxi2 = atoi (items [5].c_str());
2016 fObject->
loadObject (version, adcCut, tdcMask, tbits, auxi1, auxi2);
2019 edm::LogInfo(
"MapFormat") <<
"HcalTPParameters:: processed " << good <<
" records in " <<
all <<
" record" << std::endl;
2026 sprintf (buffer,
"# %15s %15s %16s %15s %15s %15s\n",
"FGAlgo_HBHE",
2027 "ADCThrHF",
"TDCMaskHF",
"STBitsHF",
"auxi1",
"auxi2");
2034 const int auxi1 = fObject.
getAuxi1();
2035 const int auxi2 = fObject.
getAuxi2();
2037 sprintf (buffer,
" %15d %15d %16jx %15x %15d %15d\n", version, adcCut, tdcMask, tbits, auxi1, auxi2);
2047 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %11s %11s %11s %11s %9s %9s %9s %9s %10s\n",
2048 "eta",
"phi",
"dep",
"det",
2049 "pedcap0",
"pedcap1",
"pedcap2",
"pedcap3",
2050 "effpedcap0",
"effpedcap1",
"effpedcap2",
"effpedcap3",
2051 "gaincap0",
"gaincap1",
"gaincap2",
"gaincap3",
"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,
" %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",
2070 sprintf (buffer,
"# %15s %15s %15s %15s %9s %9s %9s %9s %12s %12s %12s %12s %10s %10s %10s %10s %10s\n",
2071 "eta",
"phi",
"dep",
"det",
2072 "pedwcap0",
"pedwcap1",
"pedwcap2",
"pedwcap3",
2073 "effpedwcap0",
"effpedwcap1",
"effpedwcap2",
"effpedwcap3",
2074 "gainwcap0",
"gainwcap1",
"gainwcap2",
"gainwcap3",
"DetId");
2078 std::sort (channels.begin(), channels.end(), DetIdLess ());
2079 for (std::vector<DetId>::iterator channel = channels.begin (); channel != channels.end (); ++channel) {
2080 dumpId (fOutput, *channel);
2082 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",
2085 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)
float getPedestal() const
unsigned int firstSample() const
static const HcalDetId Undefined
void setAlgoString(std::string fAlgo)
static unsigned int getId()
bool mapEId2chId(HcalElectronicsId fElectronicsId, DetId fId)
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
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
double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
unsigned int param2() const
std::vector< DetId > getAllChannels() const
bool getHcalSingleIntObject(std::istream &fInput, T *fObject, S *fCondObject)
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
bool loadObject(DetId fId, int rm, std::string rbx)
load a new entry
bool getHcalSingleFloatObject(std::istream &fInput, T *fObject, S *fCondObject)
static int slb(const HcalTriggerPrimitiveSample &theSample)
unsigned int pileupCleaningID() const
const HcalQIECoder * getCoder(DetId fId) const
get QIE parameters
bool timeSmearing() const
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
bool correctForPhaseContainment() const
int getType() const
get SiPM type
int htrSlot() const
get the htr slot
double effpedestal(int fCapId) const
get effective pedestal width for capid=0..3
std::vector< unsigned int > splitStringToIntByComma(const std::string &fLine)
double pedestal(int fCapId) const
get pedestal for capid=0..3
const Item * getValues(DetId fId, bool throwOnFail=true) const
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
bool dumpHcalSingleFloatObject(std::ostream &fOutput, const T &fObject)
unsigned int noiseFlaggingID() const
void dumpId(std::ostream &fOutput, DetId id)
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
unsigned int leakCorrectionID() const
bool addCoder(const HcalQIECoder &fCoder)
int crateId() const
get the readout VME crate number
int readoutVMECrateId() const
get the readout VME crate number
void dumpId(std::ostream &fOutput, DetId id)
float getCrossTalk(int type) const
get cross talk
unsigned int param1() const
unsigned int specialCaseID() const
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
const_iterator endById(void) const
double effpedestal(int fCapId) const
get effective pedestal for capid=0..3
bool isHcalZDCDetId() const
const std::string & getField3() const
bool isHcalTrigTowerDetId() const
std::unique_ptr< HcalSiPMCharacteristics > createObject< HcalSiPMCharacteristics >(std::istream &fInput)
std::vector< HcalDcsValue > DcsSet
void setUnitADC(bool isADC)
float getRespGain() const
double pedestal(int fCapId) const
get pedestal width for capid=0..3
int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
float offset(unsigned fCapId, unsigned fRange) const
const_iterator beginById(void) const
std::vector< DetId > getAllChannels() const
unsigned int param1() const
unsigned int nhits() const
std::vector< DetId > allDetIds() const
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
bool correctForTimeslew() const
bool correctTiming() const
int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
HcalDcsDetId getHcalDcsDetId(void)
bool dumpHcalMatrixObject(std::ostream &fOutput, const T &fObject)
uint32_t HFdigiflagExpectedPeak() const
unsigned int getTypes() const
get # of types
bool mapGeomId2DcsId(HcalDetId fId, HcalDcsDetId fDcsId)
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
float getDarkCurrent() const
get dark current
std::string getTagString() const
unsigned int samplesToAdd() const
void setMinCharges(const float fValue[32])
uint32_t getHFTriggerInfo() const
get Self Trigger bits
bool mapEId2tId(HcalElectronicsId fElectronicsId, HcalTrigTowerDetId fTriggerId)
float correctionPhaseNS() const
int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
unsigned int pulseShapeID() const
static DcsType DcsTypeFromString(const std::string &str)
bin
set the eta bin as selection string.
const HcalCalibrationWidths & getCalibrationWidths(const DetId id) const
int slbChannelIndex() const
get the SLB channel index (valid only for VME trigger-chain ids)
std::vector< double > HFdigiflagCoefficients() const
void setHTR(int crate, int slot, int tb)
const std::string & getField2() const
int getAuxi1(int type) const
get auxiliary words
std::string getAlgoString() const
std::vector< HcalElectronicsId > allElectronicsId() const
unsigned long long uint64_t
int getType(unsigned int k) 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
int slot() const
get the htr or uHTR slot
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 &)
bool isTriggerChainId() const
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)
bool getHcalObject(std::istream &fInput, T *fObject, S *fCondObject)
bool getObject(std::istream &fInput, HcalPedestals *fObject)
DetId getId(const std::vector< std::string > &items)
unsigned int binOfMaximum() const
bool dumpObject(std::ostream &fOutput, const HcalPedestals &fObject)
int slbSiteNumber() const
get the SLB site number (valid only for VME trigger-chain ids)
uint32_t getFGBitInfo() const
get FG bit information
unsigned int packingScheme() const
const float * getValues() const
get value for all capId = 0..3
bool dumpHcalObject(std::ostream &fOutput, const T &fObject)
std::vector< unsigned int > noiseTS() 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
unsigned int firstAuxTS() const
const float * minCharges() const
void setTagString(std::string fTag)
std::unique_ptr< HcalDcsMap > createObject< HcalDcsMap >(std::istream &fInput)
uint32_t getValue() const
bool correctForLeadingEdge() const
bool addCoder(const HcalCalibrationQIECoder &fCoder)
bool addValues(const Item &myItem)
int getPixels(int type) const
get # of pixels
std::unique_ptr< HcalElectronicsMap > createObject< HcalElectronicsMap >(std::istream &fInput)
Readout chain identification for Hcal.
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
bool dumpHcalSingleIntObject(std::ostream &fOutput, const T &fObject)
unsigned int timeslewCorrectionID() const
uint32_t getMask() const
get mask for channel validity and self trigger information
std::vector< double > splitStringToDoubleByComma(const std::string &fLine)
double HFdigiflagMinEThreshold() const
bool useLeakCorrection() const