- Fix style issue
- Rename ScopedRegionClipping to ScopedClipRegion

TBR=pkasting
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2083009

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@47393 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- gfx/native_theme_win.cc
+++ gfx/native_theme_win.cc
@@ -479,23 +479,23 @@
 }

 // A ScopedRegion wrapper to set/restore clipping region during the scope.
-class ScopedRegionClipping {
+class ScopedClipRegion {
  public:
-  explicit ScopedRegionClipping(const HDC hdc)
+  explicit ScopedClipRegion(const HDC hdc)
       : hdc_(hdc), clip_(NULL) {
     RECT zero_rect = { 0 };
     clip_ = CreateRectRgnIndirect(&zero_rect);
     GetClipRgn(hdc_, clip_);
   }

-  ~ScopedRegionClipping() {
+  ~ScopedClipRegion() {
     SelectClipRgn(hdc_, clip_);
   }

  private:
   HDC hdc_;
   ScopedRegion clip_;
-  DISALLOW_COPY_AND_ASSIGN(ScopedRegionClipping);
+  DISALLOW_COPY_AND_ASSIGN(ScopedClipRegion);
 };

 HRESULT NativeTheme::PaintProgressBar(HDC hdc,
@@ -503,14 +503,15 @@
                                       int value_part_id,
                                       RECT* value_rect,
                                       skia::PlatformCanvas* canvas) const {
-  // For an indeterminate progress bar, we draw a moving highlight that's animated
-  // (by the caller) across the width of the bar.  The highlight part is always
-  // drawn as being as wide as the bar, to scale it properly.  Therefore, we need
-  // to clip it against the bar rect, so that as it moves, it doesn't extend past
-  // the ends of the bar.  For a normal progress bar, we won't try to draw past
-  // the bar ends, so this clipping is useless, but harmless.
-  ScopedRegionClipping clip(hdc);
-  IntersectClipRect(hdc, bar_rect->left, bar_rect->top,
+  // For an indeterminate progress bar, we draw a moving highlight that's
+  // animated (by the caller) across the width of the bar.  The highlight part
+  // is always drawn as being as wide as the bar, to scale it properly.
+  // Therefore, we need to clip it against the bar rect, so that as it moves,
+  // it doesn't extend past the ends of the bar.  For a normal progress bar,
+  // we won't try to draw past the bar ends, so this clipping is useless,
+  // but harmless.
+  ScopedClipRegion clip(hdc);
+  IntersectClipRect(hdc, bar_rect->left, bar_rect->top,
                     bar_rect->right, bar_rect->bottom);

   HANDLE handle = GetThemeHandle(PROGRESS);


Update main.cpp

Update main.cpp

--- 2.-Prime-Generator/main.cpp
+++ 2.-Prime-Generator/main.cpp
@@ -1,6 +1,8 @@
 #include<iostream>
 #include<math.h>
 #include<stdlib.h>
+
+using namespace std;

 int prime[10000],primes;


No required flags option for built-in mzn-mzn and mzn-fzn backends

--- MiniZincIDE/solverdialog.cpp
+++ MiniZincIDE/solverdialog.cpp
@@ -130,7 +130,7 @@
         ui->has_stdflag_s->setChecked(solvers[index].stdFlags.contains("-s"));
         ui->has_stdflag_f->setChecked(solvers[index].stdFlags.contains("-f"));

-        if (solvers[index].requiredFlags.size()==0) {
+        if (solvers[index].id=="org.minizinc.mzn-fzn" || solvers[index].id=="org.minizinc.mzn-mzn" || solvers[index].requiredFlags.size()==0) {
             ui->requiredFlags->hide();
         } else {
             ui->requiredFlags->show();


preparing new overlap codes (n, f)

preparing new overlap codes (n, f)

--- gffcompare.cpp
+++ gffcompare.cpp
@@ -1757,7 +1757,7 @@
 			return 'o'; //just plain overlapping
 		}
 		//single-exon qry overlaping multi-exon ref
-		//special case: single-exon transfrags fully covering an intron (code 'f')
+		//special case: single-exon transfrag fully covering an intron (code 'f')
 		for (int j=0;j<=jmax;j++) {
 			//check if it's ~contained by an exon
 			int exovlen=mseg.overlapLen(r.exons[j]);


failure_detector: Print versions for gossip states in gossipinfo

Backport: CASSANDRA-10330

ae4cd69 Print versions for gossip states in gossipinfo

For instance, the version for each state, which can be useful for
diagnosing the reason for any missing states. Also instead of just
omitting the TOKENS state, let's indicate whether the state was actually
present or not.

--- gms/failure_detector.cc
+++ gms/failure_detector.cc
@@ -188,13 +188,19 @@
 void failure_detector::append_endpoint_state(std::stringstream& ss, endpoint_state& state) {
     ss << "  generation:" << state.get_heart_beat_state().get_generation() << "\n";
     ss << "  heartbeat:" << state.get_heart_beat_state().get_heart_beat_version() << "\n";
-    for (auto& entry : state.get_application_state_map()) {
+    for (const auto& entry : state.get_application_state_map()) {
         auto& app_state = entry.first;
-        auto& value = entry.second;
+        auto& versioned_val = entry.second;
         if (app_state == application_state::TOKENS) {
             continue;
         }
-        ss << "  " << app_state << ":" << value.value << "\n";
+        ss << "  " << app_state << ":" << versioned_val.version << ":" << versioned_val.value << "\n";
+    }
+    const auto& app_state_map = state.get_application_state_map();
+    if (app_state_map.count(application_state::TOKENS)) {
+        ss << "  TOKENS:" << app_state_map.at(application_state::TOKENS).version << ":<hidden>\n";
+    } else {
+        ss << "  TOKENS: not present" << "\n";
     }
 }


INTEGRATION: CWS changefileheader (1.2.44); FILE MERGED 2008/04/01 14:59:01 thb 1.2.44.3: #i85898# Stripping all external header guards 2008/04/01 10:46:05 thb 1.2.44.2: #i85898# Stripping all external header guards 2008/03/28 15:57:56 rt 1.2.44.1: #i87441# Change license header to LPGL v3.

--- accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -1,55 +1,39 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: vclxaccessibletabpagewindow.cxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.2 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: hr $ $Date: 2007-06-27 15:41:25 $
+ * $RCSfile: vclxaccessibletabpagewindow.cxx,v $
+ * $Revision: 1.3 $
  *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
  *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
  *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
  *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/

 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_accessibility.hxx"
-
-#ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX
 #include <accessibility/standard/vclxaccessibletabpagewindow.hxx>
-#endif
-
-#ifndef _TOOLKIT_HELPER_CONVERT_HXX_
 #include <toolkit/helper/convert.hxx>
-#endif
-
-#ifndef _SV_TABCTRL_HXX
 #include <vcl/tabctrl.hxx>
-#endif
-#ifndef _SV_TABPAGE_HXX
 #include <vcl/tabpage.hxx>
-#endif

 using namespace ::com::sun::star;


Fully disable lcdtextprops

Fully disable lcdtextprops

R=reed@google.com
TBR=jcgregorio@google.com, reed@google.com

Review URL: https://codereview.chromium.org/723253002

--- gm/lcdtext.cpp
+++ gm/lcdtext.cpp
@@ -171,4 +171,5 @@

 DEF_GM( return new LcdTextGM; )
 DEF_GM( return new LcdTextSizeGM; )
-DEF_GM( return new LcdTextProps; )
+// Temporarily disabled (dftext interference)
+// DEF_GM( return new LcdTextProps; )


update gm test size to include new elements

TBR=
BUG=skia:562

Review URL: https://codereview.chromium.org/1305983006

--- gm/shadows.cpp
+++ gm/shadows.cpp
@@ -50,7 +50,7 @@
     }

     SkISize onISize() override {
-        return SkISize::Make(200, 120);
+        return SkISize::Make(200, 200);
     }

     void onDraw(SkCanvas* canvas) override {


tiny fix for opinions

tiny fix for opinions

--- source/core/mining-manager/summarization-submanager/OpinionsManager.cpp
+++ source/core/mining-manager/summarization-submanager/OpinionsManager.cpp
@@ -524,7 +524,7 @@
         }
     }
     total_diff_size += words_hash_diff.size();
-    return double(same)/min(total_diff_size, min(sizei, sizej));//Jaccard similarity
+    return double(same)/total_diff_size;//Jaccard similarity
 }

 double OpinionsManager::Sim(const NgramPhraseT& wordsi, const NgramPhraseT& wordsj)


added some basic code gen for array declarations

--- src/Compiler/code_gen/builders/array_declaration_expression_builder.cpp
+++ src/Compiler/code_gen/builders/array_declaration_expression_builder.cpp
@@ -7,7 +7,10 @@

 		void ArrayDeclarationExpressionBuilder::build(VMProgram* program, VMExpressionVisitor* visitor, ArrayDeclarationExpression* expression)
 		{
-
+			program->emit(OpCode::iconst);
+			program->emit(10);
+			program->emit(OpCode::new_arr);
+			program->emit(static_cast<int>(expression->get_type()->get_vm_type()));
 		}

 	}


Add parsing of ViewOffsetScale material property Buddy: Paul

--- src/InteriorsCustomMaterials/SdkModel/InteriorsCustomMaterialParser.cpp
+++ src/InteriorsCustomMaterials/SdkModel/InteriorsCustomMaterialParser.cpp
@@ -144,6 +144,7 @@
                     TryAddScalar(FresnelBias, materialJson, result.keyValueScalars);
                     TryAddScalar(FresnelScale, materialJson, result.keyValueScalars);
                     TryAddScalar(FresnelPower, materialJson, result.keyValueScalars);
+                    TryAddScalar(ViewOffsetScale, materialJson, result.keyValueScalars);

                     TryAddBoolean(IsTranslucent, materialJson, result.keyValueBooleans);
                     TryAddBoolean(IsStencilMirror, materialJson, result.keyValueBooleans);


commented out extended header parser in client

--- applications/mne_scan/plugins/ftbuffer/ftsrc/ftbuffclient.cpp
+++ applications/mne_scan/plugins/ftbuffer/ftsrc/ftbuffclient.cpp
@@ -145,82 +145,66 @@
     qDebug() << "Data Type:" << header_def.data_type;
     qDebug() << "***********************";

-    //saving header chunks and updating extended header flag
-    if (chunkBuffer.size() != 0) {
-//        m_ssChunkData.reset(&chunkBuffer);
+
+// FUNCTIONALITY TEMPORARILY REPLACED BY READING FROM LOCAL FIF FILE
+////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//    //saving header chunks and updating extended header flag based on ftbuff header format
+//    if (chunkBuffer.size() != 0) {

 //        qDebug() << "";
-        qDebug() << "";
-        qDebug() << "Chunk Buffer size:" << chunkBuffer.size();
-        qDebug() << "";
+//        qDebug() << "Chunk Buffer size:" << chunkBuffer.size();
 //        qDebug() << "";
+
+//        qDebug() << "Extended Buffer";

 //        const ft_chunk_t* chanNames = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_CHANNEL_NAMES);
 //        const ft_chunk_t* neuromagHead = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_NEUROMAG_HEADER);
+////        const ft_chunk_t* neuromagIso = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_NEUROMAG_ISOTRAK);
+////        const ft_chunk_t* neuromagHPI = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_NEUROMAG_HPIRESULT);

 //        if (chanNames != Q_NULLPTR) {
-//            qDebug() << "Channel name chunk found, size" << chanNames->def.size;
+//            qDebug() << "Found channel name chunk of size" << chanNames->def.size;
+//            m_bChunkData = true;
+
+//            //bData_CHANNEL_NAMES.open(QIODevice::ReadWrite);
+//            bData_CHANNEL_NAMES.setData(chanNames->data, chanNames->def.size);
+//            //bData_CHANNEL_NAMES.close();
+
+//            qDebug() << "Created channel name qbuffer of size" << bData_CHANNEL_NAMES.size();
 //        }
-
 //        if (neuromagHead != Q_NULLPTR) {
-//            qDebug () << "Neuromag header found, size" << neuromagHead->def.size;
+//            qDebug() << "Found neuromag cheader chunk of size" << neuromagHead->def.size;
+//            m_bChunkData = true;
+
+//            //bData_NEUROMAG_HEADER.open(QIODevice::ReadWrite);
+//            bData_NEUROMAG_HEADER.setData(neuromagHead->data, neuromagHead->def.size);
+//            //bData_NEUROMAG_HEADER.close();
+
+//            qDebug() << "Created neuromag header qbuffer of size" << bData_NEUROMAG_HEADER.size();
 //        }
-
-
-
-//        qDebug() << "";
-//        qDebug() << "Set m_bChunkData to true";
-//        qDebug() << "";
-
-        qDebug() << "Extended Buffer";
-
-        const ft_chunk_t* chanNames = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_CHANNEL_NAMES);
-        const ft_chunk_t* neuromagHead = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_NEUROMAG_HEADER);
-//        const ft_chunk_t* neuromagIso = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_NEUROMAG_ISOTRAK);
-//        const ft_chunk_t* neuromagHPI = find_chunk(chunkBuffer.data(), 0, chunkBuffer.size(), FT_CHUNK_NEUROMAG_HPIRESULT);
-
-        if (chanNames != Q_NULLPTR) {
-            qDebug() << "Found channel name chunk of size" << chanNames->def.size;
-            m_bChunkData = true;
-
-            //bData_CHANNEL_NAMES.open(QIODevice::ReadWrite);
-            bData_CHANNEL_NAMES.setData(chanNames->data, chanNames->def.size);
-            //bData_CHANNEL_NAMES.close();
-
-            qDebug() << "Created channel name qbuffer of size" << bData_CHANNEL_NAMES.size();
-        }
-        if (neuromagHead != Q_NULLPTR) {
-            qDebug() << "Found neuromag cheader chunk of size" << neuromagHead->def.size;
-            m_bChunkData = true;
-
-            //bData_NEUROMAG_HEADER.open(QIODevice::ReadWrite);
-            bData_NEUROMAG_HEADER.setData(neuromagHead->data, neuromagHead->def.size);
-            //bData_NEUROMAG_HEADER.close();
-
-            qDebug() << "Created neuromag header qbuffer of size" << bData_NEUROMAG_HEADER.size();
-        }
-//        if (neuromagIso != Q_NULLPTR) {
-//            qDebug() << "Found neuromag isotrak chunk";
-//            m_bChunkData = true;
-
-//            bData_NEUROMAG_ISOTRAK.open(QIODevice::ReadWrite);
-//            bData_NEUROMAG_ISOTRAK.write(neuromagIso->data, neuromagIso->def.size);
-//            bData_NEUROMAG_ISOTRAK.close();
-
-//            qDebug() << "Created neuromag isotrak qbuffer";
-//        }
-//        if (neuromagHPI != Q_NULLPTR) {
-//            qDebug() << "Found neuromag hpi chunk";
-//            m_bChunkData = true;
-
-//            bData_NEUROMAG_HPIRESULT.open(QIODevice::ReadWrite);
-//            bData_NEUROMAG_HPIRESULT.write(neuromagHPI->data, neuromagHPI->def.size);
-//            bData_NEUROMAG_HPIRESULT.close();
-
-//            qDebug() << "Created neuromag hpi qbuffer";
-//        }
-
-    }
+////        if (neuromagIso != Q_NULLPTR) {
+////            qDebug() << "Found neuromag isotrak chunk";
+////            m_bChunkData = true;
+
+////            bData_NEUROMAG_ISOTRAK.open(QIODevice::ReadWrite);
+////            bData_NEUROMAG_ISOTRAK.write(neuromagIso->data, neuromagIso->def.size);
+////            bData_NEUROMAG_ISOTRAK.close();
+
+////            qDebug() << "Created neuromag isotrak qbuffer";
+////        }
+////        if (neuromagHPI != Q_NULLPTR) {
+////            qDebug() << "Found neuromag hpi chunk";
+////            m_bChunkData = true;
+
+////            bData_NEUROMAG_HPIRESULT.open(QIODevice::ReadWrite);
+////            bData_NEUROMAG_HPIRESULT.write(neuromagHPI->data, neuromagHPI->def.size);
+////            bData_NEUROMAG_HPIRESULT.close();
+
+////            qDebug() << "Created neuromag hpi qbuffer";
+////        }
+
+//    }
+////////////////////////////////////////////////////////////////////////////////////////////////////////////

     return true;
 }


