[Rivet-svn] r2488 - in trunk: . data/plotinfo include/Rivet include/Rivet/Analyses include/Rivet/Tools src src/Analyses src/Tools src/Tools/TinyXML

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Sat Jun 19 12:46:49 BST 2010


Author: buckley
Date: Sat Jun 19 12:47:00 2010
New Revision: 2488

Log:
Moving MC_JetAnalysis base class into a new libRivetAnalysisTools library, with analysis base class and helper headers to be stored in the reinstated Rivet/Analyses include directory. Adding plotinfo entries for new jet rapidity and jet mass plots in MC_JetAnalysis derivatives.

Added:
   trunk/include/Rivet/Analyses/
   trunk/include/Rivet/Analyses/MC_JetAnalysis.hh
      - copied unchanged from r2487, trunk/include/Rivet/Tools/MC_JetAnalysis.hh
   trunk/src/Analyses/MC_JetAnalysis.cc
      - copied, changed from r2487, trunk/src/Tools/MC_JetAnalysis.cc
Deleted:
   trunk/include/Rivet/Tools/MC_JetAnalysis.hh
   trunk/src/Tools/MC_JetAnalysis.cc
Modified:
   trunk/ChangeLog
   trunk/data/plotinfo/MC_JETS.plot
   trunk/data/plotinfo/MC_PHOTONJETS.plot
   trunk/data/plotinfo/MC_WJETS.plot
   trunk/data/plotinfo/MC_ZJETS.plot
   trunk/include/Rivet/Makefile.am
   trunk/src/Analyses/MC_JETS.cc
   trunk/src/Analyses/MC_PHOTONJETS.cc
   trunk/src/Analyses/MC_WJETS.cc
   trunk/src/Analyses/MC_ZJETS.cc
   trunk/src/Analyses/Makefile.am
   trunk/src/Makefile.am
   trunk/src/Tools/Makefile.am
   trunk/src/Tools/TinyXML/tinyxmlparser.cpp

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/ChangeLog	Sat Jun 19 12:47:00 2010	(r2488)
@@ -1,3 +1,16 @@
+2010-06-19  Andy Buckley  <andy at insectnation.org>
+
+	* Small fix to TinyXML operator precendence: removes a warning,
+	and I think fixes a small bug.
+
+	* Adding plotinfo entries for new jet rapidity and jet mass plots
+	in MC_JetAnalysis derivatives.
+
+	* Moving MC_JetAnalysis base class into a new
+	libRivetAnalysisTools library, with analysis base class and helper
+	headers to be stored in the reinstated Rivet/Analyses include
+	directory.
+
 2010-06-08  Andy Buckley  <andy at insectnation.org>
 
 	* Removing check for CEDARSTD #define guard, since we no longer

Modified: trunk/data/plotinfo/MC_JETS.plot
==============================================================================
--- trunk/data/plotinfo/MC_JETS.plot	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/data/plotinfo/MC_JETS.plot	Sat Jun 19 12:47:00 2010	(r2488)
@@ -94,6 +94,54 @@
 YLabel=$\text{d}\sigma/\text{d}\eta(\text{jet 4})$
 # END PLOT
 
