Пример #1
0
void EventQA::analyzeEvent() {
	
	book->fill( "tofMult", rIndex, ds->get( "Event.mbTofTrayMultiplicity" ) );
	book->fill( "nTofMatch", rIndex, ds->getInt( "Event.mNBTOFMatch") );
	book->fill( "refMult", rIndex, ds->getInt( "refMult") );
	book->fill( "vtxZ", rIndex, ds->get( "vZ") );
	book->fill( "vtxX", rIndex, ds->get( "vX") );
	book->fill( "vtxY", rIndex, ds->get( "vY") );
	book->fill( "vtxR", rIndex, ds->get( "vR") );

	book->fill( "bbc", rIndex, ds->getUInt( "Event.mBBCx") );
	book->fill( "zdc", rIndex, ds->getUInt( "Event.mZDCx") );
	book->fill( "nGlobal", rIndex, ds->getInt( "Event.mNumberOfGlobalTracks" ) );
	//book->fill( "nPrimary", ri,  );
	book->fill( "refMultZ", ds->get("vZ"), ds->get("refMult") );
	book->fill( "refMultBBC", ds->get("Event.mBBCx"), ds->get("refMult") );
	book->fill( "refMultZDC", ds->get("Event.mZDCx"), ds->get("refMult" ) );
	book->fill( "refMultTOF", ds->get( "Event.mbTofTrayMultiplicity" ) , ds->get("refMult") );

	book->fill( "nEvents", rIndex );
	book->fill( "vtxXY", ds->get("vX"), ds->get("vY") );
	
	/*int refMult = pico->eventRefMult();
	if ( correctZ ){
		refMult = rmc->refMult( refMult, vZ );
	}*/

	int pi = periodIndex( rIndex );
	if ( pi >= 0 ){
		book->fill( "P_"+ts( pi )+"_refMultZ", ds->get("vZ"), ds->get("refMult") );
	}
	


	/**
	 * Analyze the tracks
	 */
	Int_t nTracks = ds->getInt( "Event.mNumberOfGlobalTracks" );

	for ( Int_t iTrack = 0; iTrack < nTracks; iTrack ++ ){

		if ( !keepTrack( iTrack ) )
			continue;
		
		analyzeTrack( iTrack );	

	}
	
}
Пример #2
0
void UrQMDDcaMapMaker::analyzeEvent(){


	// Getting the Centrality bin
	int refMult = ds->get<int>( "mNUncorrectedPrimaries" );
	int bin16 = rmb->findBin( refMult, BinEdge::upper );
	
	int bin9 = (int)bin16 / 2;
	
	if ( bin16 == 15 )
		bin9 = 8;
	else if ( bin16 < 0 )
		bin9 = -1;

	if ( bin9 >= 0 && bin9 <= 8 )
		cBin = centralityBinMap[ bin9 ];
	else
		cBin = -1;

	if ( cBin < 0 || bin16 < 0 )
		return;
	
	// book->fill( "refMultBins", refMult, bin9 );
	// book->fill( "refMultMappedBins", refMult, cBin );
	

	int nTracks = ds->get<int>( "mNMatchedPair" );

	for ( Int_t iTrack = 0; iTrack < nTracks; iTrack ++ ){

		if ( !keepTrack( iTrack ) )
			continue;
		
		analyzeTrack( iTrack );			
	}

}
void squeezeboxHelper::analyzeStatus(QString text,QList<allAlbum> *p,SqueezeStatus *status)
{
    QString status_field;
    int textPos,len;

    textPos=text.indexOf("player_name%3A")+14;
    status_field=text.mid(textPos,text.indexOf(" ",textPos)-textPos);
    qDebug()<<"Player name"<<status_field;

    textPos=text.indexOf("player_connected")+19;
    len=text.indexOf(" ",textPos);
    status->playerConnected=text.mid(textPos,len-textPos);
    qDebug()<<"Player Connected"<<status->playerConnected;

    textPos=text.indexOf("player_ip%3A")+12;
    len=text.indexOf("%3A",textPos);
    status->playerIp=text.mid(textPos,len-textPos);
    qDebug()<<"Player IP"<<status->playerIp;

    textPos=text.indexOf("mode%3A")+7;
    len=text.indexOf(" ",textPos);
    status->playerMode=text.mid(textPos,len-textPos);
    qDebug()<<"Player mode"<<status->playerMode;


    textPos=text.indexOf("mixer%20volume%3A")+17;
    len=text.indexOf(" ",textPos);
    status->current_volumen=(text.mid(textPos,len-textPos).toInt());
    qDebug()<<"Player Volumen"<<status->current_volumen;

    textPos=text.indexOf("artist%3A")+9;
    len=text.indexOf(" ",textPos);
    status->artist=removeBadChar(text.mid(textPos,len-textPos));
    status->currentArtist=status->artist;
    qDebug()<<"Artist "<<status->artist;

    textPos=text.indexOf("album%3A")+8;
    len=text.indexOf(" ",textPos);
    status->album=removeBadChar(text.mid(textPos,len-textPos));
    status->currentAlbum=status->album;
    qDebug()<<"Album "<<status->album;

    textPos=text.indexOf("playlist_tracks%3A")+18;
    len=text.indexOf(" ",textPos);
    status->playListTrack=text.mid(textPos,len-textPos);
    qDebug()<<"Player Tracks"<<status->playListTrack;

    textPos=text.indexOf("playlist_cur_index%3A")+21;
    len=text.indexOf(" ",textPos);
    status->playlistCurrentIndex=text.mid(textPos,len-textPos).toInt()+1;
    qDebug()<<"Current Index "<<status->playlistCurrentIndex;

    textPos=text.indexOf("power%3A")+8;
    len=text.indexOf(" ",textPos);
    status->current_power_state=text.mid(textPos,len-textPos).toInt();
    qDebug()<<"Current Power State "<<status->current_power_state;



    textPos=text.indexOf("showBriefly%3A")+14;
    if (textPos>13)
    {
        len=text.indexOf(" ",textPos);
        status->playerShowB=text.mid(textPos,len-textPos);
        status->showBr=removeBadChar(status->playerShowB);

        //qDebug()<<statusbar;
        //qDebug()<<"Playeing now"<<removeBadChar(playerShowB);
    }

    if (text.count("id%")>0)
        analyzeTrack(text,p);

}