minor

minor

--- graph/ReachDetector.cpp
+++ graph/ReachDetector.cpp
@@ -867,8 +867,6 @@
 				}

 		void ReachDetector::buildReason(Lit p, vec<Lit> & reason, CRef marker){
-
-
 				if(marker==reach_marker){
 					reason.push(p);
 				//	double startpathtime = rtime(2);


ERR:Style fixes

ERR:Style fixes

--- graphics/vtkOBBTree.cxx
+++ graphics/vtkOBBTree.cxx
@@ -302,7 +302,10 @@
   tot_mass = 0.0;
   a[0] = a0; a[1] = a1; a[2] = a2;
   for ( i=0; i<3; i++ )
+    {
     a0[i] = a1[i] = a2[i] = 0.0;
+    }
+
   for ( i=0; i < numCells; i++ )
     {
     cellId = cells->GetId( i );
@@ -312,7 +315,9 @@
       {
       vtkCELLTRIANGLES( ptIds, type, j, pId, qId, rId );
       if ( pId < 0 )
+        {
         continue;
+        }
       p = this->DataSet->GetPoint( pId );
       q = this->DataSet->GetPoint( qId );
       r = this->DataSet->GetPoint( rId );
@@ -329,7 +334,10 @@
       vtkMath::Cross( dp0, dp1, xp );
       tri_mass = 0.5*vtkMath::Norm( xp );
       tot_mass += tri_mass;
-      for ( k=0; k<3; k++ ) mean[k] += tri_mass*c[k];
+      for ( k=0; k<3; k++ )
+        {
+        mean[k] += tri_mass*c[k];
+        }

       // on-diagonal terms
       a0[0] += tri_mass*(9*c[0]*c[0] + p[0]*p[0] + q[0]*q[0] + r[0]*r[0])/12;
@@ -341,11 +349,10 @@
       a0[2] += tri_mass*(9*c[0]*c[2] + p[0]*p[2] + q[0]*q[2] + r[0]*r[2])/12;
       a1[2] += tri_mass*(9*c[1]*c[2] + p[1]*p[2] + q[1]*q[2] + r[1]*r[2])/12;
       } // end foreach triangle
-    //
+
     // While computing cell moments, gather all the cell's
     // point coordinates into a single list.
     //
-
     for ( j=0; j < numPts; j++ )
       {
       if ( this->InsertedPoints[ptIds[j]] != this->OBBCount )
@@ -370,8 +377,12 @@

   // get covariance from moments
   for ( i=0; i<3; i++ )
+    {
     for ( j=0; j<3; j++ )
+      {
       a[i][j] = a[i][j]/tot_mass - mean[i]*mean[j];
+      }
+    }

     //
     // Extract axes (i.e., eigenvectors) from covariance matrix.
@@ -402,8 +413,14 @@
       for (i=0; i < 3; i++)
         {
         vtkLine::DistanceToLine(p, mean, a[i], t, closest);
-        if ( t < tMin[i] ) tMin[i] = t;
-        if ( t > tMax[i] ) tMax[i] = t;
+        if ( t < tMin[i] )
+          {
+          tMin[i] = t;
+          }
+        if ( t > tMax[i] )
+          {
+          tMax[i] = t;
+          }
         }
       }//for all points

@@ -500,7 +517,9 @@
     }

   if ( cellIdBest < 0 )
+    {
     return 0;
+    }
   else
     {
     cellId = cellIdBest;
@@ -515,24 +534,38 @@
   int nCells, i;

   if ( this->Cells != NULL )
+    {
     nCells = this->Cells->GetNumberOfIds();
+    }
   else
+    {
     nCells = 0;
+    }
+
   vtkMath::Cross( this->Axes[0], this->Axes[1], xp );
   volume = fabs( vtkMath::Dot( xp, this->Axes[2] ) );
   for ( i=0; i<3; i++ )
+    {
     c[i] = this->Corner[i] + 0.5*this->Axes[0][i] + 0.5*this->Axes[1][i]
-                           + 0.5*this->Axes[2][i];
+      + 0.5*this->Axes[2][i];
+    }
+
   for ( i=0; i<level; i++ )
+    {
     cout<<"  ";
+    }
   cout <<level<<" # Cells: "<<nCells<<", Volume: "<<volume<<"\n";
   for ( i=0; i<level; i++ )
+    {
     cout<<"  ";
+    }
   cout << "    " << vtkMath::Norm( this->Axes[0] ) << " X " <<
                     vtkMath::Norm( this->Axes[1] ) << " X " <<
                     vtkMath::Norm( this->Axes[2] ) << "\n";
   for ( i=0; i<level; i++ )
+    {
     cout<<"  ";
+    }
   cout << "    Center: " << c[0] << " " << c[1] << " " << c[2] << "\n";
   if ( nCells != 0 )
     {
@@ -686,8 +719,14 @@
           c[0] += x[0];
           c[1] += x[1];
           c[2] += x[2];
-          if ( val < 0.0 ) negative = 1;
-          else positive = 1;
+          if ( val < 0.0 )
+            {
+            negative = 1;
+            }
+          else
+            {
+            positive = 1;
+            }
           }

         if ( negative && positive )
@@ -696,16 +735,25 @@
           c[1] /= numPts;
           c[2] /= numPts;
           if ( n[0]*(c[0]-p[0])+n[1]*(c[1]-p[1])+n[2]*(c[2]-p[2]) < 0.0 )
+            {
             LHlist->InsertNextId(cellId);
+            }
           else
+            {
             RHlist->InsertNextId(cellId);
+            }
           }
         else
+          {
           if ( negative )
+            {
             LHlist->InsertNextId(cellId);
+            }
           else
+            {
             RHlist->InsertNextId(cellId);
-
+            }
+          }
         }//for all cells

       //evaluate this split
@@ -952,19 +1000,29 @@
     // compute A range
     dotA = vtkMath::Dot( pA->Axes[ii], AtoB );
     if ( dotA > 0 )
+      {
       rangeAmax += dotA;
+      }
     else
+      {
       rangeAmin += dotA;
-
+      }
+
     // compute B range
     dotB = vtkMath::Dot( pB->Axes[ii], AtoB );
     if ( dotB > 0 )
+      {
       rangeBmax += dotB;
+      }
     else
+      {
       rangeBmin += dotB;
+      }
     }
   if ( (rangeAmax+eps < rangeBmin) || (rangeBmax+eps < rangeAmin) )
+    {
     return( 1 ); // A and B are Disjoint by the 1st test.
+    }

   // now check for a separation plane parallel to the faces of B
   for ( ii=0; ii<3; ii++ )
@@ -980,12 +1038,18 @@
       // (note: we are saving all 9 dotproducts for future use)
       dotA = dotAB[ii][jj] = vtkMath::Dot( pB->Axes[ii], pA->Axes[jj] );
       if ( dotA > 0 )
+        {
         rangeAmax += dotA;
+        }
       else
+        {
         rangeAmin += dotA;
+        }
       }
     if ( (rangeAmax+eps < rangeBmin) || (rangeBmax+eps < rangeAmin) )
+      {
       return( 2 ); // A and B are Disjoint by the 3rd test.
+      }
     }

   // now check for a separation plane parallel to the faces of A
@@ -1002,12 +1066,18 @@
       // (note: we are using the 9 dotproducts computed earlier)
       dotB = dotAB[jj][ii];
       if ( dotB > 0 )
+        {
         rangeBmax += dotB;
+        }
       else
+        {
         rangeBmin += dotB;
+        }
       }
     if ( (rangeAmax+eps < rangeBmin) || (rangeBmax+eps < rangeAmin) )
+      {
       return( 3 ); // A and B are Disjoint by the 2nd test.
+      }
     }

   // Bad luck: now we must look for a separation plane parallel
@@ -1024,19 +1094,29 @@
         // compute A range
         dotA = vtkMath::Dot( pA->Axes[kk], AtoB );
         if ( dotA > 0 )
+          {
           rangeAmax += dotA;
+          }
         else
+          {
           rangeAmin += dotA;
+          }

         // compute B range
         dotB = vtkMath::Dot( pB->Axes[kk], AtoB );
         if ( dotB > 0 )
+          {
           rangeBmax += dotB;
+          }
         else
+          {
           rangeBmin += dotB;
+          }
         }
       if ( (rangeAmax+eps < rangeBmin) || (rangeBmax+eps < rangeAmin) )
+        {
         return( 4 ); // A and B are Disjoint by the 4th test.
+        }
       }
   // if we fall through to here, the OBB's overlap
   return( 0 );
@@ -1093,13 +1173,19 @@
     {
     dotA = vtkMath::Dot( xprod, pA->Axes[jj] );
     if ( dotA > 0 )
+      {
       rangeAmax += dotA;
+      }
     else
+      {
       rangeAmin += dotA;
+      }
     }
   if ( (rangeAmax+eps < rangeBmin) || (rangeBmax+eps < rangeAmin) )
+    {
     return( 0 ); // A and B are Disjoint by the 1st test.
-
+    }
+
   // now check for a separation plane parallel to the faces of A
   for ( ii=0; ii<3; ii++ )
     { // plane is normal to pA->Axes[ii]
@@ -1111,22 +1197,34 @@
     rangeBmin = rangeBmax = vtkMath::Dot( pB[0], pA->Axes[ii] );
     dotB = vtkMath::Dot( pB[1], pA->Axes[ii] );
     if ( dotB > rangeBmax )
+      {
       rangeBmax = dotB;
+      }
     else
+      {
       rangeBmin = dotB;
-
+      }
+
     dotB = vtkMath::Dot( pB[2], pA->Axes[ii] );
     if ( dotB > rangeBmax )
+      {
       rangeBmax = dotB;
+      }
     else if ( dotB < rangeBmin )
+      {
       rangeBmin = dotB;
+      }
+
     if ( (rangeAmax+eps < rangeBmin) || (rangeBmax+eps < rangeAmin) )
+      {
       return( 0 ); // A and B are Disjoint by the 2nd test.
+      }
     }

   // Bad luck: now we must look for a separation plane parallel
   // to one edge from A and one edge from B.
   for ( ii=0; ii<3; ii++ )
+    {
     for ( jj=0; jj<3; jj++ )
       {
       // the plane is normal to pA->Axes[ii] X (pB[jj+1]-pB[jj])
@@ -1141,20 +1239,32 @@
         // compute A range
         dotA = vtkMath::Dot( pA->Axes[kk], AtoB );
         if ( dotA > 0 )
+          {
           rangeAmax += dotA;
+          }
         else
+          {
           rangeAmin += dotA;
+          }
         }
       // compute B range
       dotB = vtkMath::Dot( pB[(jj+2)%3], AtoB );
       if ( dotB > rangeBmax )
+        {
         rangeBmax = dotB;
+        }
       else
+        {
         rangeBmin = dotB;
+        }

       if ( (rangeAmax+eps < rangeBmin) || (rangeBmax+eps < rangeAmin) )
+        {
         return( 0 ); // A and B are Disjoint by the 3rd test.
-      }
+        }
+      }
+    }
+
   // if we fall through to here, the OBB overlaps the triangle.
   return( 1 );
   }
@@ -1177,11 +1287,18 @@
     rangeBmin = rangeBmax = vtkMath::Dot( B0, pA->Axes[ii] );
     dotB = vtkMath::Dot( B1, pA->Axes[ii] );
     if ( dotB < rangeBmin )
+      {
       rangeBmin = dotB;
+      }
     else
+      {
       rangeBmax = dotB;
+      }
+
     if ( (rangeAmax < rangeBmin) || (rangeBmax < rangeAmin) )
+      {
       return( 0 ); // A and B are Disjoint by the 1st test.
+      }
     }

   // now check for a separation plane normal to the line segment B
@@ -1199,12 +1316,18 @@
     {
     dotA = vtkMath::Dot( pA->Axes[ii], Bvec );
     if ( dotA > 0 )
+      {
       rangeAmax += dotA;
+      }
     else
+      {
       rangeAmin += dotA;
+      }
     }
   if ( (rangeAmax < rangeBmin) || (rangeBmax < rangeAmin) )
