@@ -98,7 +98,7 @@ class RunAdapter {
9898 *
9999 * @param {Detector[] } detectors the list of detector models
100100 * @param {object } entityObject the entity object that is to be modified
101- * @param {boolean } [addDetectorQuality = true] if detectorQuality should be included
101+ * @param {boolean } [addDetectorQuality = true] if detectorQuality should be included
102102 * @returns {void }
103103 */
104104 _addDetectorsToObject ( detectors , entityObject , addDetectorQuality = true ) {
@@ -113,11 +113,10 @@ class RunAdapter {
113113
114114 if ( addDetectorQuality ) {
115115 entityObject . detectorsQualities = detectors . map ( ( detector ) => {
116- return ! detector . RunDetectors
117- ? null
118- : { id : detector . id , name : detector . name , quality : detector . RunDetectors . quality } ;
119- } )
120- . filter ( ( item ) => Boolean ( item ) ) ;
116+ const { id, name, RunDetectors : { quality } } = detector ;
117+
118+ return detector . RunDetectors ? { id, name, quality } : null ;
119+ } ) . filter ( ( item ) => Boolean ( item ) ) ;
121120 } else {
122121 entityObject . detectorsQualities = [ ] ;
123122 }
@@ -128,11 +127,11 @@ class RunAdapter {
128127 *
129128 * @param {Detector[] } detectors the list of detector models
130129 * @param {object } entityObject the entity object that is to be modified
131- * @param {boolean } [addDetectorQuality = true] if detectorQuality should be included
130+ * @param {boolean } [addDetectorQuality = true] if detectorQuality should be included
132131 * @returns {void }
133132 */
134133 _computeQcFlags ( qcFlags = [ ] , entityObject , isSummary = false ) {
135- const adaptedQcFlags = isSummary
134+ const adaptedQcFlags = isSummary
136135 ? qcFlags . map ( this . qcFlagAdapter . toSummary )
137136 : qcFlags . map ( this . qcFlagAdapter . toEntity ) ;
138137
@@ -370,7 +369,7 @@ class RunAdapter {
370369 qcFlags = [ ] ,
371370 } = databaseObject ;
372371
373- /**
372+ /**
374373 * @type {Run }
375374 */
376375 const entityObject = {
@@ -405,7 +404,6 @@ class RunAdapter {
405404 triggerValue : databaseObject . triggerValue ,
406405 tags : databaseObject . tags ,
407406 pdpBeamType : databaseObject . pdpBeamType ,
408- runType : databaseObject . runType ,
409407 lhcPeriod : databaseObject . lhcPeriod ,
410408 aliceL3Polarity,
411409 aliceL3Current,
0 commit comments