private void process(User user, DashBoard dash, int deviceId, short pin, PinType pinType,
String value, long ts, double doubleVal) {
if (enableRawDbDataStore) {
rawDataProcessor.collect(
new BaseReportingKey(user.email, user.appName, dash.id, deviceId, pinType, pin),
ts, value, doubleVal);
}
if (doubleVal == NumberUtil.NO_RESULT) {
return;
}
Widget widgetWithLogPins = user.profile.getWidgetWithLoggedPin(dash, deviceId, pin, pinType);
if (widgetWithLogPins != null) {
BaseReportingKey key = new BaseReportingKey(user.email, user.appName, dash.id, deviceId, pinType, pin);
averageAggregator.collect(key, ts, doubleVal);
if (widgetWithLogPins instanceof Superchart) {
if (((Superchart) widgetWithLogPins).hasLivePeriodsSelected()) {
rawDataCacheForGraphProcessor.collect(key, new GraphValue(doubleVal, ts));
}
}
}
}