+    {
     return( 0 ); // A and B are Disjoint by the 2nd test.
+    }

   // Bad luck: now we must look for a separation plane parallel
   // to one edge from A and line B.
@@ -1219,21 +1342,31 @@
       // compute A range
       dotA = vtkMath::Dot( pA->Axes[jj], AtoB );
       if ( dotA > 0 )
+        {
         rangeAmax += dotA;
+        }
       else
+        {
         rangeAmin += dotA;
+        }
       }

     // compute B range
     dotB = vtkMath::Dot( Bvec, AtoB );
     if ( dotB > 0 )
+      {
       rangeBmax += dotB;
+      }
     else
+      {
       rangeBmin += dotB;
+      }
     }
     if ( (rangeAmax < rangeBmin) || (rangeBmax < rangeAmin) )
-        return( 0 ); // A and B are Disjoint by the 3rd test.
-
+      {
+      return( 0 ); // A and B are Disjoint by the 3rd test.
+      }
+
   return( 1 ); // if we fall through to here, the line must intersect the OBB
   }

@@ -1275,13 +1408,18 @@
     if ( !this->DisjointOBBNodes( nodeA, nodeB, XformBtoA ) )
       {
       if ( nodeA->Kids == NULL )
+        {
         if ( nodeB->Kids == NULL )
           { // then this is a pair of intersecting leaf nodes to process
           returnValue = (*function)( nodeA, nodeB, XformBtoA, data_arg );
           if ( returnValue >= 0 )
+            {
             count += returnValue;
+            }
           else
+            {
             count = returnValue;
+            }
           }
         else
           { // A is a leaf, but B goes deeper.
@@ -1291,7 +1429,9 @@
           OBBstackB[depth+1] = nodeB->Kids[1];
           depth += 2;
           }
+        }
       else
+        {
         if ( nodeB->Kids == NULL )
           { // B is a leaf, but A goes deeper.
           OBBstackB[depth] = nodeB;
@@ -1312,6 +1452,7 @@
           OBBstackB[depth+3] = nodeB->Kids[1];
           depth += 4;
           }
+        }
       }
     }
   // cleanup


Add protections in TGStatusBar::SetParts to avoid an object twice.

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@8681 27541ba8-7e3a-0410-8455-c3a389f83636

