function histoScorerParser(data,dataName){
		
		var lines = data.split('\n');
		var indexString = 'index:';
		
		var dataScorer = {
			"name": dataName,
			x: [],
			y: [],
			text: [],
			sumW2: [],
			error_y: {
				type: 'data',
				array: [],
				visible: true,
				width: 0
			},
			mode: 'markers',
			type: 'scatter',
			marker: { size: 2 },
			units: ''
		}
		
		var finalLine = 'SUM_ALL:';
		for(var i=0; i<lines.length;i++){
			var line = lines[i].split(' ');
			var data = {};
			
			if(line[2] === indexString){
				var x = Number(line[3]);
				if(isNaN(x)) x = line[3];
				var	y = Number(line[6]).toExponential(5);
				dataScorer.x.push(x);
				dataScorer.y.push(y);
				var error = (Number(line[8])*Number(line[6])).toExponential(5);
				dataScorer.error_y.array.push(error);
				dataScorer.sumW2.push(Number(line[11]).toExponential(5))
			}
			
			
			if(lines[i].includes(finalLine)){
				for(var ii=0;ii<line.length;ii++){
					if(line[ii].includes('CLHEP')){
						var unitsLine = line[ii].split('::');
						dataScorer.units = unitsLine[1];
						break;
					}
				}
				
			}
		}
		
		return dataScorer;

	}
//parsea el archivo de salida de un scorer a un histoJSON
parsea el archivo de salida de un scorer a un histoJSON
parsea el archivo de salida de un scorer a un histoJSON
function histoScorerParser(data,dataName){
		var lines = data.split('\n');
		var indexString = 'index:';
		var dataScorer = {
			"name": dataName,
			x: [],
			y: [],
			text: [],
			sumW2: [],
			error_y: {
				type: 'data',
				array: [],
				visible: true,
				width: 0
			},
			mode: 'markers',
			type: 'scatter',
			marker: { size: 2 },
			units: ''
		}
		var finalLine = 'SUM_ALL:';
		for(var i=0; i<lines.length;i++){
			var line = lines[i].split(' ');
			var data = {};
			if(line[2] === indexString){
				var x = Number(line[3]);
				if(isNaN(x)) x = line[3];
				var	y = Number(line[6]).toExponential(5);
				dataScorer.x.push(x);
				dataScorer.y.push(y);
				var error = (Number(line[8])*Number(line[6])).toExponential(5);
				dataScorer.error_y.array.push(error);
				dataScorer.sumW2.push(Number(line[11]).toExponential(5))
			}
			if(lines[i].includes(finalLine)){
				for(var ii=0;ii<line.length;ii++){
					if(line[ii].includes('CLHEP')){
						var unitsLine = line[ii].split('::');
						dataScorer.units = unitsLine[1];
						break;
					}
				}
			}
		}
		return dataScorer;
	}
function histoScorerParser ( data , dataName ) { var lines = data . split ( '\n' ) ; var indexString = 'index:' ; var dataScorer = { "name" : dataName , x : [ ] , y : [ ] , text : [ ] , sumW2 : [ ] , error_y : { type : 'data' , array : [ ] , visible : true , width : 0 } , mode : 'markers' , type : 'scatter' , marker : { size : 2 } , units : '' } var finalLine = 'SUM_ALL:' ; for ( var i = 0 ; i < lines . length ; i ++ ) { var line = lines [ i ] . split ( ' ' ) ; var data = { } ; if ( line [ 2 ] === indexString ) { var x = Number ( line [ 3 ] ) ; if ( isNaN ( x ) ) x = line [ 3 ] ; var y = Number ( line [ 6 ] ) . toExponential ( 5 ) ; dataScorer . x . push ( x ) ; dataScorer . y . push ( y ) ; var error = ( Number ( line [ 8 ] ) * Number ( line [ 6 ] ) ) . toExponential ( 5 ) ; dataScorer . error_y . array . push ( error ) ; dataScorer . sumW2 . push ( Number ( line [ 11 ] ) . toExponential ( 5 ) ) } if ( lines [ i ] . includes ( finalLine ) ) { for ( var ii = 0 ; ii < line . length ; ii ++ ) { if ( line [ ii ] . includes ( 'CLHEP' ) ) { var unitsLine = line [ ii ] . split ( '::' ) ; dataScorer . units = unitsLine [ 1 ] ; break ; } } } } return dataScorer ; }
parsea el archivo de salida de un scorer a un histoJSON
parsea el archivo de salida de un scorer a un histoJSON