Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/tpython/src/TPyClassGenerator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "TClass.h"
#include "TInterpreter.h"
#include "TROOT.h"
#include "TList.h"

// Standard
#include <sstream>
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/Rtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


#include "RtypesCore.h"
#include "DllImport.h"
// #include "DllImport.h" // included via RtypesCore.h, not used here

#include "snprintf.h" // part of stdio.h on systems that have it
#include "strlcpy.h" // part of string.h on systems that have it
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/TColor.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#define ROOT_TColor

#include "TNamed.h"
#include "TArrayI.h"

class TArrayI;

class TColor : public TNamed {
protected:
Expand Down
11 changes: 7 additions & 4 deletions core/base/inc/TFileInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
//////////////////////////////////////////////////////////////////////////

#include "TNamed.h"
#include "TList.h"

#ifdef R__LESS_INCLUDES
class TUrl;
class TUUID;
class TMD5;
#else
#include "TUrl.h"

#include "TUUID.h"

#include "TMD5.h"

#include "TList.h"
#endif

class TFileInfoMeta;

Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/TObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define ROOT_TObject


#include "RConfigure.h"
// #include "RConfigure.h" // included via Rtypes.h
#include "Rtypes.h"
#include "TStorage.h"
#include "TVersionCheck.h"
Expand Down
2 changes: 0 additions & 2 deletions core/base/inc/TParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

#include "Riostream.h"

#include "TClass.h"

#include "TObject.h"

#include "TCollection.h"
Expand Down
1 change: 0 additions & 1 deletion core/base/inc/TPluginManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class TEnv;
class TList;
class THashTable;
class TFunction;
class TMethodCall;
class TPluginManager;

#include <atomic>
Expand Down
5 changes: 5 additions & 0 deletions core/base/inc/TProcessID.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@


#include "TNamed.h"

#ifdef R__LESS_INCLUDES
class TObjArray;
#else
#include "TObjArray.h"
#endif

#include <atomic>
#include <type_traits>
Expand Down
9 changes: 5 additions & 4 deletions core/base/inc/TROOT.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
//////////////////////////////////////////////////////////////////////////

#include "TDirectory.h"
#include "TList.h"
#include "RConfigure.h"
// #include "TList.h" // included in TDirectory.h
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it is just directly here, so we ought to keep it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See TDirectory.h - "TList.h" included only without R__LESS_INCLUDES. Means in the dev build TList is just forward declarations. I just want to avoid same construct here.

// #include "RConfigure.h" // included via Rtypes.h

#include <atomic>
#include <string>
Expand Down Expand Up @@ -55,6 +55,7 @@ class TListOfDataMembers;
class TListOfEnums;
class TListOfFunctions;
class TListOfFunctionTemplates;
class TSeqCollection;
class TFunctionTemplate;
class TGlobalMappedFunction;

Expand Down Expand Up @@ -270,8 +271,8 @@ friend TROOT *ROOT::Internal::GetROOT2();
TObject *GetGeometry(const char *name) const;
const TObject *GetSelectedPrimitive() const { return fPrimitive; }
TVirtualPad *GetSelectedPad() const { return fSelectPad; }
Int_t GetNclasses() const { return fClasses->GetSize(); }
Int_t GetNtypes() const { return fTypes->GetSize(); }
Int_t GetNclasses() const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make that change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because TList.h is not included with R__LESS_INLCUDES - see my previous comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. This illustrate a trade off: small speedup at parsing time (removing the the include of TList.h for the (rare?) file that uses TROOT but not TList) vs a small performance increase (for the code that uses GetNclasses and GetNtypes).

Whether one is better than the other is .. well .. hard to know (and in probably in both case the actual performance change is likely indistinguishable) .. I would probably not have made that change but reverting it is also probably not worth it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcanal Should I revert these changes in TROOT.h?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you in the end. I slightly lean for revert but not if it is too much hassle.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep changes. These methods are not crucial for performance.

Int_t GetNtypes() const;
TFolder *GetRootFolder() const { return fRootFolder; }
TProcessUUID *GetUUIDs() const { return fUUIDs; }
const TString &GetWebDisplay() const { return fWebDisplay; }
Expand Down
2 changes: 1 addition & 1 deletion core/base/inc/TStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// //
//////////////////////////////////////////////////////////////////////////

#include "RConfigure.h"
// #include "RConfigure.h" // included via Rtypes.h
#include "Rtypes.h"

typedef void (*FreeHookFun_t)(void*, void *addr, size_t);
Expand Down
10 changes: 6 additions & 4 deletions core/base/inc/TStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
#ifndef ROOT_TStyle
#define ROOT_TStyle


#include "TNamed.h"
#include "TAttAxis.h"
#include "TAttLine.h"
#include "TAttFill.h"
#include "TAttText.h"
#include "TAttMarker.h"
#include "TArrayI.h"
#include "TAttText.h"
#include "TAttAxis.h"
#include "TColor.h"

#ifndef R__LESS_INCLUDES
#include "TArrayI.h"
#endif

class TBrowser;

class TStyle : public TNamed, public TAttLine, public TAttFill, public TAttMarker, public TAttText {
Expand Down
7 changes: 6 additions & 1 deletion core/base/inc/TTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
//////////////////////////////////////////////////////////////////////////

#include "TNamed.h"

#ifdef R__LESS_INCLUDES
class TList;
#else
#include "TList.h"
#endif

class TBrowser;

Expand Down Expand Up @@ -50,7 +55,7 @@ class TTask : public TNamed {
TTask& operator=(const TTask& tt);

virtual void Abort(); // *MENU*
virtual void Add(TTask *task) {fTasks->Add(task);}
virtual void Add(TTask *task);
virtual void Browse(TBrowser *b);
virtual void CleanTasks();
virtual void Clear(Option_t *option="");
Expand Down
2 changes: 0 additions & 2 deletions core/base/inc/TUrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include "TObject.h"
#include "TString.h"
#include "TMap.h"


class THashList;
class TMap;
Expand Down
11 changes: 8 additions & 3 deletions core/base/inc/TVirtualMonitoring.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@

#include "TNamed.h"

#ifdef R__LESS_INCLUDES
class TList;
class TMap;
#else
#include "TList.h"
#include "TMap.h"
#endif

class TFile;

class TVirtualMonitoringWriter : public TNamed {

private:

TVirtualMonitoringWriter(const TVirtualMonitoringWriter&); // Not implemented
TVirtualMonitoringWriter& operator=(const TVirtualMonitoringWriter&); // Not implemented
TVirtualMonitoringWriter(const TVirtualMonitoringWriter&) = delete;
TVirtualMonitoringWriter& operator=(const TVirtualMonitoringWriter&) = delete;

Double_t fValue; // double monitor value

Expand All @@ -44,7 +49,7 @@ class TVirtualMonitoringWriter : public TNamed {
TVirtualMonitoringWriter(const char *name, Double_t value)
: TNamed(name, ""), fValue(value), fTmpOpenPhases(0) { }

virtual ~TVirtualMonitoringWriter() { if (fTmpOpenPhases) delete fTmpOpenPhases; }
virtual ~TVirtualMonitoringWriter();

// TFile related info. In general they are gathered and sent only sometimes as summaries
virtual Bool_t SendFileCloseEvent(TFile * /*file*/)
Expand Down
2 changes: 0 additions & 2 deletions core/base/inc/TVirtualMutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

#include "TObject.h"

#include <memory>

class TVirtualMutex;

// Global mutex set in TThread::Init
Expand Down
1 change: 1 addition & 0 deletions core/base/inc/TVirtualRWMutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "TVirtualMutex.h"

#include <memory>

namespace ROOT {

Expand Down
4 changes: 0 additions & 4 deletions core/base/inc/TVirtualViewer3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@
// //
//////////////////////////////////////////////////////////////////////////

#include "Rtypes.h"

#include "TObject.h"

#include "TAttFill.h"

class TBuffer3D;
class TVirtualPad;
class TGLRect;
Expand Down
2 changes: 2 additions & 0 deletions core/base/src/TFileCollection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ collection of TFile names.
#include "TObjString.h"
#include "TUri.h"
#include "TUrl.h"
#include "TUUID.h"
#include "TMD5.h"
#include "TSystem.h"
#include "Riostream.h"
#include "TRegexp.h"
Expand Down
4 changes: 3 additions & 1 deletion core/base/src/TFileInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Class describing a generic file including meta information.
#include "TRegexp.h"
#include "TSystem.h"
#include "TClass.h"

#include "TUrl.h"
#include "TUUID.h"
#include "TMD5.h"

ClassImp(TFileInfo);
ClassImp(TFileInfoMeta);
Expand Down
1 change: 1 addition & 0 deletions core/base/src/TFolder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ if this pointer is used frequently or inside loops.
#include "Strlen.h"
#include "TFolder.h"
#include "TBrowser.h"
#include "TList.h"
#include "TROOT.h"
#include "TClass.h"
#include "TError.h"
Expand Down
1 change: 0 additions & 1 deletion core/base/src/TPluginManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ TFile, TSQLServer, TGrid, etc. functionality.
*/

#include "TPluginManager.h"
#include "Varargs.h"
#include "TEnv.h"
#include "TRegexp.h"
#include "TROOT.h"
Expand Down
2 changes: 1 addition & 1 deletion core/base/src/TProcessUUID.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ TProcessID *fPID in TRef points to the unique object TProcessUUID.
The TRef uniqueID is directly the UUIDNumber=slot number.
*/

#include "TROOT.h"
#include "TProcessUUID.h"
#include "THashList.h"
#include "TBits.h"
#include "TObjString.h"
#include "TObjArray.h"
#include "TUUID.h"

ClassImp(TProcessUUID);
Expand Down
1 change: 0 additions & 1 deletion core/base/src/TQCommand.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ Use TQUndoManager::Undo to undo commands in history list.
Redo is Undo for undo action. Use TQUndoManager::Redo method for that
*/

#include "Varargs.h"
#include "TQCommand.h"
#include "TQConnection.h"
#include "TDataType.h"
Expand Down
1 change: 0 additions & 1 deletion core/base/src/TQConnection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ communication mechanism.
- receiver is the object to which slot-method is applied
*/

#include "Varargs.h"
#include "TQConnection.h"
#include "TROOT.h"
#include "TRefCnt.h"
Expand Down
1 change: 0 additions & 1 deletion core/base/src/TQObject.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ as an identifier of the modifier method.
General purpose message signal
*/

#include "Varargs.h"
#include "TQObject.h"
#include "TQConnection.h"
#include "THashList.h"
Expand Down
15 changes: 15 additions & 0 deletions core/base/src/TROOT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,21 @@ TCollection *TROOT::GetListOfTypes(Bool_t /* load */)
return fTypes;
}

////////////////////////////////////////////////////////////////////////////////
/// Get number of classes.

Int_t TROOT::GetNclasses() const
{
return fClasses->GetSize();
}

////////////////////////////////////////////////////////////////////////////////
/// Get number of types.

Int_t TROOT::GetNtypes() const
{
return fTypes->GetSize();
}

////////////////////////////////////////////////////////////////////////////////
/// Execute command when system has been idle for idleTimeInSec seconds.
Expand Down
11 changes: 11 additions & 0 deletions core/base/src/TTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ the following script:
#include "Riostream.h"
#include "TTask.h"
#include "TBrowser.h"
#include "TList.h"
#include "TROOT.h"
#include "TRegexp.h"

Expand Down Expand Up @@ -164,6 +165,16 @@ TTask::~TTask()
delete fTasks;
}


////////////////////////////////////////////////////////////////////////////////
/// Add TTask to this.

void TTask::Add(TTask *task)
{
fTasks->Add(task);
}


////////////////////////////////////////////////////////////////////////////////
/// Abort current tree of tasks.
/// After this call, the tree of tasks is ready to be executed again.
Expand Down
9 changes: 9 additions & 0 deletions core/base/src/TVirtualMonitoring.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Provides the interface for externel Monitoring

#include "TVirtualMonitoring.h"

#include "TList.h"

ClassImp(TVirtualMonitoringWriter);
ClassImp(TVirtualMonitoringReader);
Expand All @@ -26,3 +27,11 @@ ClassImp(TVirtualMonitoringReader);
TVirtualMonitoringWriter *gMonitoringWriter = 0;
TVirtualMonitoringReader *gMonitoringReader = 0;

////////////////////////////////////////////////////////////
/// destructor

TVirtualMonitoringWriter::~TVirtualMonitoringWriter()
{
if (fTmpOpenPhases)
delete fTmpOpenPhases;
}
1 change: 0 additions & 1 deletion core/cont/inc/TArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
//////////////////////////////////////////////////////////////////////////

#include "Rtypes.h"
#include <string.h>

class TBuffer;

Expand Down
Loading