--- gui/src/TGStatusBar.cxx
+++ gui/src/TGStatusBar.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGStatusBar.cxx,v 1.7 2003/11/05 13:08:26 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TGStatusBar.cxx,v 1.8 2003/11/12 19:34:59 rdm Exp $
 // Author: Fons Rademakers   23/01/98

 /*************************************************************************
@@ -234,8 +234,10 @@
    }

    int i;
-   for (i = 0; i < fNpart; i++)
+   for (i = 0; i < fNpart; i++) {
+      fList->Remove(fStatusPart[i]);
       delete fStatusPart[i];
+   }

    delete [] fStatusPart;
    delete [] fParts;
@@ -275,8 +277,10 @@
    }

    int i;
-   for (i = 0; i < fNpart; i++)
+   for (i = 0; i < fNpart; i++) {
+      fList->Remove(fStatusPart[i]);
       delete fStatusPart[i];
+   }

    delete [] fStatusPart;
    delete [] fParts;


From Ilka:
fix in TGTextEntry::HandleCrossing() method to avoid two blinking cursors
in TGTextEntry widgets that block the keyboard input in text entries and
in number enties widgets.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@10663 27541ba8-7e3a-0410-8455-c3a389f83636

--- gui/src/TGTextEntry.cxx
+++ gui/src/TGTextEntry.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTextEntry.cxx,v 1.27 2004/09/24 15:55:55 brun Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTextEntry.cxx,v 1.28 2004/10/28 11:01:42 rdm Exp $
 // Author: Fons Rademakers   08/01/98

 /*************************************************************************
@@ -1308,6 +1308,7 @@
    // only turn off/on cursor if widget does not have the focus
    if (gVirtualX->GetInputFocus() != fId) {
       if (event->fType == kEnterNotify) {
+         SetFocus();
          fCursorOn = kTRUE;
          if (!fCurBlink) fCurBlink = new TBlinkTimer(this, 500);
          fCurBlink->Reset();


From Valeriy Onuchin:
- disable editting for ROOT canvas and its subframes

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@14630 27541ba8-7e3a-0410-8455-c3a389f83636

--- gui/src/TRootCanvas.cxx
+++ gui/src/TRootCanvas.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TRootCanvas.cxx,v 1.95 2006/03/20 12:31:02 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TRootCanvas.cxx,v 1.96 2006/03/23 15:49:16 antcheva Exp $
 // Author: Fons Rademakers   15/01/98

 /*************************************************************************
@@ -253,7 +253,7 @@

    AddInput(kKeyPressMask | kKeyReleaseMask | kPointerMotionMask |
             kExposureMask | kStructureNotifyMask | kLeaveWindowMask);
-   fEditDisabled = kTRUE;
+   fEditDisabled = kEditDisable;
 }

 //______________________________________________________________________________
@@ -289,7 +289,7 @@

 //______________________________________________________________________________
 TRootCanvas::TRootCanvas(TCanvas *c, const char *name, UInt_t width, UInt_t height)
-   : TGMainFrame(gClient->GetRoot(), width, height), TCanvasImp(c)
+   : TGMainFrame(gClient->GetDefaultRoot(), width, height), TCanvasImp(c)
 {
    // Create a basic ROOT canvas.

@@ -303,7 +303,7 @@

 //______________________________________________________________________________
 TRootCanvas::TRootCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
-   : TGMainFrame(gClient->GetRoot(), width, height), TCanvasImp(c)
+   : TGMainFrame(gClient->GetDefaultRoot(), width, height), TCanvasImp(c)
 {
    // Create a basic ROOT canvas.

@@ -324,6 +324,7 @@
    fButton    = 0;
    fAutoFit   = kTRUE;   // check also menu entry
    fEditor    = 0;
+   fEditDisabled = kEditDisable;

    // Create menus
    fFileSaveMenu = new TGPopupMenu(fClient->GetDefaultRoot());
@@ -1371,6 +1372,10 @@
    if (TVirtualPadEditor::GetPadEditor(kFALSE) != 0) {
          TVirtualPadEditor::HideEditor();
    }
+   if (fClient->IsEditable()) {
+      ((TGWindow*)fClient->GetRoot())->SetEditable(kFALSE);
+   }
+   SetEditDisabled(kEditEnable);
    fEditorFrame->SetEditable();
    gPad = Canvas();
    // next two lines are related to the old editor
@@ -1379,6 +1384,8 @@
    fEditor = TVirtualPadEditor::LoadEditor();
    fEditor->SetGlobal(kFALSE);
    fEditorFrame->SetEditable(0);
+   SetEditDisabled(kEditDisable);
+
    // next line is related to the old editor
    if (show == "false") gEnv->SetValue("Canvas.ShowEditor","false");
 }


From Ilka:
fix in TRootCanvas::Close() method to protect the
case when the canvas is deleted via cint. Thanks to Otto Schaile.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@10930 27541ba8-7e3a-0410-8455-c3a389f83636

--- gui/src/TRootCanvas.cxx
+++ gui/src/TRootCanvas.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TRootCanvas.cxx,v 1.66 2004/12/15 09:27:48 rdm Exp $
+// @(#)root/gui:$Name:  $:$Id: TRootCanvas.cxx,v 1.67 2004/12/16 19:42:26 rdm Exp $
 // Author: Fons Rademakers   15/01/98

 /*************************************************************************
@@ -609,6 +609,8 @@
 void TRootCanvas::Close()
 {
    // Called via TCanvasImp interface by TCanvas.
+
+   if (fEditor) fEditor->DeleteEditors();

    gVirtualX->CloseWindow();
 }


take out log msg

take out log msg

--- PageResults.cpp
+++ PageResults.cpp
@@ -1757,9 +1757,9 @@
 				    true , // queryexpansion?
 				    true );  // usestopwords?

-	log("results: gigabitquery=%s landid=%li"
-	    ,ttt.getBufStart()
-	    ,si->m_queryLangId);
+	// log("results: gigabitquery=%s landid=%li"
+	//     ,ttt.getBufStart()
+	//     ,si->m_queryLangId);

 	for ( long i = 0 ; i < numGigabits ; i++ ) {


Get the left/right arrow keys working properly.

--- desktop-utilities/lumina-terminal/TerminalWidget.cpp
+++ desktop-utilities/lumina-terminal/TerminalWidget.cpp
@@ -48,9 +48,9 @@
   //Iterate through the data and apply it when possible
   for(int i=0; i<data.size(); i++){
     if( data.at(i)=='\b' ){
-      //Simple Backspace
-      this->textCursor().deletePreviousChar();
-
+      //Simple cursor backward 1 (NOT backspace in this context!!)
+      //this->textCursor().deletePreviousChar();
+      this->moveCursor(QTextCursor::Left, QTextCursor::MoveAnchor);
     }else if( data.at(i)=='\x1B' ){
       //ANSI Control Code start
       //Look for the end of the code
@@ -59,10 +59,14 @@
         if(QChar(data.at(i+j)).isLetter()){ end = j; }
       }
       if(end<0){ return; } //skip everything else - no end to code found
-      applyANSI(data.mid(i, end));
+      applyANSI(data.mid(i+1, end));
       i+=end; //move the final loop along - already handled these bytes

     }else{
+      //Special Check: if inserting text within a line, clear the rest of this line first
+      if(i==0 && this->textCursor().position() < this->document()->characterCount()-1){
+        applyANSI("[K");
+      }
       //Plaintext character - just add it here
       this->insertPlainText( QChar(data.at(i)) );
     }
@@ -72,6 +76,7 @@

 void TerminalWidget::applyANSI(QByteArray code){
   //Note: the first byte is often the "[" character
+  //qDebug() << "Handle ANSI:" << code;
   //CURSOR MOVEMENT
   if( code.endsWith("A") ){ //Move Up
     int num = 1;
@@ -103,7 +108,7 @@
     int num = 1;
     if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle
     this->textCursor().setPosition(num);
-  }else if(code.endsWith("H")){ //Move to specific position (row/column)
+  }else if(code.endsWith("H") || code.endsWith("f") ){ //Move to specific position (row/column)
     int mid = code.indexOf(";");
     if(mid>0){
       int numR, numC; numR = numC = 1;
@@ -113,8 +118,27 @@
       qDebug() << "Set Text Position (absolute):" << "Row:" << numR << "Col:" << numC;
       // TO-DO
     }
+
+   // DISPLAY CLEAR CODES
   }else if(code.endsWith("J")){ //ED - Erase Display

+  }else if(code.endsWith("K")){ //EL - Erase in Line
+    int num = 0;
+    if(code.size()>2){ num = code.mid(1, code.size()-2).toInt(); } //everything in the middle
+    qDebug() << "Erase Number" << num;
+    //Now determine what should be cleared based on code
+    if(num==1){
+
+    }else if(num==2){
+
+    }else{
+      //Clear from current cursor to end of line
+      for(int i=this->textCursor().position(); i<this->document()->characterCount()+1; i++){
+      //while(this->document()->characterAt(this->textCursor().position())!=QChar('\n') && this->textCursor().position() < this->document()->characterCount()){
+	if(this->document()->characterAt(this->textCursor().position())=='\n'){ break; }
+        this->textCursor().deleteChar();
+      }
+    }
   }
 }


Search: limit number of results.

Search: limit number of results.

--- wowfoot-cpp/handlers/search/search.cpp
+++ wowfoot-cpp/handlers/search/search.cpp
@@ -18,6 +18,7 @@
 enum TableRowId {
 	NAME = ENTRY+1,
 };
+#define MAX_COUNT 100

 extern "C"
 void getResponse(const char* urlPart, DllResponseData* drd) {
@@ -56,7 +57,10 @@
 		t.title = "Spells";
 		Column c = { NAME, "Name", false, true, ENTRY, "spell" };
 		t.columns.push_back(c);
-		for(Spells::citr itr = gSpells.begin(); itr != gSpells.end(); ++itr) {
+		for(Spells::citr itr = gSpells.begin();
+			itr != gSpells.end() && t.array.size() < MAX_COUNT;
+			++itr)
+		{
 			const Spell& s(itr->second);
 			if(strcasestr(s.name, urlPart))
 			{


bug fix in seeding footstep seeds from current robot pose

git-svn-id: 3bdc50f1ba932488e36d0c1d1e7fc079467b8f9b@7438 c7283977-0100-402a-a91a-fa70b306dbfe

--- software/viewer/src/renderer_affordances/AffordanceCollectionListener.cpp
+++ software/viewer/src/renderer_affordances/AffordanceCollectionListener.cpp
@@ -249,10 +249,16 @@
       std::vector<LinkFrameStruct> link_geometry_tfs = it->second._gl_object->get_link_geometry_tfs();

       std::string geometry_name;
+      KDL::Frame T_world_objectgeometry;
       if(!it->second._gl_object->get_root_link_geometry_name(geometry_name))// get the root geometry if it exists
+      {
           geometry_name =link_geometry_tfs[0].name; // else take the first one in the list. note:: link_geometry_tfs is alphabetized.
-
-      KDL::Frame T_world_objectgeometry=link_geometry_tfs[0].frame;
+          T_world_objectgeometry=link_geometry_tfs[0].frame;
+      }
+      else
+      {
+          T_world_objectgeometry=it->second._gl_object->_T_world_body; // root link
+      }
       KDL::Frame T_world_aff=it->second._gl_object->_T_world_body;
       KDL::Frame T_objectgeometry_aff = T_world_objectgeometry.Inverse()*T_world_aff;


added a button to clear sticky hands for a object

git-svn-id: 767549f2a3626ae39d79f5348867a3ebb5082aca@1415 c7283977-0100-402a-a91a-fa70b306dbfe

--- software/viewer/src/renderer_affordances/object_interaction_gui_utils.hpp
+++ software/viewer/src/renderer_affordances/object_interaction_gui_utils.hpp
@@ -5,6 +5,7 @@
 #define PARAM_SEED_RH "Seed RHand"
 #define PARAM_SEED_LF "Seed LFoot"
 #define PARAM_SEED_RF "Seed RFoot"
+#define PARAM_CLEAR_SEEDS "Clear Seeds"
 #define PARAM_HALT_ALL_OPT "Halt All Opts"

 #define PARAM_COMMIT "Publish eegoal"
@@ -91,6 +92,24 @@
            }
        }
     }
+
+    else if (! strcmp(name, PARAM_CLEAR_SEEDS)) {
+
+      typedef std::map<std::string, StickyHandStruc > sticky_hands_map_type_;
+      sticky_hands_map_type_::iterator hand_it = self->sticky_hands.begin();
+      while (hand_it!=self->sticky_hands.end())
+      {
+         if (hand_it->second.object_name == (*self->object_selection))
+         {
+            if((*self->stickyhand_selection)==hand_it->first)
+               (*self->stickyhand_selection) = " ";
+            self->sticky_hands.erase(hand_it++);
+         }
+         else
+            hand_it++;
+      }
+
+    }
     else if (! strcmp(name, PARAM_HALT_ALL_OPT)) {
       KDL::Frame T_geom_lhandpose = KDL::Frame::Identity();
       KDL::Frame T_geom_rhandpose = KDL::Frame::Identity();
@@ -171,6 +190,7 @@
     bot_gtk_param_widget_add_buttons(pw,PARAM_SEED_RH, NULL);
     bot_gtk_param_widget_add_buttons(pw,PARAM_SEED_LF, NULL);
     bot_gtk_param_widget_add_buttons(pw,PARAM_SEED_RF, NULL);
+    bot_gtk_param_widget_add_buttons(pw,PARAM_CLEAR_SEEDS, NULL);
     bot_gtk_param_widget_add_buttons(pw,PARAM_HALT_ALL_OPT, NULL);


INTEGRATION: CWS frmcontrols03 (1.18.52); FILE MERGED 2004/03/02 09:51:21 fs 1.18.52.1: #i24387# proper im/export of a rich text control

--- xmloff/source/forms/propertyimport.cxx
+++ xmloff/source/forms/propertyimport.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: propertyimport.cxx,v $
  *
- *  $Revision: 1.18 $
- *
- *  last change: $Author: kz $ $Date: 2003-12-11 12:10:50 $
+ *  $Revision: 1.19 $
+ *
+ *  last change: $Author: rt $ $Date: 2004-05-07 16:00:04 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -362,13 +362,13 @@
     ::com::sun::star::util::Time OPropertyImport::implGetTime(double _nValue)
     {
         ::com::sun::star::util::Time aTime;
-        sal_Int32 nIntValue = sal_Int32(_nValue * 8640000);
+        sal_uInt32 nIntValue = sal_Int32(_nValue * 8640000);
         nIntValue *= 8640000;
-        aTime.HundredthSeconds = nIntValue % 100;
+        aTime.HundredthSeconds = (sal_uInt16)( nIntValue % 100 );
         nIntValue /= 100;
-        aTime.Seconds = nIntValue % 60;
+        aTime.Seconds = (sal_uInt16)( nIntValue % 60 );
         nIntValue /= 60;
-        aTime.Minutes = nIntValue % 60;
+        aTime.Minutes = (sal_uInt16)( nIntValue % 60 );
         nIntValue /= 60;
         OSL_ENSURE(nIntValue < 24, "OPropertyImport::implGetTime: more than a day?");
         aTime.Hours = (sal_uInt16)nIntValue;


Add missing accept() for GLM properties

Add missing accept() for GLM properties

--- source/reflectionzeug/include/reflectionzeug/extensions/GlmProperties.hpp
+++ source/reflectionzeug/include/reflectionzeug/extensions/GlmProperties.hpp
@@ -160,6 +160,11 @@
         // Invalid value
         return false;
     }
+
+    virtual void accept(AbstractVisitor * visitor) override
+    {
+        visitor->callVisitor< PropertyGlmVec<VectorType, ValueType, Size> >(this);
+    }
 };

 /**


Removed old bit functions

Removed old bit functions

--- code/engine/xrServerEntities/script_engine_script.cpp
+++ code/engine/xrServerEntities/script_engine_script.cpp
@@ -78,26 +78,6 @@
 }
 #endif

-int bit_and(int i, int j)
-{
-	return			(i & j);
-}
-
-int bit_or(int i, int j)
-{
-	return			(i | j);
-}
-
-int bit_xor(int i, int j)
-{
-	return			(i ^ j);
-}
-
-int bit_not(int i)
-{
-	return			(~i);
-}
-
 LPCSTR user_name()
 {
 	return			(Core.UserName);
@@ -182,12 +162,6 @@
 	result.m_count			= portion0.m_count + portion1.m_count;
 	return					(result);
 }
-
-// IC	std::ostream& operator<<(std::ostream &stream, profile_timer_script &timer)
-// {
-// 	stream					<< timer.time();
-// 	return					(stream);
-// }

 #ifdef XRGAME_EXPORTS
 ICF	u32	script_time_global	()	{ return Device.dwTimeGlobal; }
@@ -226,10 +200,6 @@
 	function	(L,	"prefetch",							prefetch_module);
 	function	(L,	"verify_if_thread_is_running",		verify_if_thread_is_running);
 	function	(L,	"editor",							is_editor);
-	function	(L,	"bit_and",							bit_and);
-	function	(L,	"bit_or",							bit_or);
-	function	(L,	"bit_xor",							bit_xor);
-	function	(L,	"bit_not",							bit_not);
 	function	(L, "user_name",						user_name);
 	function	(L, "time_global",						script_time_global);
 	function	(L, "time_global_async",				script_time_global_async);


Fix crashes when enable CIMG option

Fix crashes when enable CIMG option

--- ImageViewPanel.cpp
+++ ImageViewPanel.cpp
@@ -163,6 +163,10 @@
     random = std::uniform_int_distribution<int>(1, entries.size());
   else
     random = std::uniform_int_distribution<int>(0, 1);
+
+  #ifdef USE_CIMG
+    cimgImage = CImgFromWxImage(image);
+  #endif
 }

 void ImageViewPanel::OnCloseButtonClick(wxCommandEvent &event) {
@@ -216,7 +220,7 @@
     int width = (image.GetWidth() * percentage) / 100;
     int height = (image.GetHeight() * percentage) / 100;

-    bitmapStatic->SetBitmap(wxBitmap(CreateScaledImage(width, height)));
+    bitmapStatic->SetBitmap(wxBitmap(CreateScaledImage(width, height, true)));
   }
   scrollSizer->FitInside(scrollPanel);
   spnScale->SetValue(percentage);


Remove SinogramCreatorMC

Remove SinogramCreatorMC

--- ImageReconstruction/main.cpp
+++ ImageReconstruction/main.cpp
@@ -16,20 +16,17 @@
 #include "JPetManager/JPetManager.h"
 #include "ImageReco.h"
 #include "SinogramCreator.h"
-#include "SinogramCreatorMC.h"
 using namespace std;

-int main(int argc, const char* argv[])
+int main(int argc, const char *argv[])
 {
-  JPetManager& manager = JPetManager::getManager();
+  JPetManager &manager = JPetManager::getManager();

   manager.registerTask<ImageReco>("ImageReco");
   manager.registerTask<SinogramCreator>("SinogramCreator");
-  manager.registerTask<SinogramCreatorMC>("SinogramCreatorMC");

   //manager.useTask("ImageReco", "unk.evt", "reco");
-  //manager.useTask("SinogramCreator", "unk.evt", "sino");
-  manager.useTask("SinogramCreatorMC", "unk.evt", "sino.mc");
+  manager.useTask("SinogramCreator", "unk.evt", "sino");

   manager.run(argc, argv);
 }


Moved function `void CallbackParameter::bind_to_parent()` up.

No functional changes.

All tests pass.

	modified:   code/ylikuutio/callback_system/callback_parameter.cpp

--- code/ylikuutio/callback_system/callback_parameter.cpp
+++ code/ylikuutio/callback_system/callback_parameter.cpp
@@ -9,6 +9,17 @@

 namespace callback_system
 {
+    void CallbackParameter::bind_to_parent()
+    {
+        hierarchy::bind_child_to_parent<callback_system::CallbackParameter*>(this, this->parent_pointer->callback_parameter_pointer_vector, this->parent_pointer->free_callback_parameterID_queue);
+
+        if (!this->name.empty())
+        {
+            // This is a named variable, so store it in parent's `anyvalue_hashmap`.
+            this->parent_pointer->set_any_value(this->name, this->any_value);
+        }
+    }
+
     CallbackParameter::CallbackParameter(std::string name, datatypes::AnyValue* any_value, bool is_reference, callback_system::CallbackObject* parent_pointer)
     {
         // constructor.
@@ -37,15 +48,4 @@
     {
         return this->any_value;
     }
-
-    void CallbackParameter::bind_to_parent()
-    {
-        hierarchy::bind_child_to_parent<callback_system::CallbackParameter*>(this, this->parent_pointer->callback_parameter_pointer_vector, this->parent_pointer->free_callback_parameterID_queue);
-
-        if (!this->name.empty())
-        {
-            // This is a named variable, so store it in parent's `anyvalue_hashmap`.
-            this->parent_pointer->set_any_value(this->name, this->any_value);
-        }
-    }
 }


added RapidJSON results

added RapidJSON results

--- parsers/test_rapidjson_20170724/test_rapidjson/main.cpp
+++ parsers/test_rapidjson_20170724/test_rapidjson/main.cpp
@@ -16,9 +16,12 @@
 #include <string.h>
 #include "document.h"

+// RapidJSON does crash when parsing many nested array (stack overflow)
+// a flag can prevent this, but is not the default
+// https://github.com/miloyip/rapidjson/issues/1027
+
 typedef enum testStatus {ERROR, PASS, FAIL} TestStatus;

-/* Parse text to JSON, then render back to text, and print! */
 TestStatus parseData(char *data, int printParsingResults) {
     rapidjson::Document document;
     if (document.Parse(data).HasParseError()) {
@@ -27,9 +30,7 @@
     return PASS;
 }

-/* Read a file, parse, render back, etc. */
 TestStatus testFile(const char *filename, int printParsingResults) {
-
     FILE *f=fopen(filename,"rb");
     if(f == NULL) { return ERROR; };
     fseek(f,0,SEEK_END);


Changed scheduling API (broken currently)

--- apps/benchmarks/recfilter_benchmarks/summed_table.cpp
+++ apps/benchmarks/recfilter_benchmarks/summed_table.cpp
@@ -134,29 +134,25 @@
     cerr << filter << endl;

     {
-        FuncTag ft1 = INTRA_TILE_SCAN;
-        FuncTag ft2 = INTER_TILE_SCAN;
-
-        VarTag x   = PURE_DIMENSION;
-        VarTag t   = SCHEDULE_INNER;
         VarTag xi  = INNER_PURE_VAR, xit  = INNER_PURE_VAR | TAIL_DIMENSION;
         VarTag xo  = OUTER_PURE_VAR, xot  = OUTER_PURE_VAR | TAIL_DIMENSION;
         VarTag rxi = INNER_SCAN_VAR, rxit = INNER_SCAN_VAR | TAIL_DIMENSION;
         VarTag rxo = OUTER_SCAN_VAR, rxot = OUTER_SCAN_VAR | TAIL_DIMENSION;

-        filter.compute_in_shared(ft1);
-        filter.reorder(ft1, xit, rxit, xi, rxi, xo);
-        filter.unroll (ft1, rxi).unroll(ft1, rxit);
-//        filter.gpu_threads(ft1, xi, 1, 6);
-        filter.gpu_blocks (ft1, xo);
-        filter.reorder_storage(ft1, xit, xi, xo);
+        RecFilterSchedule s_handle_inner = filter.schedule_handle(INTRA_TILE_SCAN);
+        RecFilterSchedule s_handle_outer = filter.schedule_handle(INTER_TILE_SCAN);

-        filter.compute_in_global(ft2);
-//        filter.reorder(ft2, rxo, , , , );
-//        filter.unroll     (ft2, );
-//        filter.gpu_threads(ft2, )
-//        filter.gpu_blocks (ft2, );
-//        filter.reorder_storage(ft2, xot, xi, xo);
+        s_handle_inner.compute_in_shared(ft1)
+            .reorder_storage(ft1, xit, xi, xo)
+            .reorder(xit, rxit, xi, rxi, xo)
+            .unroll(rxi).unroll(rxit)
+            .gpu_threads(xi, 1, 6).gpu_blocks(xo);
+
+        s_handle_outer.compute_in_global()
+            .reorder_storage(xi, xit, xo)
+            .reorder(xot, xi, xo)
+            .unroll(rxo).unroll(rxot)
+            .gpu_threads(xi).gpu_blocks(xo);

         filter.bound(x,0,width).bound(y,0,height);
     }


adding missing include in vtk generator

adding missing include in vtk generator

--- apps/common/sg/generator/generateVTKWaveletVolume.cpp
+++ apps/common/sg/generator/generateVTKWaveletVolume.cpp
@@ -25,6 +25,7 @@
 #include <vtkMarchingCubes.h>
 #include <vtkRTAnalyticSource.h>
 #include <vtkSmartPointer.h>
+#include <vtkCell.h>

 namespace ospray {
   namespace sg {


INTEGRATION: CWS tune04 (1.4.128); FILE MERGED 2004/06/14 09:16:47 cmc 1.4.128.1: #i29636# turn global objects into local static data protected with swishy double-locked templated template

--- comphelper/inc/comphelper/accessibleeventnotifier.hxx
+++ comphelper/inc/comphelper/accessibleeventnotifier.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: accessibleeventnotifier.hxx,v $
  *
- *  $Revision: 1.4 $
- *
- *  last change: $Author: vg $ $Date: 2003-04-24 17:25:35 $
+ *  $Revision: 1.5 $
+ *
+ *  last change: $Author: hjs $ $Date: 2004-06-25 17:20:13 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -96,18 +96,11 @@
     public:
         typedef sal_uInt32  TClientId;

-    private:
         typedef ::std::pair< TClientId, ::com::sun::star::accessibility::AccessibleEventObject >
                                                                                ClientEvent;

         typedef ::cppu::OInterfaceContainerHelper                                   EventListeners;
         typedef ::std::map< TClientId, EventListeners*, ::std::less< TClientId > >  ClientMap;
-
-    // members
-    private:
-        // client administration
-        static ::osl::Mutex     s_aMutex;
-        static ClientMap        s_aClients;

     protected:
         AccessibleEventNotifier( );     // never implemented


flatten: accept processes.

flatten: accept processes.

--- passes/techmap/flatten.cc
+++ passes/techmap/flatten.cc
@@ -79,14 +79,6 @@

 	void flatten_cell(RTLIL::Design *design, RTLIL::Module *module, RTLIL::Cell *cell, RTLIL::Module *tpl, std::vector<RTLIL::Cell*> &new_cells)
 	{
-		if (tpl->processes.size() != 0) {
-			log("Flattening yielded processes:");
-			for (auto &it : tpl->processes)
-				log(" %s",log_id(it.first));
-			log("\n");
-			log_error("Flattening yielded processes -> this is not supported.\n");
-		}
-
 		// Copy the contents of the flattened cell

 		dict<IdString, IdString> memory_map;
@@ -125,6 +117,14 @@
 			map_attributes(cell, new_wire, tpl_wire->name);
 			wire_map[tpl_wire] = new_wire;
 			design->select(module, new_wire);
+		}
+
+		for (auto &tpl_proc_it : tpl->processes) {
+			RTLIL::Process *new_proc = module->addProcess(map_name(cell, tpl_proc_it.second), tpl_proc_it.second);
+			map_attributes(cell, new_proc, tpl_proc_it.second->name);
+			auto rewriter = [&](RTLIL::SigSpec &sig) { map_sigspec(wire_map, sig); };
+			new_proc->rewrite_sigspecs(rewriter);
+			design->select(module, new_proc);
 		}

 		for (auto tpl_cell : tpl->cells()) {


flowmap: add -minlut option, to allow postprocessing with opt_lut.

--- passes/techmap/flowmap.cc
+++ passes/techmap/flowmap.cc
@@ -737,7 +737,7 @@
 		return depth;
 	}

-	void map_cells()
+	void map_cells(int minlut)
 	{
 		ConstEval ce(module);
 		for (auto input_node : inputs)
@@ -778,7 +778,7 @@
 			}

 			vector<RTLIL::SigBit> input_nodes(lut_edges_bw[node].begin(), lut_edges_bw[node].end());
-			RTLIL::Const lut_table(State::Sx, 1 << input_nodes.size());
+			RTLIL::Const lut_table(State::Sx, max(1 << input_nodes.size(), 1 << minlut));
 			for (unsigned i = 0; i < (1 << input_nodes.size()); i++)
 			{
 				ce.push();
@@ -802,6 +802,7 @@
 			RTLIL::SigSpec lut_a, lut_y = node;
 			for (auto input_node : input_nodes)
 				lut_a.append_bit(input_node);
+			lut_a.append(RTLIL::Const(State::Sx, minlut - input_nodes.size()));

 			RTLIL::Cell *lut = module->addLut(NEW_ID, lut_a, lut_y, lut_table);
 			mapped_nodes.insert(node);
@@ -812,8 +813,12 @@
 				packed_count++;
 			}
 			lut_count++;
-			lut_area += 1 << input_nodes.size();
-			log("  Packed into a %d-LUT %s.%s.\n", (int)input_nodes.size(), log_id(module), log_id(lut));
+			lut_area += lut_table.size();
+
+			if ((int)input_nodes.size() >= minlut)
+				log("  Packed into a %d-LUT %s.%s.\n", (int)input_nodes.size(), log_id(module), log_id(lut));
+			else
+				log("  Packed into a %d-LUT %s.%s (implemented as %d-LUT).\n", (int)input_nodes.size(), log_id(module), log_id(lut), minlut);
 		}

 		for (auto node : mapped_nodes)
@@ -825,7 +830,7 @@
 		}
 	}

-	FlowmapWorker(int order, pool<IdString> cell_types, bool debug, RTLIL::Module *module) :
+	FlowmapWorker(int order, int minlut, pool<IdString> cell_types, bool debug, RTLIL::Module *module) :
 		order(order), debug(debug), module(module), sigmap(module), index(module)
 	{
 		log("Labeling cells.\n");
@@ -835,7 +840,7 @@

 		log("\n");
 		log("Mapping cells.\n");
-		map_cells();
+		map_cells(minlut);
 	}
 };

