/usr/include/root/Rtypes.h is in libroot-core-dev 5.34.19+dfsg-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | /* @(#)root/base:$Id$ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_Rtypes
#define ROOT_Rtypes
//////////////////////////////////////////////////////////////////////////
// //
// Rtypes //
// //
// Basic types used by ROOT. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_RConfig
#include "RConfig.h"
#endif
#ifndef ROOT_DllImport
#include "DllImport.h"
#endif
#ifndef ROOT_Rtypeinfo
#include "Rtypeinfo.h"
#endif
#include <stdio.h>
#include <string.h>
#include <snprintf.h> // part of stdio.h on systems that have it
#include <strlcpy.h> // part of string.h on systems that have it
//---- forward declared class types --------------------------------------------
class TClass;
class TBuffer;
class TDirectory;
class TMemberInspector;
class TObject;
class TNamed;
class TRootIOCtor;
class TCollection;
class TFileMergeInfo;
class TString;
//---- types -------------------------------------------------------------------
typedef char Char_t; //Signed Character 1 byte (char)
typedef unsigned char UChar_t; //Unsigned Character 1 byte (unsigned char)
typedef short Short_t; //Signed Short integer 2 bytes (short)
typedef unsigned short UShort_t; //Unsigned Short integer 2 bytes (unsigned short)
#ifdef R__INT16
typedef long Int_t; //Signed integer 4 bytes
typedef unsigned long UInt_t; //Unsigned integer 4 bytes
#else
typedef int Int_t; //Signed integer 4 bytes (int)
typedef unsigned int UInt_t; //Unsigned integer 4 bytes (unsigned int)
#endif
#ifdef R__B64 // Note: Long_t and ULong_t are currently not portable types
typedef int Seek_t; //File pointer (int)
typedef long Long_t; //Signed long integer 8 bytes (long)
typedef unsigned long ULong_t; //Unsigned long integer 8 bytes (unsigned long)
#else
typedef int Seek_t; //File pointer (int)
typedef long Long_t; //Signed long integer 4 bytes (long)
typedef unsigned long ULong_t; //Unsigned long integer 4 bytes (unsigned long)
#endif
typedef float Float_t; //Float 4 bytes (float)
typedef float Float16_t; //Float 4 bytes written with a truncated mantissa
typedef double Double_t; //Double 8 bytes
typedef double Double32_t; //Double 8 bytes in memory, written as a 4 bytes float
typedef long double LongDouble_t;//Long Double
typedef char Text_t; //General string (char)
typedef bool Bool_t; //Boolean (0=false, 1=true) (bool)
typedef unsigned char Byte_t; //Byte (8 bits) (unsigned char)
typedef short Version_t; //Class version identifier (short)
typedef const char Option_t; //Option string (const char)
typedef int Ssiz_t; //String size (int)
typedef float Real_t; //TVector and TMatrix element type (float)
#if defined(R__WIN32) && !defined(__CINT__)
typedef __int64 Long64_t; //Portable signed long integer 8 bytes
typedef unsigned __int64 ULong64_t; //Portable unsigned long integer 8 bytes
#else
typedef long long Long64_t; //Portable signed long integer 8 bytes
typedef unsigned long long ULong64_t;//Portable unsigned long integer 8 bytes
#endif
typedef double Axis_t; //Axis values type (double)
typedef double Stat_t; //Statistics type (double)
typedef short Font_t; //Font number (short)
typedef short Style_t; //Style number (short)
typedef short Marker_t; //Marker number (short)
typedef short Width_t; //Line width (short)
typedef short Color_t; //Color number (short)
typedef short SCoord_t; //Screen coordinates (short)
typedef double Coord_t; //Pad world coordinates (double)
typedef float Angle_t; //Graphics angle (float)
typedef float Size_t; //Attribute size (float)
enum EColor { kWhite =0, kBlack =1, kGray=920,
kRed =632, kGreen =416, kBlue=600, kYellow=400, kMagenta=616, kCyan=432,
kOrange=800, kSpring=820, kTeal=840, kAzure =860, kViolet =880, kPink=900 };
// There is several streamer concepts.
class TClassStreamer; // Streamer functor for a class
class TMemberStreamer; // Streamer functor for a data member
typedef void (*ClassStreamerFunc_t)(TBuffer&, void*); // Streamer function for a class
typedef void (*MemberStreamerFunc_t)(TBuffer&, void*, Int_t); // Streamer function for a data member
// This class is used to implement proxy around collection classes.
class TVirtualCollectionProxy;
typedef void (*VoidFuncPtr_t)(); //pointer to void function
//---- constants ---------------------------------------------------------------
#ifndef NULL
#define NULL 0
#endif
#ifndef R__NULLPTR
#ifndef nullptr
#define nullptr 0
#endif
#endif
const Bool_t kTRUE = true;
const Bool_t kFALSE = false;
const Int_t kMaxUChar = 256;
const Int_t kMaxChar = kMaxUChar >> 1;
const Int_t kMinChar = -kMaxChar - 1;
const Int_t kMaxUShort = 65534;
const Int_t kMaxShort = kMaxUShort >> 1;
const Int_t kMinShort = -kMaxShort - 1;
const UInt_t kMaxUInt = UInt_t(~0);
const Int_t kMaxInt = Int_t(kMaxUInt >> 1);
const Int_t kMinInt = -kMaxInt - 1;
const ULong_t kMaxULong = ULong_t(~0);
const Long_t kMaxLong = Long_t(kMaxULong >> 1);
const Long_t kMinLong = -kMaxLong - 1;
const ULong64_t kMaxULong64 = ULong64_t(~0LL);
const Long64_t kMaxLong64 = Long64_t(kMaxULong64 >> 1);
const Long64_t kMinLong64 = -kMaxLong64 - 1;
const size_t kBitsPerByte = 8;
const Ssiz_t kNPOS = ~(Ssiz_t)0;
//--- bit manipulation ---------------------------------------------------------
#define BIT(n) (1ULL << (n))
#define SETBIT(n,i) ((n) |= BIT(i))
#define CLRBIT(n,i) ((n) &= ~BIT(i))
#define TESTBIT(n,i) ((Bool_t)(((n) & BIT(i)) != 0))
//---- debug global ------------------------------------------------------------
R__EXTERN Int_t gDebug;
//---- ClassDef macros ---------------------------------------------------------
typedef void (*ShowMembersFunc_t)(void *obj, TMemberInspector &R__insp);
class TVirtualIsAProxy;
typedef TClass *(*IsAGlobalFunc_t)(const TClass*, const void *obj);
// TBuffer.h declares and implements the following 2 operators
template <class Tmpl> TBuffer &operator>>(TBuffer &buf, Tmpl *&obj);
template <class Tmpl> TBuffer &operator<<(TBuffer &buf, const Tmpl *obj);
// This might get used if we implement setting a class version.
// template <class RootClass> Short_t GetClassVersion(RootClass *);
namespace ROOT {
class TGenericClassInfo;
typedef void *(*NewFunc_t)(void *);
typedef void *(*NewArrFunc_t)(Long_t size, void *arena);
typedef void (*DelFunc_t)(void *);
typedef void (*DelArrFunc_t)(void *);
typedef void (*DesFunc_t)(void *);
typedef void (*DirAutoAdd_t)(void *, TDirectory *);
typedef Long64_t (*MergeFunc_t)(void *, TCollection *, TFileMergeInfo *);
typedef void (*ResetAfterMergeFunc_t)(void *, TFileMergeInfo *);
template <class RootClass> Short_t SetClassVersion(RootClass *);
extern TClass *CreateClass(const char *cname, Version_t id,
const type_info &info, TVirtualIsAProxy *isa,
ShowMembersFunc_t show,
const char *dfil, const char *ifil,
Int_t dl, Int_t il);
extern void AddClass(const char *cname, Version_t id, const type_info &info,
VoidFuncPtr_t dict, Int_t pragmabits);
extern void RemoveClass(const char *cname);
extern void ResetClassVersion(TClass*, const char*, Short_t);
extern TNamed *RegisterClassTemplate(const char *name,
const char *file, Int_t line);
#if 0
// This function is only implemented in the dictionary file.
// The parameter is 'only' for overloading resolution.
// Used to be a template <class T> TGenericClassInfo *GenerateInitInstance(const T*);
template <class T> TGenericClassInfo *GetClassInfo(const T* t) {
TGenericClassInfo *GenerateInitInstance(const T*);
return CreateInitInstance(t);
};
#endif
class TInitBehavior {
// This class defines the interface for the class registration and
// the TClass creation. To modify the default behavior, one would
// inherit from this class and overload ROOT::DefineBehavior().
// See TQObject.h and table/inc/Ttypes.h for examples.
public:
virtual ~TInitBehavior() { }
virtual void Register(const char *cname, Version_t id, const type_info &info,
VoidFuncPtr_t dict, Int_t pragmabits) const = 0;
virtual void Unregister(const char *classname) const = 0;
virtual TClass *CreateClass(const char *cname, Version_t id,
const type_info &info, TVirtualIsAProxy *isa,
ShowMembersFunc_t show,
const char *dfil, const char *ifil,
Int_t dl, Int_t il) const = 0;
};
class TDefaultInitBehavior : public TInitBehavior {
public:
virtual void Register(const char *cname, Version_t id, const type_info &info,
VoidFuncPtr_t dict, Int_t pragmabits) const {
ROOT::AddClass(cname, id, info, dict, pragmabits);
}
virtual void Unregister(const char *classname) const {
ROOT::RemoveClass(classname);
}
virtual TClass *CreateClass(const char *cname, Version_t id,
const type_info &info, TVirtualIsAProxy *isa,
ShowMembersFunc_t show,
const char *dfil, const char *ifil,
Int_t dl, Int_t il) const {
return ROOT::CreateClass(cname, id, info, isa, show, dfil, ifil, dl, il);
}
};
const TInitBehavior *DefineBehavior(void * /*parent_type*/,
void * /*actual_type*/);
} // End of namespace ROOT
// The macros below use TGenericClassInfo, so let's ensure it is included
#ifndef ROOT_TGenericClassInfo
#include "TGenericClassInfo.h"
#endif
// Common part of ClassDef definition.
// DeclFileLine() is not part of it since CINT uses that as trigger for
// the class comment string.
#define _ClassDef_(name,id) \
private: \
static TClass *fgIsA; \
public: \
static TClass *Class(); \
static const char *Class_Name(); \
static Version_t Class_Version() { return id; } \
static void Dictionary(); \
virtual TClass *IsA() const { return name::Class(); } \
virtual void ShowMembers(TMemberInspector&); \
virtual void Streamer(TBuffer&); \
void StreamerNVirtual(TBuffer&ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
static const char *DeclFileName() { return __FILE__; } \
static int ImplFileLine(); \
static const char *ImplFileName();
// Version without any virtual functions.
#define _ClassDefNV_(name,id) \
private: \
static TClass *fgIsA; \
public: \
static TClass *Class(); \
static const char *Class_Name(); \
static Version_t Class_Version() { return id; } \
static void Dictionary(); \
TClass *IsA() const { return name::Class(); } \
void ShowMembers(TMemberInspector&); \
void Streamer(TBuffer&); \
void StreamerNVirtual(TBuffer &ClassDef_StreamerNVirtual_b) { name::Streamer(ClassDef_StreamerNVirtual_b); } \
static const char *DeclFileName() { return __FILE__; } \
static int ImplFileLine(); \
static const char *ImplFileName();
#if !defined(R__CONCRETE_INPUT_OPERATOR)
#if !defined(R__ACCESS_IN_SYMBOL) || defined(__CINT__)
#define ClassDef(name,id) \
_ClassDef_(name,id) \
static int DeclFileLine() { return __LINE__; }
#define ClassDefNV(name,id) \
_ClassDefNV_(name,id) \
static int DeclFileLine() { return __LINE__; }
#else
#define ClassDef(name,id) \
_ClassDef_(name,id) \
friend void ROOT__ShowMembersFunc(name*, TMemberInspector&); \
static int DeclFileLine() { return __LINE__; }
#define ClassDefNV(name,id) \
_ClassDefNV_(name,id) \
friend void ROOT__ShowMembersFunc(name*, TMemberInspector&); \
static int DeclFileLine() { return __LINE__; }
#endif
#else
#define ClassDef(name,id) \
_ClassDef_(name,id) \
friend TBuffer &operator>>(TBuffer&, name *&); \
friend TBuffer &operator>>(TBuffer&, const name *&); \
static int DeclFileLine() { return __LINE__; }
#define ClassDefNV(name,id) \
_ClassDefNV_(name,id) \
friend TBuffer &operator>>(TBuffer&, name *&); \
friend TBuffer &operator>>(TBuffer&, const name *&); \
static int DeclFileLine() { return __LINE__; }
#endif
#define R__UseDummy(name) \
class _NAME2_(name,_c) { public: _NAME2_(name,_c)() { if (name) { } } }
#if defined(__CINT__)
#define ClassImpUnique(name,key)
#define ClassImp(name)
#else
#define ClassImpUnique(name,key) \
namespace ROOT { \
TGenericClassInfo *GenerateInitInstance(const name*); \
static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
GenerateInitInstance((name*)0x0)->SetImplFile(__FILE__, __LINE__); \
R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
}
#define ClassImp(name) ClassImpUnique(name,default)
#endif
// Macro for Namespace
#if defined(__CINT__)
#define NamespaceImpUnique(name,key)
#define NamespaceImp(name)
#else
#define NamespaceImpUnique(name,key) \
namespace name { \
namespace ROOT { \
::ROOT::TGenericClassInfo *GenerateInitInstance(); \
static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
GenerateInitInstance()->SetImplFile(__FILE__, __LINE__); \
R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyint,key))); \
} \
}
#define NamespaceImp(name) NamespaceImpUnique(name,default)
#endif
//---- ClassDefT macros for templates with one template argument ---------------
// ClassDefT corresponds to ClassDef
// ClassDefT2 goes in the same header as ClassDefT but must be
// outside the class scope
// ClassImpT corresponds to ClassImp
// This ClassDefT is stricly redundant and is kept only for
// backward compatibility. Using #define ClassDef ClassDefT is confusing
// the CINT parser.
#if !defined(R__ACCESS_IN_SYMBOL) || defined(__CINT__)
#define ClassDefT(name,id) \
_ClassDef_(name,id) \
static int DeclFileLine() { return __LINE__; }
#define ClassDefTNV(name,id) \
_ClassDefNV_(name,id) \
static int DeclFileLine() { return __LINE__; }
#else
#define ClassDefT(name,id) \
_ClassDef_(name,id) \
friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp); \
static int DeclFileLine() { return __LINE__; }
#define ClassDefTNV(name,id) \
_ClassDefNV_(name,id) \
friend void ROOT__ShowMembersFunc(name *obj, TMemberInspector &R__insp); \
static int DeclFileLine() { return __LINE__; }
#endif
#define ClassDefT2(name,Tmpl)
#if defined(__CINT__)
#define templateClassImpUnique(name,key)
#define templateClassImp(name)
#else
#define templateClassImpUnique(name,key) \
namespace ROOT { \
static TNamed *_R__UNIQUE_(_NAME2_(R__dummyholder,key)) = \
ROOT::RegisterClassTemplate(_QUOTE_(name), __FILE__, __LINE__); \
R__UseDummy(_R__UNIQUE_(_NAME2_(R__dummyholder,key))); \
}
#define templateClassImp(name) templateClassImpUnique(name,default)
#endif
#define ClassImpT(name,Tmpl) templateClassImp(name)
//---- ClassDefT macros for templates with two template arguments --------------
// ClassDef2T2 goes in the same header as ClassDefT but must be
// outside the class scope
// ClassImp2T corresponds to ClassImpT
#define ClassDef2T2(name,Tmpl1,Tmpl2)
#define ClassImp2T(name,Tmpl1,Tmpl2) templateClassImp(name)
//---- ClassDefT macros for templates with three template arguments ------------
// ClassDef3T2 goes in the same header as ClassDefT but must be
// outside the class scope
// ClassImp3T corresponds to ClassImpT
#define ClassDef3T2(name,Tmpl1,Tmpl2,Tmpl3)
#define ClassImp3T(name,Tmpl1,Tmpl2,Tmpl3) templateClassImp(name)
//---- Macro to set the class version of non instrumented classes --------------
#define RootClassVersion(name,VersionNumber) \
namespace ROOT { \
TGenericClassInfo *GenerateInitInstance(const name*); \
static Short_t _R__UNIQUE_(R__dummyVersionNumber) = \
GenerateInitInstance((name*)0x0)->SetVersion(VersionNumber); \
R__UseDummy(_R__UNIQUE_(R__dummyVersionNumber)); \
}
#if defined(__CINT__)
#define RootStreamer(name,STREAMER)
#else
#define RootStreamer(name,STREAMER) \
namespace ROOT { \
TGenericClassInfo *GenerateInitInstance(const name*); \
static Short_t _R__UNIQUE_(R__dummyStreamer) = \
GenerateInitInstance((name*)0x0)->SetStreamer(STREAMER); \
R__UseDummy(_R__UNIQUE_(R__dummyStreamer)); \
}
#endif
#endif
|