Ignore:
Timestamp:
07/14/08 20:59:13 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r8958 r8999  
    3232#pragma link C++ class MIter+;
    3333#pragma link C++ class MDirIter+;
    34 #pragma link C++ class MRunIter+;
     34//#pragma link C++ class MRunIter+;
    3535#pragma link C++ class MThread+;
    3636
  • trunk/MagicSoft/Mars/mbase/MString.cc

    r7887 r8999  
    1818!   Author(s): Thomas Bretz, 3/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2004
     20!   Copyright: MAGIC Software Development, 2000-2008
    2121!
    2222!
     
    4444/////////////////////////////////////////////////////////////////////////////
    4545#include "MString.h"
     46
     47#include <stdarg.h>
    4648
    4749ClassImp(MString);
     
    9799//  string.Print("  MyString has %d bytes  ", 128).Strip(TString::kBoth);
    98100//
     101/*
    99102MString &MString::Print(const char *fmt, ...)
    100103{
     
    104107    return Print(fmt, ap);
    105108}
     109*/
    106110
    107111// --------------------------------------------------------------------------
     
    120124// M/TString.
    121125//
    122 MString MString::Format(const char *fmt, ...)
     126#if ROOT_VERSION_CODE<ROOT_VERSION(5,18,00)
     127TString MString::Format(const char *fmt, ...)
    123128{
    124129    va_list ap;
     
    129134    return ret;
    130135}
     136#endif
    131137
    132138// --------------------------------------------------------------------------
     
    135141// TString::Form didn't exist.
    136142//
     143/*
    137144void MString::Form(const char *fmt, ...)
    138145{
     
    142149    Print(fmt, ap);
    143150}
     151*/
  • trunk/MagicSoft/Mars/mbase/MString.h

    r7889 r8999  
    66#endif
    77
    8 #include <stdio.h>
    9 #include <stdarg.h>
    10 
    118class MString : public TString
    129{
     10private:
     11    MString &Print(const char *fmt, va_list &ap);
     12//    MString &Print(const char *fmt, ...);
     13
    1314public:
    1415    MString(const char *txt=0)  : TString(txt) { }
    15     MString(const MString &txt) : TString(txt) { }
    16 
    17     MString &Print(const char *fmt, va_list &ap);
    18     MString &Print(const char *fmt, ...);
     16    MString(const TString &txt) : TString(txt) { }
    1917
    2018#ifndef __CINT__
    21     static MString Format(const char *fmt, ...);
     19#if ROOT_VERSION_CODE<ROOT_VERSION(5,18,00)
     20    static TString Format(const char *fmt, ...);
     21#endif
    2222#endif
    2323
    24     void Form(const char *fmt, ...);
     24    //void Form(const char *fmt, ...);
    2525
    26     ClassDef(MString, 1) // Tool to make Form() thread safe against other TStrings
     26    ClassDef(MString, 1) // Tool to make Form() thread safe against other TStrings for root prior 5.18.00
    2727};
    2828
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r8996 r8999  
    403403        return kFALSE;
    404404
    405     UInt_t y, mon, d, h, m, s;
    406     const Int_t n = sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u",
    407                            &y, &mon, &d, &h, &m, &s);
    408 
    409     return n==6 ? Set(y, mon, d, h, m, s) : kFALSE;
     405    UInt_t  y, mon, d, h, m, s;
     406    if (6==sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u", &y, &mon, &d, &h, &m, &s))
     407        return Set(y, mon, d, h, m, s);
     408
     409    if (3==sscanf(str, "%04u-%02u-%02u", &y, &mon, &d))
     410        return Set(y, mon, d);
     411
     412    return kFALSE;
    410413}
    411414
  • trunk/MagicSoft/Mars/mbase/Makefile

    r8892 r8999  
    4343           MIter.cc \
    4444           MDirIter.cc \
    45            MRunIter.cc \
    4645           MReadSocket.cc \
    4746           MGGroupFrame.cc \
Note: See TracChangeset for help on using the changeset viewer.