@@ -866,6 +871,9 @@
 		log("        perform technology mapping for a k-LUT architecture. if not specified,\n");
 		log("        defaults to 3.\n");
 		log("\n");
+		log("    -minlut n\n");
+		log("        only produce n-input or larger LUTs. if not specified, defaults to 1.\n");
+		log("\n");
 		log("    -cells <cell>[,<cell>,...]\n");
 		log("        map specified cells. if not specified, maps $_NOT_, $_AND_, $_OR_,\n");
 		log("        $_XOR_ and $_MUX_, which are the outputs of the `simplemap` pass.\n");
@@ -877,6 +885,7 @@
 	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 	{
 		int order = 3;
+		int minlut = 1;
 		vector<string> cells;
 		bool debug = false;

@@ -886,6 +895,11 @@
 			if (args[argidx] == "-maxlut" && argidx + 1 < args.size())
 			{
 				order = atoi(args[++argidx].c_str());
+				continue;
+			}
+			if (args[argidx] == "-minlut" && argidx + 1 < args.size())
+			{
+				minlut = atoi(args[++argidx].c_str());
 				continue;
 			}
 			if (args[argidx] == "-cells" && argidx + 1 < args.size())
@@ -919,7 +933,7 @@
 		int gate_area = 0, lut_area = 0;
 		for (auto module : design->selected_modules())
 		{
-			FlowmapWorker worker(order, cell_types, debug, module);
+			FlowmapWorker worker(order, minlut, cell_types, debug, module);
 			gate_count += worker.gate_count;
 			lut_count += worker.lut_count;
 			packed_count += worker.packed_count;


Reverted the change I made when removing the imbue(std::locale("C")) call.

--- tinyxml/tinyxml.cpp
+++ tinyxml/tinyxml.cpp
@@ -615,6 +615,7 @@
 		if ( s ) {
 #if TIXML_USE_STL
 			std::istringstream ss(s);
+			ss.imbue(std::locale("C"));
 			ss.precision(TiXmlBase::Precision(*d));
 			ss >> *d;
 #else
@@ -637,6 +638,7 @@
 	{
 		if ( s ) {
 			std::istringstream ss(s->c_str());
+			ss.imbue(std::locale("C"));
 			ss.precision(TiXmlBase::Precision(*d));
 			ss >> *d;
 		}
@@ -715,6 +717,7 @@
 {
 #if TIXML_USE_STL
     std::ostringstream ss;
+    ss.imbue(std::locale("C"));
     ss.precision(TiXmlBase::Precision(val));
     ss << val;
 	SetAttribute( name, ss.str() );
@@ -1283,6 +1286,7 @@
 {
 #if TIXML_USE_STL
     std::ostringstream ss;
+    ss.imbue(std::locale("C"));
     ss.precision(TiXmlBase::Precision(_value));
     ss << _value;
 	SetValue( ss.str() );
@@ -1307,6 +1311,7 @@
 {
 #if TIXML_USE_STL
     std::istringstream ss(value);
+    ss.imbue(std::locale("C"));
     double dval;
     ss >> dval;
     return dval;


Fix a bug in SAFS-util.

Fix a bug in SAFS-util.

use min<size_t>() instead of min().

--- tools/SAFS-util.cpp
+++ tools/SAFS-util.cpp
@@ -108,7 +108,7 @@
 	}

 	int invoke(io_request *rqs[], int num) {
-		size_t read_bytes = min(rqs[0]->get_size(),
+		size_t read_bytes = min<size_t>(rqs[0]->get_size(),
 				source->get_size() - rqs[0]->get_offset());
 		assert(read_bytes > 0);
 		size_t ret = source->get_data(rqs[0]->get_offset(), read_bytes, orig_buf);


change VM timeslice in C1/C2 to 1 (only known to be correct for C1), instead of c2e's 5

--- Agent.cpp
+++ Agent.cpp
@@ -554,7 +554,9 @@
 	assert(vm);
 	LifeAssert la(this);

-	if (!vm->timeslice) vm->timeslice = 5;
+	if (!vm->timeslice) {
+		vm->timeslice = (engine.version < 3) ? 1 : 5;
+	}

 	while (vm && vm->timeslice && !vm->isBlocking() && !vm->stopped()) {
 		try {


use correct function

use correct function

--- libi2pd/Tunnel.cpp
+++ libi2pd/Tunnel.cpp
@@ -671,7 +671,8 @@
 						if (!tunnel->IsRecreated () && ts + TUNNEL_RECREATION_THRESHOLD > tunnel->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
 						{
 							auto pool = tunnel->GetTunnelPool ();
-							if (pool && tunnel->GetPeers().size() == pool->GetNumOutboundHops())
+							// let it die if the tunnel pool has been reconfigured and this is old
+							if (pool && tunnel->GetTunnelConfig()->GetNumHops() == pool->GetNumOutboundHops())
 							{
 								tunnel->SetIsRecreated ();
 								pool->RecreateOutboundTunnel (tunnel);
@@ -723,9 +724,9 @@
 					{
 						if (!tunnel->IsRecreated () && ts + TUNNEL_RECREATION_THRESHOLD > tunnel->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
 						{
-							tunnel->SetIsRecreated ();
 							auto pool = tunnel->GetTunnelPool ();
-							if (pool && tunnel->GetPeers().size() == pool->GetNumInboundHops())
+							// let it die if the tunnel pool was reconfigured and has different number of hops
+							if (pool && tunnel->GetTunnelConfig()->GetNumHops() == pool->GetNumInboundHops())
 							{
 								tunnel->SetIsRecreated ();
 								pool->RecreateInboundTunnel (tunnel);


ConnectionApi: Check RSA key on connection

--- TelegramQt/ConnectionApi.cpp
+++ TelegramQt/ConnectionApi.cpp
@@ -313,6 +313,9 @@
     if (!settings) {
         return {{PendingOperation::c_text(), QStringLiteral("Settings object is missing")}};
     }
+    if (!settings->serverRsaKey().isValid()) {
+        return {{PendingOperation::c_text(), QStringLiteral("Invalid server RSA key")}};
+    }
     if (!settings->isValid()) {
         return {{PendingOperation::c_text(), QStringLiteral("Invalid settings")}};
     }


Adapt to debug.hpp->debug-internal.hpp change in cli-channel.cpp

--- TelepathyQt4/cli-channel.cpp
+++ TelepathyQt4/cli-channel.cpp
@@ -29,7 +29,7 @@

 #include "cli-dbus.h"
 #include "constants.h"
-#include "debug.hpp"
+#include "debug-internal.hpp"

 namespace Telepathy
 {


image blanked out on selection of table

image blanked out on selection of table

--- Brandisher/Brandisher/Brandisher.cpp
+++ Brandisher/Brandisher/Brandisher.cpp
@@ -50,6 +50,7 @@
 // -todo: detect when the ary item in a table is expanded
 // -todo: make the tree text under an array be the mean, median, mode and variance of the array values

+// todo: make multiple selections additivly draw multiple colored lines?
 // todo: make a graph visualization of the current table in the picture widget
 // todo: debug crash when selecting key of first table in the tree
 // todo: make listing the keys of a db happen on expand
@@ -97,21 +98,26 @@
 struct IdxKey { bool subTbl; u32 idx; str key; };            // this represents an index into the db vector and a key
 using TblKeys = std::unordered_map<str,IdxKey>;

+class mem_pixbuf : public nana::paint::detail::basic_image_pixbuf
+{
+  bool open(const std::experimental::filesystem::path& file){ return false; }
+  bool open(const void* data, std::size_t bytes){ return false; }
+};
+using MemPixbuf = std::shared_ptr<mem_pixbuf>;
+
 IvTbl                       glblT;
 vec_u8                     tblBuf;
 vec_str                       sel;
 vec_dbs                       dbs;
 TblKeys                   tblKeys;
+MemPixbuf                mempxbuf;
 nana::form                     fm;
 nana::treebox                tree;
-nana::picture              aryViz;
+nana::picture                 viz;
+nana::paint::image         vizImg;
+nana::place                   plc;
 nana::label sz, elems, szBytes, cap, mapcap, owned;

-class mem_pixbuf : public nana::paint::detail::basic_image_pixbuf
-{
-  bool open(const std::experimental::filesystem::path& file){ return false; }
-  bool open(const void* data, std::size_t bytes){ return false; }
-};

 namespace {

@@ -192,27 +198,20 @@
     simdb_error err;
     auto dbPths = simdb_listDBs(&err);

-    //for(auto& pth : dbPths)
     TO(dbPths.size(),i)
     {
       auto const& pth = dbPths[i];
       tree.insert(pth, pth);

-      //simdb db(pth.c_str(), 4096, 1 << 14);
-      //auto dbKeys = db.getKeyStrs();                                      // Get all keys in DB - this will need to be ran in the main loop, but not every frame
-      //vec_u8 tblBuf;
       dbs.emplace_back(pth.c_str(), 4096, 1 << 14);
       simdb&   db = dbs.back();
       auto dbKeys = db.getKeyStrs();                                      // Get all keys in DB - this will need to be ran in the main loop, but not every frame
-      //for(auto const& key : dbKeys)
       TO(dbKeys.size(),j)
       {
         auto const& key = dbKeys[j];
         auto tblKey = pth+"/"+key.str;
-        //tree.insert(pth+"/"+key.str, key.str);
         tree.insert(tblKey, key.str);

-        //str tblKey = pth+"/"+key.str;
         tblBuf     = extractDbKey(db, key.str);
         IvTbl ivTbl(tblBuf.data());
         insertTbl(tblKey, ivTbl);
@@ -279,6 +278,33 @@
     glblT  = IvTbl(tblBuf.data());
     return &glblT;
   }else{ return nullptr; }
+}
+
+
+void          initViz()
+{
+  using namespace std;
+  using namespace nana;
+  using namespace nana::paint;
+
+  mempxbuf = make_shared<mem_pixbuf>();
+  mempxbuf->pixbuf_ = pixel_buffer(512,256);
+  auto* stor = mempxbuf->pixbuf_.storage_.get();
+  auto rawpx = stor->raw_pixel_buffer;
+  auto     w = stor->pixel_size.width;
+  auto     h = stor->pixel_size.height;
+  for(unsigned int y=0; y<h; ++y)
+    for(unsigned int x=0; x<w; ++x){
+      pixel_argb_t p;
+      p.element.red   = (u8)(y/(f32)h * 255.f);
+      p.element.green = (u8)(x/(f32)w * 255.f);
+      p.element.blue  = 0;
+      p.element.alpha_channel = 1;
+      rawpx[y*w + x]  = p;
+    }
+
+  vizImg.image_ptr_ = mempxbuf;
+  viz.load(vizImg);
 }

 }
@@ -318,8 +344,10 @@
   }
   SECTION(initialize components with the main window handle)
   {
-    aryViz.create(fm, true);
-    aryViz.stretchable(true);
+    viz.create(fm, true);
+    viz.stretchable(true);
+    viz.borderless(false);
+    viz.bgcolor(color(0,0,0,1.0));

     sz.create(fm);
     elems.create(fm);
@@ -327,6 +355,28 @@
     cap.create(fm);
     mapcap.create(fm);
     owned.create(fm);
+
+    initViz();
+
+    //mempxbuf = make_shared<mem_pixbuf>();
+    //mempxbuf->pixbuf_ = pixel_buffer(512,256);
+    //auto* stor = mempxbuf->pixbuf_.storage_.get();
+    //auto rawpx = stor->raw_pixel_buffer;
+    //auto     w = stor->pixel_size.width;
+    //auto     h = stor->pixel_size.height;
+    //for(unsigned int y=0; y<h; ++y)
+    //  for(unsigned int x=0; x<w; ++x){
+    //    pixel_argb_t p;
+    //    p.element.red   = (u8)(y/(f32)h * 255.f);
+    //    p.element.green = (u8)(x/(f32)w * 255.f);
+    //    p.element.blue  = 0;
+    //    p.element.alpha_channel = 1;
+    //    rawpx[y*w + x]  = p;
+    //  }
+    //
+    //vizImg.image_ptr_ = mempxbuf;
+    //viz.load(vizImg);
+
   }

   menubar mb;
@@ -373,43 +423,34 @@
       auto& img = tree.icon("TestIcon");
       auto& nrm = img.normal;

-      //paint::detail::basic_image_pixbuf bipb;
-
-      //pixel_buffer pxbuf(128,128);
-      //pixel_buffer::pixel_buffer_storage* stor = pxbuf.storage_.get();
-      auto     mempxbuf = make_shared<mem_pixbuf>(); // todo: initialize this buffer
-      mempxbuf->pixbuf_ = pixel_buffer(512,256);
-      auto* stor = mempxbuf->pixbuf_.storage_.get();
-      auto rawpx = stor->raw_pixel_buffer;
-      auto     w = stor->pixel_size.width;
-      auto     h = stor->pixel_size.height;
-      for(unsigned int y=0; y<h; ++y)
-        for(unsigned int x=0; x<w; ++x){
-          pixel_argb_t p;
-          p.element.red   = (u8)(y/(f32)h * 255.f);
-          p.element.green = (u8)(x/(f32)w * 255.f);
-          p.element.blue  = 0;
-          p.element.alpha_channel = 1;
-          rawpx[y*w + x]  = p;
-        }
-
-      img.normal.open("normal1.png");
-      img.hovered.open("hovered1.png");
-      img.expanded.open("expanded1.png");
-      auto ptr = img.normal.image_ptr_.get();
-
-      img.normal.image_ptr_ = mempxbuf;
-      aryViz.load(img.normal);
+      //auto     mempxbuf = make_shared<mem_pixbuf>(); // todo: initialize this buffer
+      //mempxbuf->pixbuf_ = pixel_buffer(512,256);
+      //auto* stor = mempxbuf->pixbuf_.storage_.get();
+      //auto rawpx = stor->raw_pixel_buffer;
+      //auto     w = stor->pixel_size.width;
+      //auto     h = stor->pixel_size.height;
+      //for(unsigned int y=0; y<h; ++y)
+      //  for(unsigned int x=0; x<w; ++x){
+      //    pixel_argb_t p;
+      //    p.element.red   = (u8)(y/(f32)h * 255.f);
+      //    p.element.green = (u8)(x/(f32)w * 255.f);
+      //    p.element.blue  = 0;
+      //    p.element.alpha_channel = 1;
+      //    rawpx[y*w + x]  = p;
+      //  }
+
+      //img.normal.open("normal1.png");
+      //img.hovered.open("hovered1.png");
+      //img.expanded.open("expanded1.png");
+      //auto ptr = img.normal.image_ptr_.get();
+
+      //img.normal.image_ptr_ = mempxbuf;
+      //viz.load(img.normal);
       tree.auto_draw(true);
     }
     SECTION(treebox item insertion from the current tbl)
     {
       regenTblInfo();
-      //tree.insert("place", "place");
-      //auto watPrxy = tree.insert("place/wat", "wat");
-      //watPrxy.icon("TestIcon");
-      //tree.insert( toString("skidoosh"), toString("skidoosh") );
-      //insertTbl("", t);
     }
     SECTION(treebox set up including events)
     {
@@ -423,10 +464,11 @@
           str tblKey = getFullKey( tbArg.item.owner() );
           if( isTableKey(tblKey) &&
               tbArg.item.key() == "ary"      &&
-              tbArg.item.child().text() == ""){
+              tbArg.item.child().text() == "")
+          {
             auto    t = tblFromKey( tblKey );

-            auto flen = t.size() * 12; // 12 floats in a vert struct
+            auto flen = t.size() * 12;      // 12 floats in a vert struct
             f32*    f = (float*)t.m_mem;
             sort(f, f+flen);                // sort for both the median and the mode

@@ -520,6 +562,43 @@
         if(curT){
           regenLabels( *curT );
         }
+        if(curT == nullptr) return;
+
+        auto&   t = *curT;
+        auto flen = t.size() * 12;      // 12 floats in a vert struct
+        f32*    f = (float*)t.m_mem;
+
+        //TO(flen,i){
+        //  f[i] =
+        //}
+
+        //image img;
+        //initViz();
+        //vizImg.image_ptr_ = mempxbuf;
+        //viz.load(vizImg);
+
+        auto* stor = mempxbuf->pixbuf_.storage_.get();
+        auto rawpx = stor->raw_pixel_buffer;
+        auto     w = stor->pixel_size.width;
+        auto     h = stor->pixel_size.height;
+        for(unsigned int y=0; y<h; ++y)
+          for(unsigned int x=0; x<w; ++x){
+            pixel_argb_t p;
+            //p.element.red   = (u8)(y/(f32)h * 255.f);
+            //p.element.green = (u8)(x/(f32)w * 255.f);
+            p.element.red   = 0;
+            p.element.green = 0;
+            p.element.blue  = 0;
+            p.element.alpha_channel = 1;
+            rawpx[y*w + x]  = p;
+          }
+
+        vizImg.image_ptr_ = mempxbuf;
+        viz.load(vizImg);
+
+        plc.collocate();
+        fm.collocate();
+        fm.activate();

         Println("\n\n");
       });
@@ -528,12 +607,13 @@

   SECTION(place and gui component layout)
   {
-    place       plc(fm);
-    place  lblPlace(fm);
+    plc.bind(fm);
+    //place       plc(fm);
+    //place  lblPlace(fm);
     plc["mb"]      << mb;
     //plc["drgBtn"]  << drgBtn;
     plc["sz"]      << sz;
-    plc["aryViz"]  << aryViz;
+    plc["viz"]     << viz;
     plc["elems"]   << elems;
     plc["szBytes"] << szBytes;
     plc["cap"]     << cap;
@@ -545,7 +625,7 @@
             "<weight=20 margin=[0,0,5,10] " // weight=20 "<weight=10% "
              "  <fit sz margin=[0,10]> <fit elems margin=[0,10]> <fit szBytes margin=[0,10]> <fit cap margin=[0,10]> <fit mapcap margin=[0,10]> <fit owned>"
             ">" //  gap=5 margin=[10,40,10,0]" //margin=[10,10,10,10]>"
-            "<fit aryViz margin=[10,10,10,10] >"// weight=30%>" // margin=[10,10,10,10] > "
+            "<fit viz margin=[10,10,10,10] >"// weight=30%>" // margin=[10,10,10,10] > "
             "<tree>" // weight=70%>"
             );
     plc.collocate();
@@ -573,6 +653,29 @@

+
+//for(auto& pth : dbPths)
+//
+//simdb db(pth.c_str(), 4096, 1 << 14);
+//auto dbKeys = db.getKeyStrs();                                      // Get all keys in DB - this will need to be ran in the main loop, but not every frame
+//vec_u8 tblBuf;
+//
+//for(auto const& key : dbKeys)
+//
+//tree.insert(pth+"/"+key.str, key.str);
+//
+//str tblKey = pth+"/"+key.str;
+
+//tree.insert("place", "place");
+//auto watPrxy = tree.insert("place/wat", "wat");
+//watPrxy.icon("TestIcon");
+//tree.insert( toString("skidoosh"), toString("skidoosh") );
+//insertTbl("", t);
+
+//paint::detail::basic_image_pixbuf bipb;
+//
+//pixel_buffer pxbuf(128,128);
+//pixel_buffer::pixel_buffer_storage* stor = pxbuf.storage_.get();

 //&& tbArg.item.key() == "ary"
 //tree.insert( tbArg.item, "/watsquidoosh", "watsquidoosh");


Watchdog refresh in main Fadecandy loop

Watchdog refresh in main Fadecandy loop

--- firmware/fadecandy.cpp
+++ firmware/fadecandy.cpp
@@ -449,6 +449,8 @@
     leds.begin();

     while (1) {
+        watchdog_refresh();
+
         buffers.handleUSB();
         updateDrawBuffer(calculateInterpCoefficient());
         leds.show();


INTEGRATION: CWS changefileheader (1.4.276); FILE MERGED 2008/04/01 15:08:59 thb 1.4.276.2: #i85898# Stripping all external header guards 2008/03/28 15:23:54 rt 1.4.276.1: #i87441# Change license header to LPGL v3.

--- connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx
+++ connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx
@@ -1,35 +1,30 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: MNSINIParser.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.4 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: hr $ $Date: 2006-06-20 01:47:00 $
+ * $RCSfile: MNSINIParser.hxx,v $
+ * $Revision: 1.5 $
  *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
  *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
  *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
  *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/
 #ifndef __MNSINIPARSER_HXX__
@@ -37,9 +32,7 @@

 #include <rtl/ustring.hxx>
 #include <com/sun/star/io/IOException.hpp>
-#ifndef _OSL_PROCESS_H_
 #include <osl/process.h>
-#endif
 using namespace rtl;

 #include <map>


Specify node as attached_geometry when updating directly from pre 20101 models

--- OpenSim/Simulation/Model/PhysicalFrame.cpp
+++ OpenSim/Simulation/Model/PhysicalFrame.cpp
@@ -180,7 +180,7 @@
                         geometryIter->getValueAs(oldGeometryFiles);
                     }
                     std::string bodyName = aNode.getRequiredAttribute("name").getValue();
-                    SimTK::Xml::Element geometrySetNode("geometry");
+                    SimTK::Xml::Element geometrySetNode("attached_geometry");
                     aNode.insertNodeAfter(aNode.element_end(), geometrySetNode);
                     // Create Mesh node for each item in oldGeometryFiles
                     for (unsigned ng = 0; ng < oldGeometryFiles.size(); ng++) {
@@ -290,8 +290,8 @@
                 SimTK::Xml::element_iterator parentFrame = frameSetObjectsIter->element_begin("PhysicalOffsetFrame");
                 while (parentFrame->getRequiredAttributeValue("name") != frameName)
                     parentFrame++;
+
                 // if parentFrame has no "attached_geometry" child, add one else find it
-
                 SimTK::Xml::element_iterator frameAttachedGeometry = parentFrame->element_begin("attached_geometry");
                 if (frameAttachedGeometry == parentFrame->element_end()) {
                     SimTK::Xml::Element attachedGeomNode("attached_geometry");


Disabling the creation of the Textinputpanel object on Windows8 desktop chrome as
this seems to be causing a number of crashes on the field.

BUG=131194
R=robertshield,cpu
Review URL: https://chromiumcodereview.appspot.com/10666013

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@143970 0039d316-1c4b-4281-b951-d872f2087c98

--- content/browser/renderer_host/render_widget_host_view_win.cc
+++ content/browser/renderer_host/render_widget_host_view_win.cc
@@ -618,6 +618,10 @@
 void RenderWidgetHostViewWin::CreateWnd(HWND parent) {
   // ATL function to create the window.
   Create(parent);
+  // Creating an instance of the text input panel is crashy. Will reenable this
+  // after investigation.
+  // TODO(ananta)
+#if 0
   if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
       !base::win::IsMetroProcess()) {
     virtual_keyboard_.CreateInstance(CLSID_TextInputPanel, NULL, CLSCTX_INPROC);
@@ -628,6 +632,7 @@
       NOTREACHED() << "Failed to create instance of pen input panel";
     }
   }
+#endif
 }

 ///////////////////////////////////////////////////////////////////////////////


Added a Taotromino

Added a Taotromino

Just for screenshots, actually XD

--- Classes/HelloWorldScene.cpp
+++ Classes/HelloWorldScene.cpp
@@ -66,6 +66,7 @@
     currentTao = new Taotromino(Taotromino::Line);
      std::cout << "Setting Location" << std::endl;
     currentTao->setPosition((90 + 90*16) - 45, (90 + 90*5) - 45);
+    currentTao->setRotation(90.0);

      std::cout << "Adding Taotromino to scene" << std::endl;
     spriteNode->addChild(currentTao, 2);


Some tests for ut_dcpmaincategory

Some tests for ut_dcpmaincategory

--- controlpanel/tests/ut_dcpmaincategory/ut_dcpmaincategory.cpp
+++ controlpanel/tests/ut_dcpmaincategory/ut_dcpmaincategory.cpp
@@ -53,6 +53,9 @@
     m_subject->appendWidget(component1);
     item1 = m_subject->layout()->itemAt(0);
     QCOMPARE((void*)component1, (void*)(QGraphicsWidget*)item1);
+    item1 = m_subject->widgetAt(0);
+    QCOMPARE((void*)component1, (void*)(QGraphicsWidget*)item1);
+
     delete component1;
 }


fix for const eval

fix for const eval

--- elab_scope.cc
+++ elab_scope.cc
@@ -1169,7 +1169,7 @@
 	    container->genvar_tmp_val = genvar;
 	    delete step;
 	    delete test_ex;
-	    test_ex = elab_and_eval(des, container, loop_test, -1);
+	    test_ex = elab_and_eval(des, container, loop_test, -1, true);
 	    test = dynamic_cast<NetEConst*>(test_ex);
 	    assert(test);
       }


add a precondition

add a precondition

--- Code/GraphMol/QueryAtom.cpp
+++ Code/GraphMol/QueryAtom.cpp
@@ -58,6 +58,7 @@
 }

 bool QueryAtom::Match(Atom const *what) const {
+  PRECONDITION(what,"bad query atom");
   PRECONDITION(dp_query,"no query set");
   return dp_query->Match(what);
 }


network/socket_address: Add conversion to `void*`

--- poseidon/src/network/socket_address.hpp
+++ poseidon/src/network/socket_address.hpp
@@ -22,6 +22,16 @@
         ::sockaddr addr;
         ::sockaddr_in addr4;
         ::sockaddr_in6 addr6;
+
+        constexpr operator
+        const void*()
+        const noexcept
+          { return &(this->addr);  }
+
+        operator
+        void*()
+        noexcept
+          { return &(this->addr);  }

         constexpr operator
         const sockaddr*()


use the boost::flyweight pattern to get thread-safe initialization

git-svn-id: 931ab4487dc05a11552de95f7d42b8249ade56b7@2416 a5045d30-4826-4484-9c7f-6e55a06ddc77

--- Code/GraphMol/Fingerprints/MACCS.cpp
+++ Code/GraphMol/Fingerprints/MACCS.cpp
@@ -13,6 +13,8 @@
 #include <GraphMol/SmilesParse/SmilesParse.h>
 #include <GraphMol/Substruct/SubstructMatch.h>
 #include <GraphMol/MolOps.h>
+#include <boost/flyweight.hpp>
+#include <boost/flyweight/no_tracking.hpp>

 namespace  {
   struct Patterns {
@@ -289,9 +291,15 @@
       bit_165(RDKit::SmartsToMol("[R]")) {}
   };

+  boost::flyweight<std::vector<Patterns *>,boost::flyweights::no_tracking> gpats;
   void GenerateFP(const RDKit::ROMol &mol,ExplicitBitVect &fp)
   {
-    static Patterns pats;
+    if(gpats.get().size()==0){
+      std::vector<Patterns *> ps;
+      ps.push_back(new Patterns());
+      gpats = ps;
+    }
+    const Patterns &pats=*(gpats.get().front());
     PRECONDITION(fp.size()==167,"bad fingerprint");
     fp.clearBits();


Update (Chiara)

Update (Chiara)

--- PWG3/vertexingHF/AliAnalysisTaskSEHFQA.cxx
+++ PWG3/vertexingHF/AliAnalysisTaskSEHFQA.cxx
@@ -211,7 +211,7 @@

   //count events

-  fNEntries=new TH1F(GetOutputSlot(1)->GetContainer()->GetName(), "Counts the number of events", 9,-0.5,8.5);
+  fNEntries=new TH1F(GetOutputSlot(1)->GetContainer()->GetName(), "Counts the number of events", 10,-0.5,9.5);
   fNEntries->GetXaxis()->SetBinLabel(1,"nEventsAnal");
   fNEntries->GetXaxis()->SetBinLabel(2,"Pile-up Rej");
   fNEntries->GetXaxis()->SetBinLabel(3,"No VertexingHF");
@@ -221,7 +221,8 @@
   if(fReadMC){
     fNEntries->GetXaxis()->SetBinLabel(7,"MC Cand from c");
     fNEntries->GetXaxis()->SetBinLabel(8,"MC Cand from b");
-    fNEntries->GetXaxis()->SetBinLabel(9,"N fakes Trks");
+    fNEntries->GetXaxis()->SetBinLabel(9,"N fake Trks");
+    fNEntries->GetXaxis()->SetBinLabel(10,"N true Trks");
   } else{
     fNEntries->GetXaxis()->SetBinLabel(7,"N candidates");
   }
@@ -346,6 +347,26 @@
   fOutputTrack->Add(hptGoodTr);
   fOutputTrack->Add(hdistrGoodTr);
   fOutputTrack->Add(hd0);
+
+  if(fReadMC){
+    hname="hdistrFakeTr";
+    TH1F* hdistrFakeTr=new TH1F(hname.Data(),"Distribution of number of fake tracks per event;no.fake-tracks/ev;Entries",4000,-0.5,3999.5);
+    hdistrGoodTr->SetTitleOffset(1.3,"Y");
+
+    hname="hd0f";
+    TH1F* hd0f=new TH1F(hname.Data(),"Impact parameter distribution of fake tracks;d_{0}[cm];Entries/10^{3} cm",200,-0.1,0.1);
+
+    hname="hptFakeTr";
+    TH1F* hptFakeTr=new TH1F(hname.Data(),"Pt distribution of fake tracks;p_{t}[GeV];Entries/0.05 GeV/c",400,0.,20.);
+    hptGoodTr->SetTitleOffset(1.3,"Y");
+
+    fOutputTrack->Add(hptFakeTr);
+    fOutputTrack->Add(hdistrFakeTr);
+    fOutputTrack->Add(hd0f);
+    //implement!!!!
+  }
+
+

   if(fCuts->GetUseCentrality()){

@@ -572,7 +593,6 @@

   if(!aod) {delete [] pdgdaughters;return;}

-
   Bool_t isSimpleMode=fSimpleMode;
   if(!arrayProng) {
     AliInfo("Branch not found! The output will contain only trak related histograms\n");
@@ -756,6 +776,12 @@
     if(!(track->GetStatus()&AliESDtrack::kTPCin) && track->GetStatus()&AliESDtrack::kITSrefit && !(track->GetStatus()&AliESDtrack::kITSpureSA)){//tracks retrieved in the ITS and not reconstructed in the TPC
       ((TH1F*)fOutputTrack->FindObject("hnClsITS-SA"))->Fill(nclsTot);
     }
+    Int_t label=0;
+    if(fReadMC){
+      label=track->GetLabel();
+      if (label<0)fNEntries->Fill(8);
+      else fNEntries->Fill(9);
+    }

     if(isSimpleMode){

@@ -765,11 +791,15 @@
 	  /*nclsTot>3 &&*/
 	  nclsSPD>0) {//fill hist good tracks

-	((TH1F*)fOutputTrack->FindObject("hptGoodTr"))->Fill(track->Pt());
-
-	isGoodTrack++;
-
-	((TH1F*)fOutputTrack->FindObject("hdistrGoodTr"))->Fill(isGoodTrack);
+	isGoodTrack++;
+	if(fReadMC && label<0) {
+	  ((TH1F*)fOutputTrack->FindObject("hptFakeTr"))->Fill(track->Pt());
+	  ((TH1F*)fOutputTrack->FindObject("hdistrFakeTr"))->Fill(isGoodTrack);
+	}
+	else {
+	  ((TH1F*)fOutputTrack->FindObject("hptGoodTr"))->Fill(track->Pt());
+	  ((TH1F*)fOutputTrack->FindObject("hdistrGoodTr"))->Fill(isGoodTrack);
+	}
       }
     }//simple mode: no IsSelected on tracks: use "manual" cuts

@@ -808,21 +838,24 @@

 	//other histograms to be filled when the cut object is given
 	AliAODTrack* track=(AliAODTrack*)d->GetDaughter(id);
-	if(fReadMC){
-	  Int_t label=track->GetLabel();
-	  if (label<0)fNEntries->Fill(8);
-	}
+
 	//track quality

 	if (fCuts->IsInFiducialAcceptance(d->Pt(),d->Y(pdg)) && fCuts->IsSelected(d,AliRDHFCuts::kTracks,aod)) {
-
-	  ((TH1F*)fOutputTrack->FindObject("hptGoodTr"))->Fill(track->Pt());
 	  isGoodTrack++;
-
-	  ((TH1F*)fOutputTrack->FindObject("hdistrGoodTr"))->Fill(isGoodTrack);
-
-	  ((TH1F*)fOutputTrack->FindObject("hd0"))->Fill(d->Getd0Prong(id));
-
+	  Int_t label=0;
+	  if(fReadMC)label=track->GetLabel();
+	  if(fReadMC && label<0) {
+	    ((TH1F*)fOutputTrack->FindObject("hptFakeTr"))->Fill(track->Pt());
+	    ((TH1F*)fOutputTrack->FindObject("hdistrFakeTr"))->Fill(isGoodTrack);
+	    ((TH1F*)fOutputTrack->FindObject("hd0f"))->Fill(d->Getd0Prong(id));
+	  }
+	  else {
+	    ((TH1F*)fOutputTrack->FindObject("hptGoodTr"))->Fill(track->Pt());
+	    ((TH1F*)fOutputTrack->FindObject("hdistrGoodTr"))->Fill(isGoodTrack);
+	    ((TH1F*)fOutputTrack->FindObject("hd0"))->Fill(d->Getd0Prong(id));
+	  }
+
 	  if (fCuts->IsSelected(d,AliRDHFCuts::kAll,aod)){

 	    AliAODPid *pid = track->GetDetPid();


BUG: Fixed signed/unsigned comparison warnings

--- Code/Numerics/itkPowellOptimizer.cxx
+++ Code/Numerics/itkPowellOptimizer.cxx
@@ -59,7 +59,7 @@
 {
   m_LineOrigin = origin;
   m_LineDirection = direction;
-  for(int i=0; i<m_SpaceDimension; i++)
+  for(unsigned int i=0; i<m_SpaceDimension; i++)
     {
     m_LineDirection[i] = m_LineDirection[i] / this->GetScales()[i];
     }
@@ -70,7 +70,7 @@
 ::GetLineValue(double x) const
 {
   PowellOptimizer::ParametersType xCoord( m_SpaceDimension );
-  for(int i=0; i<m_SpaceDimension; i++)
+  for(unsigned int i=0; i<m_SpaceDimension; i++)
     {
     xCoord[i] = this->m_LineOrigin[i] + x * this->m_LineDirection[i];
     }
@@ -89,7 +89,7 @@
 ::SetCurrentLinePoint(double x, double fx)
 {
   PowellOptimizer::ParametersType xCoord( m_SpaceDimension );
-  for(int i=0; i<m_SpaceDimension; i++)
+  for(unsigned int i=0; i<m_SpaceDimension; i++)
     {
     xCoord[i] = this->m_LineOrigin[i] + x * this->m_LineDirection[i];
     }
@@ -361,7 +361,7 @@
   p = this->GetInitialPosition();
   pt = p;

-  int ibig;
+  unsigned int ibig;
   double fp, del, fptt;
   double ax, xx, bx;
   double fa, fx, fb;
@@ -378,9 +378,9 @@
     ibig = 0;
     del = 0.0;

-    for (int i = 0; i < m_SpaceDimension; i++)
-      {
-      for (int j = 0; j < m_SpaceDimension; ++j)
+    for (unsigned int i = 0; i < m_SpaceDimension; i++)
+      {
+      for (unsigned int j = 0; j < m_SpaceDimension; ++j)
         {
         xit[j] = xi[j][i];
         }
@@ -410,7 +410,7 @@
       return;
       }

-    for (int j = 0; j < m_SpaceDimension; ++j)
+    for (unsigned int j = 0; j < m_SpaceDimension; ++j)
       {
       ptt[j] = 2.0*p[j] - pt[j];
       xit[j] = p[j] - pt[j];
@@ -436,7 +436,7 @@
         this->SetCurrentLinePoint(xx, fx);
         p = this->GetCurrentPosition();

-        for (int j = 0; j < m_SpaceDimension; j++)
+        for (unsigned int j = 0; j < m_SpaceDimension; j++)
           {
           xi[j][ibig] = xx * xit[j];
           }


correct also single distributions N+ and N-

--- PWGCF/EBYE/BalanceFunctions/AliBalance.cxx
+++ PWGCF/EBYE/BalanceFunctions/AliBalance.cxx
@@ -890,16 +890,29 @@
     }
   }

-  // do correction with the efficiency calculated from HIJING (for two particle correlations)
+  // do correction with the efficiency calculated from MC + Data (for single particles and two particle correlations)
+  // - single particle efficiencies from MC (AliAnalysiTaskEfficiency)
+  // - two particle efficiencies from convolution of data single particle distributions
+  //   (normalized to single particle efficiency)
   if(iAnalysisType == kEta && etaWindow > 0 && correctWithEfficiency){

+    TH1F* hEffP  = (TH1F*)fEfficiencyMatrix->Get(Form("etaEffP_Cent%.0f-%.0f_MC",centrMin,centrMax));
+    TH1F* hEffN  = (TH1F*)fEfficiencyMatrix->Get(Form("etaEffN_Cent%.0f-%.0f_MC",centrMin,centrMax));
     TH1F* hEffPP = (TH1F*)fEfficiencyMatrix->Get(Form("etaEffPP_Cent%.0f-%.0f_Data",centrMin,centrMax));
     TH1F* hEffNN = (TH1F*)fEfficiencyMatrix->Get(Form("etaEffNN_Cent%.0f-%.0f_Data",centrMin,centrMax));
     TH1F* hEffPN = (TH1F*)fEfficiencyMatrix->Get(Form("etaEffPN_Cent%.0f-%.0f_Data",centrMin,centrMax));

-    if( !hEffPP || !hEffNN || !hEffPN){
+    if( !hEffP || !hEffN || !hEffPP || !hEffNN || !hEffPN){
       AliError(Form("Efficiency (eta) histograms not found: etaEffPP_Cent%.0f-%.0f_Data",centrMin,centrMax));
       return NULL;
+    }
+
+    for(Int_t iBin = 0; iBin < hEffP->GetNbinsX(); iBin++){
+      hTemp5->SetBinError(iBin+1,hTemp5->GetBinError(iBin+1)/hEffN->GetBinContent(hEffN->FindBin(hTemp5->GetBinCenter(iBin+1))));
+      hTemp5->SetBinContent(iBin+1,hTemp5->GetBinContent(iBin+1)/hEffN->GetBinContent(hEffN->FindBin(hTemp5->GetBinCenter(iBin+1))));
+
+      hTemp6->SetBinError(iBin+1,hTemp6->GetBinError(iBin+1)/hEffP->GetBinContent(hEffP->FindBin(hTemp6->GetBinCenter(iBin+1))));
+      hTemp6->SetBinContent(iBin+1,hTemp6->GetBinContent(iBin+1)/hEffP->GetBinContent(hEffP->FindBin(hTemp6->GetBinCenter(iBin+1))));
     }

     for(Int_t iBin = 0; iBin < gHistBalanceFunctionHistogram->GetNbinsX(); iBin++){
@@ -934,16 +947,29 @@
     // }
   }

-  // do correction with the efficiency calculated from HIJING (for two particle correlations)
+  // do correction with the efficiency calculated from MC + Data (for single particles and two particle correlations)
+  // - single particle efficiencies from MC (AliAnalysiTaskEfficiency)
+  // - two particle efficiencies from convolution of data single particle distributions
+  //   (normalized to single particle efficiency)
   if(iAnalysisType == kPhi && correctWithEfficiency){

+    TH1F* hEffPhiP  = (TH1F*)fEfficiencyMatrix->Get(Form("phiEffP_Cent%.0f-%.0f_MC",centrMin,centrMax));
+    TH1F* hEffPhiN  = (TH1F*)fEfficiencyMatrix->Get(Form("phiEffN_Cent%.0f-%.0f_MC",centrMin,centrMax));
     TH1F* hEffPhiPP = (TH1F*)fEfficiencyMatrix->Get(Form("phiEffPP_Cent%.0f-%.0f_Data",centrMin,centrMax));
     TH1F* hEffPhiNN = (TH1F*)fEfficiencyMatrix->Get(Form("phiEffNN_Cent%.0f-%.0f_Data",centrMin,centrMax));
     TH1F* hEffPhiPN = (TH1F*)fEfficiencyMatrix->Get(Form("phiEffPN_Cent%.0f-%.0f_Data",centrMin,centrMax));

-    if( !hEffPhiPP || !hEffPhiNN || !hEffPhiPN){
+    if( !hEffPhiP || !hEffPhiN || !hEffPhiPP || !hEffPhiNN || !hEffPhiPN){
       AliError("Efficiency (phi) histograms not found");
       return NULL;
+    }
+
+    for(Int_t iBin = 0; iBin < hEffPhiP->GetNbinsX(); iBin++){
+      hTemp5->SetBinError(iBin+1,hTemp5->GetBinError(iBin+1)/hEffPhiN->GetBinContent(hEffPhiN->FindBin(hTemp5->GetBinCenter(iBin+1))));
+      hTemp5->SetBinContent(iBin+1,hTemp5->GetBinContent(iBin+1)/hEffPhiN->GetBinContent(hEffPhiN->FindBin(hTemp5->GetBinCenter(iBin+1))));
+
+      hTemp6->SetBinError(iBin+1,hTemp6->GetBinError(iBin+1)/hEffPhiP->GetBinContent(hEffPhiP->FindBin(hTemp6->GetBinCenter(iBin+1))));
+      hTemp6->SetBinContent(iBin+1,hTemp6->GetBinContent(iBin+1)/hEffPhiP->GetBinContent(hEffPhiP->FindBin(hTemp6->GetBinCenter(iBin+1))));
     }

     for(Int_t iBin = 0; iBin < gHistBalanceFunctionHistogram->GetNbinsX(); iBin++){
@@ -968,9 +994,9 @@
     hTemp3->Sumw2();
     hTemp4->Sumw2();
     hTemp1->Add(hTemp3,-2.);
-    hTemp1->Scale(1./hTemp5->GetEntries());
+    hTemp1->Scale(1./hTemp5->Integral());
     hTemp2->Add(hTemp4,-2.);
-    hTemp2->Scale(1./hTemp6->GetEntries());
+    hTemp2->Scale(1./hTemp6->Integral());
     gHistBalanceFunctionHistogram->Add(hTemp1,hTemp2,1.,1.);
     gHistBalanceFunctionHistogram->Scale(0.5/fP2Step[iAnalysisType]);
   }


Add m2 interval values

Add m2 interval values

--- PWGLF/SPECTRA/Nuclei/B2/macros/AddTaskB2.C
+++ PWGLF/SPECTRA/Nuclei/B2/macros/AddTaskB2.C
@@ -53,6 +53,9 @@
 	const Int_t kMaxNSigmaTOF = 3;
 	const Int_t kMinTPCnCls   = 70;

+	const Double_t kMinM2     = 2.; // for deuterons
+	const Double_t kMaxM2     = 6.;
+
 	TString period = periodname;
 	period.ToLower();

@@ -89,6 +92,8 @@
 	task->SetVertexXInterval(-kMaxVx, kMaxVx);
 	task->SetVertexYInterval(-kMaxVy, kMaxVy);
 	task->SetVertexZInterval(-kMaxVz, kMaxVz);
+
+	task->SetM2Interval(kMinM2, kMaxM2);

 	task->SetCentralityInterval(minCentrality, maxCentrality);


INTEGRATION: CWS sb87 (1.10.76); FILE MERGED 2008/04/24 13:16:04 sb 1.10.76.2: RESYNC: (1.10-1.11); FILE MERGED 2008/04/09 15:20:03 sb 1.10.76.1: #i87730# use tools::getProcessWorkingDir instead of osl_getProcessWorkingDir

--- configmgr/source/localbe/localhierarchybrowsersvc.cxx
+++ configmgr/source/localbe/localhierarchybrowsersvc.cxx
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: localhierarchybrowsersvc.cxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -317,7 +317,7 @@

 #include "filehelper.hxx"
 #include <osl/file.hxx>
-#include <osl/process.h>
+#include "tools/getprocessworkingdir.hxx"
 #include <vector>
 // -----------------------------------------------------------------------------

@@ -363,7 +363,7 @@
     bool makeAbsoluteURL(OUString & rURL )
     {
         using osl::File;
-        OUString aBaseDir; osl_getProcessWorkingDir(&aBaseDir.pData);
+        OUString aBaseDir; tools::getProcessWorkingDir(&aBaseDir);

         File::RC errcode = osl::File::getAbsoluteFileURL(aBaseDir,rURL,rURL);


Adding the new type of the TPC calibration AliTPCcalibAlign AliTPCcalibLaser AliTPCcalibTracks Output stored in 2 directoris  - TPCAlign and TPCCluster within the AliESDfriends_v1.root

--- PWGPP/CalibMacros/CPass1/AddTaskTPCCalib.C
+++ PWGPP/CalibMacros/CPass1/AddTaskTPCCalib.C
@@ -50,6 +50,26 @@

   mgr->ConnectInput(task1,0,cinput1);
   mgr->ConnectOutput(task1,0,coutput1);
+
+  AliTPCAnalysisTaskcalib *taskAlign=new AliTPCAnalysisTaskcalib("CalibObjectsTrain1");
+  SetupCalibTaskTrainAlign(taskAlign);
+  mgr->AddTask(taskAlign);
+
+  AliAnalysisDataContainer *cinputAlign = mgr->GetCommonInputContainer();
+  if (!cinputAlign) cinputAlign = mgr->CreateContainer("cchain",TChain::Class(),
+                                      AliAnalysisManager::kInputContainer);
+  AliAnalysisDataContainer *coutputAlign = mgr->CreateContainer("TPCAlign",TObjArray::Class(), AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root");
+
+  mgr->ConnectInput(taskAlign,0,cinputAlign);
+  mgr->ConnectOutput(taskAlign,0,coutputAlign);
+
+  AliTPCAnalysisTaskcalib *taskCluster=new AliTPCAnalysisTaskcalib("CalibObjectsTrain1");
+  SetupCalibTaskTrainCluster(taskCluster);
+  mgr->AddTask(taskCluster);
+  AliAnalysisDataContainer *coutputAlign = mgr->CreateContainer("TPCCluster",TObjArray::Class(), AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root");
+  mgr->ConnectInput(taskCluster,0,cinput1);
+  mgr->ConnectOutput(taskCluster,0,coutputAlign);
+
   return task1;
 }

@@ -166,8 +186,8 @@
   calibTime->SetStreamLevel(0);
   calibTime->SetTriggerMask(-1,-1,kFALSE);        //accept everything

-  // max 600 tracks per event
-  calibTime->SetCutTracks(600);
+  // max 5000 tracks per event
+  calibTime->SetCutTracks(5000);

   myTask->AddJob(calibTime);
 }
@@ -192,16 +212,63 @@
 }

+void AddCalibAlign(TObject* task){
+  //
+  // Responsible: Marian Ivanov
+  // Description:
+  //
+  AliTPCAnalysisTaskcalib* myTask = (AliTPCAnalysisTaskcalib*) task;
+  AliTPCcalibAlign *calibAlign = new AliTPCcalibAlign("alignTPC","Alignment of the TPC sectors");
+  calibAlign->SetDebugLevel(debugLevel);
+  calibAlign->SetStreamLevel(streamLevel);
+  calibAlign->SetTriggerMask(-1,-1,kTRUE);        //accept everything
+  myTask->AddJob(calibAlign);
+}
+
+
+void AddCalibLaser(TObject* task){
+  //
+  // Responsible: Marian Ivanov
+  // Description:
+  //
+  AliTPCAnalysisTaskcalib* myTask = (AliTPCAnalysisTaskcalib*) task;
+  AliTPCcalibLaser *calibLaser = new AliTPCcalibLaser("laserTPC","laserTPC");
+  calibLaser->SetDebugLevel(debugLevel);
+  calibLaser->SetStreamLevel(streamLevel);
+  calibLaser->SetTriggerMask(-1,-1,kFALSE);        //accept everything
+  myTask->AddJob(calibLaser);
+}
+
+
+
+
 //_____________________________________________________________________________
 void SetupCalibTaskTrain1(TObject* task){
   //
   // Setup tasks for calibration train
   //
-  AddCalibCalib(task);
+  // AddCalibCalib(task); - disable refitting
   AddCalibTimeGain(task);
   AddCalibTime(task);
-  //AddCalibTracks(task);
-}
+}
+
+
+void SetupCalibTaskTrainAlign(TObject* task){
+  //
+  // Setup tasks for calibration train
+  //
+  AddCalibAlign(task);
+  AddCalibLaser(task);
+}
+
+
+void SetupCalibTaskTrainCluster(TObject* task){
+  //
+  // Setup tasks for calibration train
+  //
+  AddCalibTracks(task);
+}
+

 //_____________________________________________________________________________
 void ConfigOCDB(Int_t run){
@@ -238,23 +305,24 @@
   AliTPCRecoParam * tpcRecoParam = (AliTPCRecoParam*)array->At(1);

   transform->SetCurrentRecoParam(tpcRecoParam);
-  tpcRecoParam->SetUseGainCorrectionTime(0);
-  tpcRecoParam->SetUseRPHICorrection(kFALSE);
-  tpcRecoParam->SetUseTOFCorrection(kFALSE);
-  //
-  tpcRecoParam->SetUseDriftCorrectionTime(0);
-  tpcRecoParam->SetUseDriftCorrectionGY(0);
-  //
-  tpcRecoParam->SetUseRadialCorrection(kFALSE);
-  tpcRecoParam->SetUseQuadrantAlignment(kFALSE);
-  //
-  tpcRecoParam->SetUseSectorAlignment(kFALSE);
-  tpcRecoParam->SetUseFieldCorrection(kFALSE);
-  tpcRecoParam->SetUseExBCorrection(kFALSE);
-  //
-  tpcRecoParam->SetUseMultiplicityCorrectionDedx(kFALSE);
-  tpcRecoParam->SetUseAlignmentTime(kFALSE);
-  tpcRecoParam->SetUseComposedCorrection(kTRUE);
+  // in CPass1 use a default setting
+//   tpcRecoParam->SetUseGainCorrectionTime(0);
+//   tpcRecoParam->SetUseRPHICorrection(kFALSE);
+//   tpcRecoParam->SetUseTOFCorrection(kFALSE);
+//   //
+//   tpcRecoParam->SetUseDriftCorrectionTime(0);
+//   tpcRecoParam->SetUseDriftCorrectionGY(0);
+//   //
+//   tpcRecoParam->SetUseRadialCorrection(kFALSE);
+//   tpcRecoParam->SetUseQuadrantAlignment(kFALSE);
+//   //
+//   tpcRecoParam->SetUseSectorAlignment(kFALSE);
+//   tpcRecoParam->SetUseFieldCorrection(kFALSE);
+//   tpcRecoParam->SetUseExBCorrection(kFALSE);
+//   //
+//   tpcRecoParam->SetUseMultiplicityCorrectionDedx(kFALSE);
+//   tpcRecoParam->SetUseAlignmentTime(kFALSE);
+//   tpcRecoParam->SetUseComposedCorrection(kTRUE);

   AliTPCcalibDB::Instance()->SetRun(run);
 }


Resolve a type format warning.

Resolve a type format warning.

--- Commands/CDirectiveData.cpp
+++ Commands/CDirectiveData.cpp
@@ -1,5 +1,6 @@
 #include "Commands/CDirectiveData.h"

+#include <cinttypes>
 #include "Archs/Architecture.h"
 #include "Core/Common.h"
 #include "Core/FileManager.h"
@@ -430,7 +431,7 @@

 		for (size_t i = 0; i < normalData.size(); i++)
 		{
-			str += snprintf(str,20,"0x%16llX,",(uint64_t)normalData[i]);
+			str += snprintf(str,20,"0x%16" PRIx64 ",",(uint64_t)normalData[i]);
 		}
 		break;
 	case EncodingMode::Invalid: