29#include "ha_compiledata.h"
51 void* options,
int numOptions,
Bool_t noLogo ) :
52 TRint( appClassName, argc, argv, options, numOptions, true )
59 Error(
"THaInterface",
"only one instance of THaInterface allowed");
77 gHaTextvars =
new Podd::Textvars;
83 TTree::SetMaxTreeSize(1500000000);
91 s = HA_INCLUDEPATH
"";
100 s = s+
"/src " + s+
"/hana_decode ";
147 delete gHaTextvars; gHaTextvars=
nullptr;
163 static const char* months[] = {
"???",
"Jan",
"Feb",
"Mar",
"Apr",
"May",
164 "Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"};
165 const char* root_version =
gROOT->GetVersion();
167 Int_t iday = idatqq%100;
168 Int_t imonth = (idatqq/100)%100;
169 if( imonth < 1 || imonth > 12 )
171 Int_t iyear = (idatqq/10000);
174 mille = 2000 + iyear;
175 else if ( iyear < 1900 )
176 mille = 1900 + iyear;
178 ostr << setw(2) << setfill(
'0') << iday << setfill(
' ');
179 ostr <<
" " << months[imonth] <<
" " << mille;
180 TString tmp(ostr.str().c_str());
181 const char* root_date = tmp.
Data();
184 Printf(
" ************************************************");
186 Printf(
" * W E L C O M E to the *");
187 Printf(
" * H A L L A C++ A N A L Y Z E R *");
190 Printf(
" * Based on ROOT %10s %18s *", root_version, root_date);
191 if( strstr(HA_VERSION
"",
"-dev") || strstr(HA_VERSION
"",
"alpha") ||
192 strstr(HA_VERSION
"",
"beta") || strstr(HA_VERSION
"",
"rc") )
193 Printf(
" * Development version *");
195 Printf(
" * For information visit *");
196 Printf(
" * https://redmine.jlab.org/projects/podd/wiki/ *");
198 Printf(
" ************************************************");
215 return HA_VERSION
"";
225 while( (pos =
d.Index(
" ", pos)) !=
kNPOS ) {
229 while(
d[++pos] ==
' ' );
242 bool use_buildtime =
true;
243 size_t len = strlen(HA_GITREV
"");
245 const char* gitrev = HA_GITREV
"";
246 use_buildtime = (
len > 6 && strcmp(gitrev +
len - 6,
"-dirty") == 0);
253 return ha_date.
Data();
263 if( version_string.
IsNull() ) {
265 ostr <<
"Podd " << HA_VERSION
"";
266 if( strlen(HA_GITREV
"") > 0 )
267 ostr <<
" git@" << HA_GITREV
"";
269 ostr <<
"Built for " << HA_OSVERS
"";
270 ostr <<
" using " << HA_CXXSHORTVERS
"";
271 if( strlen(HA_ROOTVERS
"") )
272 ostr <<
", ROOT " << HA_ROOTVERS
"";
273 version_string = ostr.str().c_str();
275 return version_string.
Data();
285 const char*
const here =
"THaInterface::SetDecoder";
291 if( !
c->InheritsFrom(
"THaEvData")) {
292 ::Error(
here,
"decoder class must inherit from THaEvData");
309 if( s.
Index(
"root") == 0 )
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
R__EXTERN class TList * gHaEvtHandlers
R__EXTERN class TList * gHaApps
R__EXTERN class THaVarList * gHaVars
R__EXTERN class TList * gHaPhysics
R__EXTERN class TClass * gHaDecoder
R__EXTERN class THaCutList * gHaCuts
static const char *const here
void Printf(const char *fmt,...)
R__EXTERN TSystem * gSystem
static THaAnalyzer * GetInstance()
THaInterface(const char *appClassName, int *argc, char **argv, void *options=nullptr, int numOptions=0, Bool_t noLogo=false)
static const char * GetVersion()
virtual void PrintLogo(Bool_t lite=false)
static const char * GetVersionString()
static TClass * GetDecoder()
static TString extract_short_date(const char *long_date)
static TClass * SetDecoder(TClass *c)
static const char * GetHaDate()
virtual const char * SetPrompt(const char *newPrompt)
static THaInterface * fgAint
virtual void Error(const char *method, const char *msgfmt,...) const
virtual const char * SetPrompt(const char *newPrompt)
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
const char * Data() const
TString & Remove(EStripType s, char c)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void FreeDirectory(void *dirp)
virtual void * OpenDirectory(const char *name)
virtual const char * Getenv(const char *env)
virtual void Setenv(const char *name, const char *value)