Copyright header update, 2015 edition
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ctf.core / src / org / eclipse / tracecompass / tmf / ctf / core / event / aspect / CtfCpuAspect.java
1 /*******************************************************************************
2 * Copyright (c) 2014, 2015 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.tmf.ctf.core.event.aspect;
14
15 import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
16 import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
17 import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEvent;
18
19 /**
20 * "CPU" event aspect for CTF traces.
21 *
22 * @author Alexandre Montplaisir
23 */
24 public class CtfCpuAspect extends TmfCpuAspect {
25
26 @Override
27 public Integer resolve(ITmfEvent event) {
28 if (!(event instanceof CtfTmfEvent)) {
29 return null;
30 }
31 int cpu = ((CtfTmfEvent) event).getCPU();
32 return cpu;
33 }
34 }
This page took 0.032015 seconds and 5 git commands to generate.