+# BEGIN PLOT /MC_JETS/jet_y_1
+Title=
+XLabel=$y(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_JETS/jet_y_2
+Title=
+XLabel=$y(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_JETS/jet_y_3
+Title=
+XLabel=$y(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_JETS/jet_y_4
+Title=
+XLabel=$y(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 4})$
+# END PLOT
+
+# BEGIN PLOT /MC_JETS/jet_mass_1
+Title=
+XLabel=$m(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_JETS/jet_mass_2
+Title=
+XLabel=$m(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_JETS/jet_mass_3
+Title=
+XLabel=$m(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_JETS/jet_mass_4
+Title=
+XLabel=$m(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 4})$
+# END PLOT
+
 # BEGIN PLOT /MC_JETS/jet_multi_exclusive
 Title=Exclusive jet multiplicity
 XLabel=$N_{\text{jet}}$
@@ -222,4 +270,3 @@
 YLabel=$\text{d}\sigma/\text{d}p_\perp(\text{jet 4})$
 LogX=1
 # END PLOT
-

Modified: trunk/data/plotinfo/MC_PHOTONJETS.plot
==============================================================================
--- trunk/data/plotinfo/MC_PHOTONJETS.plot	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/data/plotinfo/MC_PHOTONJETS.plot	Sat Jun 19 12:47:00 2010	(r2488)
@@ -125,6 +125,54 @@
 YLabel=$\text{d}\sigma/\text{d}\eta(\text{jet 4})$
 # END PLOT
 
+# BEGIN PLOT /MC_PHOTONJETS/jet_y_1
+Title=
+XLabel=$y(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_PHOTONJETS/jet_y_2
+Title=
+XLabel=$y(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_PHOTONJETS/jet_y_3
+Title=
+XLabel=$y(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_PHOTONJETS/jet_y_4
+Title=
+XLabel=$y(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 4})$
+# END PLOT
+
+# BEGIN PLOT /MC_PHOTONJETS/jet_mass_1
+Title=
+XLabel=$m(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_PHOTONJETS/jet_mass_2
+Title=
+XLabel=$m(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_PHOTONJETS/jet_mass_3
+Title=
+XLabel=$m(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_PHOTONJETS/jet_mass_4
+Title=
+XLabel=$m(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 4})$
+# END PLOT
+
 # BEGIN PLOT /MC_PHOTONJETS/jet_multi_exclusive
 Title=Exclusive jet multiplicity
 XLabel=$N_{\text{jet}}$

Modified: trunk/data/plotinfo/MC_WJETS.plot
==============================================================================
--- trunk/data/plotinfo/MC_WJETS.plot	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/data/plotinfo/MC_WJETS.plot	Sat Jun 19 12:47:00 2010	(r2488)
@@ -150,6 +150,54 @@
 YLabel=$\text{d}\sigma/\text{d}\eta(\text{jet 4})$
 # END PLOT
 
+# BEGIN PLOT /MC_WJETS/jet_y_1
+Title=
+XLabel=$y(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_WJETS/jet_y_2
+Title=
+XLabel=$y(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_WJETS/jet_y_3
+Title=
+XLabel=$y(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_WJETS/jet_y_4
+Title=
+XLabel=$y(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 4})$
+# END PLOT
+
+# BEGIN PLOT /MC_WJETS/jet_mass_1
+Title=
+XLabel=$m(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_WJETS/jet_mass_2
+Title=
+XLabel=$m(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_WJETS/jet_mass_3
+Title=
+XLabel=$m(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_WJETS/jet_mass_4
+Title=
+XLabel=$m(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 4})$
+# END PLOT
+
 # BEGIN PLOT /MC_WJETS/jet_multi_exclusive
 Title=Exclusive jet multiplicity
 XLabel=$N_{\text{jet}}$

Modified: trunk/data/plotinfo/MC_ZJETS.plot
==============================================================================
--- trunk/data/plotinfo/MC_ZJETS.plot	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/data/plotinfo/MC_ZJETS.plot	Sat Jun 19 12:47:00 2010	(r2488)
@@ -150,6 +150,54 @@
 YLabel=$\text{d}\sigma/\text{d}\eta(\text{jet 4})$
 # END PLOT
 
+# BEGIN PLOT /MC_ZJETS/jet_y_1
+Title=
+XLabel=$y(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_ZJETS/jet_y_2
+Title=
+XLabel=$y(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_ZJETS/jet_y_3
+Title=
+XLabel=$y(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_ZJETS/jet_y_4
+Title=
+XLabel=$y(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}y(\text{jet 4})$
+# END PLOT
+
+# BEGIN PLOT /MC_ZJETS/jet_mass_1
+Title=
+XLabel=$m(\text{jet 1})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 1})$
+# END PLOT
+
+# BEGIN PLOT /MC_ZJETS/jet_mass_2
+Title=
+XLabel=$m(\text{jet 2})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 2})$
+# END PLOT
+
+# BEGIN PLOT /MC_ZJETS/jet_mass_3
+Title=
+XLabel=$m(\text{jet 3})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 3})$
+# END PLOT
+
+# BEGIN PLOT /MC_ZJETS/jet_mass_4
+Title=
+XLabel=$m(\text{jet 4})$
+YLabel=$\text{d}\sigma/\text{d}m(\text{jet 4})$
+# END PLOT
+
 # BEGIN PLOT /MC_ZJETS/jet_multi_exclusive
 Title=Exclusive jet multiplicity
 XLabel=$N_{\text{jet}}$
@@ -278,4 +326,3 @@
 YLabel=$\text{d}\sigma/\text{d}p_\perp(\text{jet 4})$
 LogX=1
 # END PLOT
-

Copied: trunk/include/Rivet/Analyses/MC_JetAnalysis.hh (from r2487, trunk/include/Rivet/Tools/MC_JetAnalysis.hh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/include/Rivet/Analyses/MC_JetAnalysis.hh	Sat Jun 19 12:47:00 2010	(r2488, copy of r2487, trunk/include/Rivet/Tools/MC_JetAnalysis.hh)
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+#ifndef RIVET_MC_JetAnalysis_HH
+#define RIVET_MC_JetAnalysis_HH
+
+#include "Rivet/Analysis.hh"
+#include "Rivet/Projections/FinalState.hh"
+
+namespace Rivet {
+
+
+  /// @brief Base class providing common functionality for MC jet validation analyses
+  class MC_JetAnalysis : public Analysis {
+  public:
+
+    /// Default constructor.
+    MC_JetAnalysis(const string& name,
+                   size_t njet,
+                   const string& jetpro_name,
+                   double jetptcut=20*GeV);
+
+
+    /// @name Analysis methods
+    //@{
+    virtual void init();
+    virtual void analyze(const Event& event);
+    virtual void finalize();
+    //@}
+
+
+  protected:
+
+    /// The number of jets for which histograms are to be initialised
+    size_t m_njet;
+
+    /// The name of the jet projection to be used for this analysis
+    /// (this projection has to be registered by the derived analysis!)
+    const std::string m_jetpro_name;
+
+    /// Jet pT cutoff
+    double m_jetptcut;
+
+    /// @todo Add jet masses and d(rap)
+
+    /// @name Histograms
+    //@{
+    std::vector<AIDA::IHistogram1D *> _h_log10_d;
+    std::vector<AIDA::IDataPointSet *> _h_log10_R;
+    std::vector<AIDA::IHistogram1D *> _h_pT_jet;
+    std::vector<AIDA::IHistogram1D *> _h_eta_jet;
+    std::vector<AIDA::IHistogram1D *> _h_rap_jet;
+    std::vector<AIDA::IHistogram1D *> _h_mass_jet;
+    std::map<std::pair<size_t, size_t>, AIDA::IHistogram1D*> _h_deta_jets;
+    std::map<std::pair<size_t, size_t>, AIDA::IHistogram1D*> _h_dR_jets;
+    AIDA::IHistogram1D * _h_jet_multi_exclusive;
+    AIDA::IHistogram1D * _h_jet_multi_inclusive;
+    AIDA::IDataPointSet * _h_jet_multi_ratio;
+    //@}
+
+  };
+
+}
+
+#endif

Modified: trunk/include/Rivet/Makefile.am
==============================================================================
--- trunk/include/Rivet/Makefile.am	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/include/Rivet/Makefile.am	Sat Jun 19 12:47:00 2010	(r2488)
@@ -77,6 +77,11 @@
   Projections/ZFinder.hh
 
 
+## Analysis base class headers
+nobase_pkginclude_HEADERS += \
+  Analyses/MC_JetAnalysis.hh
+
+
 ## Tools
 nobase_pkginclude_HEADERS += \
   Tools/Logging.hh  \
@@ -84,7 +89,6 @@
   Tools/Utils.hh \
   Tools/BinnedHistogram.hh \
   Tools/ParticleIdUtils.hh \
-  Tools/MC_JetAnalysis.hh \
   Tools/TypeTraits.hh
 nobase_dist_noinst_HEADERS += \
   Tools/osdir.hh

Modified: trunk/src/Analyses/MC_JETS.cc
==============================================================================
--- trunk/src/Analyses/MC_JETS.cc	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Analyses/MC_JETS.cc	Sat Jun 19 12:47:00 2010	(r2488)
@@ -1,10 +1,9 @@
 // -*- C++ -*-
-#include "Rivet/Analysis.hh"
-#include "Rivet/RivetAIDA.hh"
-#include "Rivet/Tools/Logging.hh"
-#include "Rivet/Tools/MC_JetAnalysis.hh"
+#include "Rivet/Analyses/MC_JetAnalysis.hh"
 #include "Rivet/Projections/FinalState.hh"
 #include "Rivet/Projections/FastJets.hh"
+#include "Rivet/Tools/Logging.hh"
+#include "Rivet/RivetAIDA.hh"
 
 namespace Rivet {
 
@@ -23,6 +22,7 @@
 
     void init() {
       FinalState fs;
+      //FastJets jetpro(fs, FastJets::ANTIKT, 0.4);
       FastJets jetpro(fs, FastJets::KT, 0.7);
       addProjection(jetpro, "Jets");
 

Copied and modified: trunk/src/Analyses/MC_JetAnalysis.cc (from r2487, trunk/src/Tools/MC_JetAnalysis.cc)
==============================================================================
--- trunk/src/Tools/MC_JetAnalysis.cc	Fri Jun 11 12:38:17 2010	(r2487, copy source)
+++ trunk/src/Analyses/MC_JetAnalysis.cc	Sat Jun 19 12:47:00 2010	(r2488)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
-#include "Rivet/Tools/MC_JetAnalysis.hh"
-#include "Rivet/Tools/Logging.hh"
+#include "Rivet/Analyses/MC_JetAnalysis.hh"
 #include "Rivet/Projections/FastJets.hh"
+#include "Rivet/Tools/Logging.hh"
 #include "Rivet/RivetAIDA.hh"
 
 namespace Rivet {

Modified: trunk/src/Analyses/MC_PHOTONJETS.cc
==============================================================================
--- trunk/src/Analyses/MC_PHOTONJETS.cc	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Analyses/MC_PHOTONJETS.cc	Sat Jun 19 12:47:00 2010	(r2488)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
-#include "Rivet/Tools/MC_JetAnalysis.hh"
-#include "Rivet/Tools/Logging.hh"
+#include "Rivet/Analyses/MC_JetAnalysis.hh"
 #include "Rivet/Projections/LeadingParticlesFinalState.hh"
 #include "Rivet/Projections/FastJets.hh"
+#include "Rivet/Tools/Logging.hh"
 #include "Rivet/RivetAIDA.hh"
 
 namespace Rivet {

Modified: trunk/src/Analyses/MC_WJETS.cc
==============================================================================
--- trunk/src/Analyses/MC_WJETS.cc	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Analyses/MC_WJETS.cc	Sat Jun 19 12:47:00 2010	(r2488)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
-#include "Rivet/Tools/MC_JetAnalysis.hh"
-#include "Rivet/Tools/Logging.hh"
+#include "Rivet/Analyses/MC_JetAnalysis.hh"
 #include "Rivet/Projections/WFinder.hh"
 #include "Rivet/Projections/FastJets.hh"
+#include "Rivet/Tools/Logging.hh"
 #include "Rivet/RivetAIDA.hh"
 
 namespace Rivet {

Modified: trunk/src/Analyses/MC_ZJETS.cc
==============================================================================
--- trunk/src/Analyses/MC_ZJETS.cc	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Analyses/MC_ZJETS.cc	Sat Jun 19 12:47:00 2010	(r2488)
@@ -1,8 +1,8 @@
 // -*- C++ -*-
-#include "Rivet/Tools/MC_JetAnalysis.hh"
-#include "Rivet/Tools/Logging.hh"
+#include "Rivet/Analyses/MC_JetAnalysis.hh"
 #include "Rivet/Projections/ZFinder.hh"
 #include "Rivet/Projections/FastJets.hh"
+#include "Rivet/Tools/Logging.hh"
 #include "Rivet/RivetAIDA.hh"
 
 namespace Rivet {

Modified: trunk/src/Analyses/Makefile.am
==============================================================================
--- trunk/src/Analyses/Makefile.am	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Analyses/Makefile.am	Sat Jun 19 12:47:00 2010	(r2488)
@@ -4,6 +4,11 @@
 lib_LTLIBRARIES =
 
 
+noinst_LTLIBRARIES = libRivetAnalysisTools.la
+libRivetAnalysisTools_la_SOURCES = \
+  MC_JetAnalysis.cc
+
+
 ## Unvalidated analyses: add new standard analyses here, and only
 ## move them into the collider-specific standard plugin libraries
 ## once they have been finished and checked. The --enable-unvalidated

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Makefile.am	Sat Jun 19 12:47:00 2010	(r2488)
@@ -5,7 +5,7 @@
 
 lib_LTLIBRARIES = libRivet.la
 
-libRivet_la_SOURCES = 
+libRivet_la_SOURCES =
 
 libRivet_la_LDFLAGS = \
   -L$(prefix)/lib \
@@ -15,6 +15,7 @@
 libRivet_la_LIBADD  = \
   Core/libRivetCore.la \
   Projections/libRivetProjections.la \
+  Analyses/libRivetAnalysisTools.la \
   Tools/libRivetTools.la \
   -ldl -lm \
   $(GSL_LDFLAGS) $(FASTJETCONFIGLIBADD)

Modified: trunk/src/Tools/Makefile.am
==============================================================================
--- trunk/src/Tools/Makefile.am	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Tools/Makefile.am	Sat Jun 19 12:47:00 2010	(r2488)
@@ -14,7 +14,6 @@
   TinyXML/tinyxml.cpp \
   TinyXML/tinyxmlerror.cpp \
   TinyXML/tinyxmlparser.cpp \
-  MC_JetAnalysis.cc \
   BinnedHistogram.cc
 
 dist_noinst_HEADERS = binreloc.h

Modified: trunk/src/Tools/TinyXML/tinyxmlparser.cpp
==============================================================================
--- trunk/src/Tools/TinyXML/tinyxmlparser.cpp	Fri Jun 11 12:38:17 2010	(r2487)
+++ trunk/src/Tools/TinyXML/tinyxmlparser.cpp	Sat Jun 19 12:47:00 2010	(r2488)
@@ -39,7 +39,7 @@
 
 // Note tha "PutString" hardcodes the same list. This
 // is less flexible than it appears. Changing the entries
-// or order will break putstring.	
+// or order will break putstring.
 TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] =
 {
 	{ "&amp;",  5, '&' },
@@ -54,7 +54,7 @@
 // Including the basic of this table, which determines the #bytes in the
 // sequence from the lead byte. 1 placed for invalid sequences --
 // although the result will be junk, pass it through as much as possible.
-// Beware of the non-characters in UTF-8:	
+// Beware of the non-characters in UTF-8:
 //				ef bb bf (Microsoft "lead bytes")
 //				ef bf be
 //				ef bf bf
@@ -224,7 +224,7 @@
 			case '\r':
 				// bump down to the next line
 				++row;
-				col = 0;				
+				col = 0;
 				// Eat the character
 				++p;
 
@@ -266,11 +266,11 @@
 						// In these cases, don't advance the column. These are
 						// 0-width spaces.
 						if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )
-							p += 3;	
+							p += 3;
 						else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )
-							p += 3;	
+							p += 3;
 						else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )
-							p += 3;	
+							p += 3;
 						else
 							{ p +=3; ++col; }	// A normal character.
 					}
@@ -322,7 +322,7 @@
 		while ( *p )
 		{
 			const unsigned char* pU = (const unsigned char*)p;
-			
+
 			// Skip the stupid Microsoft UTF-8 Byte order marks
 			if (	*(pU+0)==TIXML_UTF_LEAD_0
 				 && *(pU+1)==TIXML_UTF_LEAD_1
@@ -354,7 +354,7 @@
 	}
 	else
 	{
-		while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )
+      while ( *p && (IsWhiteSpace( *p ) || *p == '\n' || *p =='\r') )
 			++p;
 	}
 
@@ -792,7 +792,7 @@
 }
 
 void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding )
-{	
+{
 	// The first error in a chain is more accurate - don't set again!
 	if ( error )
 		return;
@@ -916,7 +916,7 @@
 			return;
 		}
 		(*tag) += (char) c ;
-		
+
 		if ( c == '>' )
 			break;
 	}
@@ -977,7 +977,7 @@
 						document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
 					return;
 				}
-				
+
 				if ( c == '>' )
 					break;
 
@@ -1097,7 +1097,7 @@
 			// Empty tag.
 			if ( *p  != '>' )
 			{
-				if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );		
+				if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );
 				return 0;
 			}
 			return (p+1);
@@ -1214,7 +1214,7 @@
 				{
 					p = node->Parse( p, data, encoding );
 					LinkEndChild( node );
-				}				
+				}
 				else
 				{
 					return 0;
@@ -1228,7 +1228,7 @@
 	if ( !p )
 	{
 		if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding );
-	}	
+	}
 	return p;
 }
 
@@ -1237,7 +1237,7 @@
 {
 	while ( in->good() )
 	{
-		int c = in->get();	
+		int c = in->get();
 		if ( c <= 0 )
 		{
 			TiXmlDocument* document = GetDocument();
@@ -1250,7 +1250,7 @@
 		if ( c == '>' )
 		{
 			// All is well.
-			return;		
+			return;
 		}
 	}
 }
@@ -1294,7 +1294,7 @@
 {
 	while ( in->good() )
 	{
-		int c = in->get();	
+		int c = in->get();
 		if ( c <= 0 )
 		{
 			TiXmlDocument* document = GetDocument();
@@ -1310,7 +1310,7 @@
 			 && tag->at( tag->length() - 3 ) == '-' )
 		{
 			// All is well.
-			return;		
+			return;
 		}
 	}
 }
@@ -1378,7 +1378,7 @@
 		if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
 		return 0;
 	}
-	
+
 	const char* end;
 	const char SINGLE_QUOTE = '\'';
 	const char DOUBLE_QUOTE = '\"';
@@ -1424,7 +1424,7 @@
 {
 	while ( in->good() )
 	{
-		int c = in->peek();	
+		int c = in->peek();
 		if ( !cdata && (c == '<' ) )
 		{
 			return;
@@ -1559,19 +1559,19 @@
 		if ( StringEqual( p, "version", true, _encoding ) )
 		{
 			TiXmlAttribute attrib;
-			p = attrib.Parse( p, data, _encoding );		
+			p = attrib.Parse( p, data, _encoding );
 			version = attrib.Value();
 		}
 		else if ( StringEqual( p, "encoding", true, _encoding ) )
 		{
 			TiXmlAttribute attrib;
-			p = attrib.Parse( p, data, _encoding );		
+			p = attrib.Parse( p, data, _encoding );
 			encoding = attrib.Value();
 		}
 		else if ( StringEqual( p, "standalone", true, _encoding ) )
 		{
 			TiXmlAttribute attrib;
-			p = attrib.Parse( p, data, _encoding );		
+			p = attrib.Parse( p, data, _encoding );
 			standalone = attrib.Value();
 		}
 		else


More information about the Rivet-svn mailing list