Changeset 4578


Ignore:
Timestamp:
08/11/04 13:42:50 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4577 r4578  
    3434     - added new commandline options to support different CC files
    3535     - changed help-output
     36     - temporarily removed SQL option
    3637
    3738   * readraw.cc:
     
    6465   * msql/MSQLServer.[h,cc]:
    6566     - small changes to interface
     67
     68   * mimage/MHillasCalc.[h,cc]:
     69     - changed names of TString data members
    6670
    6771
  • trunk/MagicSoft/Mars/merpp.cc

    r4575 r4578  
    6060    gLog << all << endl;
    6161    gLog << "Sorry the usage is:" << endl;
    62     gLog << "   merpp [-h] [-?] [-a] [-vn] [-cn] [-u, -f]" << endl;
    63     gLog << "         inputfile[.rep,[.raw],[.txt]] [outputfile[.root]]" << endl << endl;
    64     gLog << "     inputfile.raw:  Magic DAQ binary file." << endl;
    65     gLog << "     inputfile.rep:  Magic Central Control report file." << endl;
    66     gLog << "     inputfile.txt:  Magic DC currents file." << endl;
    67     gLog << "     ouputfile.root: Merpped root file." << endl;
    68     gLog << "     -c#                              Compression level #=1..9 [default=2]" << endl;
    69     gLog << "     -v#                              Verbosity level # [default=2]" << endl;
    70     gLog << "     -u, --update                     Update file" << endl;
    71     gLog << "     -a, --no-colors                  Do not use Ansii color codes" << endl;
    72     gLog << "     -f                               Force overwrite of an existing file" << endl;
    73     gLog << "     -ff                              Force merpp to ignore broken events <raw data only>" << endl;
    74     gLog << "     --interleave=#                   Process only each i-th event [default=1]  <raw data only>" << endl;
    75     gLog << "     --sql=mysql://user:password@url  Insert run into database <raw data only>" << endl;
    76     gLog << "     --start=yyyy-mm-dd/hh:mm:ss.mmm  Start event time for merpping report files" << endl;
    77     gLog << "     --stop=yyyy-mm-dd/hh:mm:ss.mmm   Stop  event time for merpping report files" << endl;
    78     gLog << "     --run=#                          Only data corresponding to this run number (from RUN-REPORT)" << endl;
    79     gLog << "     --runfile=#                      Check that CC file corresponds to this run (from .rep header)" << endl;
    80     gLog << "     --sumfile                        Check that CC file is a all night summary (from .rep header)" << endl;
    81     gLog << "     --allfiles                       Don't check file type for CC files <default>" << endl;
    82     gLog << "     --debug[=n]                      Enable root debugging (Default: gDebug=1)" << endl;
    83     gLog << "     -?, -h, --help                   This help" << endl << endl;
    84     gLog << "   REMARK: At the moment you can process a .raw _or_ a .rep file, only!" << endl << endl;
     62    gLog << " merpp [-h] [-?] [-a] [-vn] [-cn] [-u, -f]" << endl;
     63    gLog << "       inputfile[.rep,[.raw],[.txt]] [outputfile[.root]]" << endl << endl;
     64    gLog << " Arguments:" << endl;
     65    gLog << "   inputfile.raw:  Magic DAQ binary file." << endl;
     66    gLog << "   inputfile.rep:  Magic Central Control report file." << endl;
     67    gLog << "   inputfile.txt:  Magic DC currents file." << endl;
     68    gLog << "   ouputfile.root: Merpped root file." << endl << endl;
     69    gLog << " Options:" << endl;
     70    gLog << "   -c#                Compression level #=1..9 [default=2]" << endl;
     71    gLog << "   -v#                Verbosity level # [default=2]" << endl;
     72    gLog << "   -u, --update       Update file" << endl;
     73    gLog << "   -a, --no-colors    Do not use Ansii color codes" << endl;
     74    gLog << "   -f                 Force overwrite of an existing file" << endl;
     75    gLog << "   --debug[=n]        Enable root debugging (Default: gDebug=1)" << endl;
     76    gLog << "   -?, -h, --help     This help" << endl << endl;
     77    gLog << " Raw Data Options:" << endl;
     78    gLog << "   -ff                Force merpp to ignore broken events" << endl;
     79    gLog << "   --interleave=#     Process only each i-th event [default=1]" << endl << endl;
     80//    gLog << "   --sql=mysql://user:password@url  Insert run into database" << endl << endl;
     81    gLog << " Report File Options:" << endl;
     82    gLog << "   --start=date/time  Start event time" << endl;
     83    gLog << "   --stop=date/time   Stop  event time" << endl;
     84    gLog << "   --run=#            Only data corresponding to this run number" << endl;
     85    gLog << "                      (from RUN-REPORT)" << endl;
     86    gLog << "   --runfile=#        Allow only run-control files" << endl;
     87    gLog << "                      (from .rep header)" << endl;
     88    gLog << "   --sumfile          Check for an all night summary file" << endl;
     89    gLog << "                      (from .rep header)" << endl;
     90    gLog << "   --allfiles         Don't check file type <default>" << endl << endl;
     91    gLog << " REMARK: - At the moment you can process a .raw _or_ a .rep file, only!" << endl;
     92    gLog << "         - 'date/time' has the format 'yyyy-mm-dd/hh:mm:ss.mmm'" << endl << endl;
    8593}
    8694
     
    134142
    135143    const Int_t   kRunNumber   = arg.HasOption("--run=") ? arg.GetIntAndRemove("--run=") : -1;
    136     const TString kSqlDataBase(arg.GetStringAndRemove("--sql="));
     144//    const TString kSqlDataBase(arg.GetStringAndRemove("--sql="));
    137145
    138146    Int_t kRunFile = arg.HasOption("--runfile=") ? arg.GetIntAndRemove("--runfile=") : -1;
     
    180188        kNameout += ".root";
    181189
    182     if (!kSqlDataBase.IsNull() && !israw)
    183         gLog << warn << "WARNING - Option '--sql=' only valid for raw-files... ignored." << endl;
     190//    if (!kSqlDataBase.IsNull() && !israw)
     191//        gLog << warn << "WARNING - Option '--sql=' only valid for raw-files... ignored." << endl;
    184192
    185193    //
     
    326334    if (filter)
    327335        tasks.AddToList(filter);
     336    /*
    328337    if (israw && !kSqlDataBase.IsNull())
    329338    {
     
    331340        ins->SetUpdate();
    332341        tasks.AddToList(ins);
    333     }
     342    }*/
    334343    tasks.AddToList(write);
    335344
  • trunk/MagicSoft/Mars/mimage/MHillasCalc.cc

    r3682 r4578  
    8080//
    8181MHillasCalc::MHillasCalc(const char *name, const char *title)
    82     : fHilName("MHillas"), fHilExtName("MHillasExt"),
    83     fImgParName("MNewImagePar"), fConcName("MConcentration"),
     82    : fNameHillas("MHillas"), fNameHillasExt("MHillasExt"),
     83    fNameNewImgPar("MNewImagePar"), fNameConc("MConcentration"),
    8484    fFlags(0xff), fErrors(5)
    8585{
     
    115115    // depend on whether MHillas is an in- or output container
    116116    if (TestFlag(kCalcHillas))
    117         fHillas = (MHillas*)pList->FindCreateObj("MHillas", AddSerialNumber(fHilName));
     117        fHillas = (MHillas*)pList->FindCreateObj("MHillas", AddSerialNumber(fNameHillas));
    118118    else
    119119    {
    120         fHillas = (MHillas*)pList->FindObject(AddSerialNumber(fHilName), "MHillas");
    121         *fLog << err << fHilName << " [MHillas] not found... aborting." << endl;
     120        fHillas = (MHillas*)pList->FindObject(AddSerialNumber(fNameHillas), "MHillas");
     121        *fLog << err << fNameHillas << " [MHillas] not found... aborting." << endl;
    122122    }
    123123    if (!fHillas)
     
    127127    if (TestFlag(kCalcHillasExt))
    128128    {
    129         fHillasExt = (MHillasExt*)pList->FindCreateObj("MHillasExt", AddSerialNumber(fHilExtName));
     129        fHillasExt = (MHillasExt*)pList->FindCreateObj("MHillasExt", AddSerialNumber(fNameHillasExt));
    130130        if (!fHillasExt)
    131131            return kFALSE;
     
    135135    if (TestFlag(kCalcNewImagePar))
    136136    {
    137         fNewImgPar = (MNewImagePar*)pList->FindCreateObj("MNewImagePar", AddSerialNumber(fImgParName));
     137        fNewImgPar = (MNewImagePar*)pList->FindCreateObj("MNewImagePar", AddSerialNumber(fNameNewImgPar));
    138138        if (!fNewImgPar)
    139139            return kFALSE;
     
    143143    if (TestFlag(kCalcConc))
    144144    {
    145         fConc = (MConcentration*)pList->FindCreateObj("MConcentration", fConcName);
     145        fConc = (MConcentration*)pList->FindCreateObj("MConcentration", fNameConc);
    146146        if (!fConc)
    147147            return kFALSE;
    148148    }
    149149
    150    memset(fErrors.GetArray(), 0, sizeof(Char_t)*fErrors.GetSize());
     150    memset(fErrors.GetArray(), 0, sizeof(Char_t)*fErrors.GetSize());
    151151
    152152    return kTRUE;
  • trunk/MagicSoft/Mars/mimage/MHillasCalc.h

    r3526 r4578  
    2929    const MCerPhotEvt *fCerPhotEvt; //! Cerenkov Photon Event used for calculation
    3030
    31     MHillas      *fHillas;          //! output container to store result
    32     MHillasExt   *fHillasExt;       //! output container to store result
    33     MNewImagePar *fNewImgPar;       //! output container to store result
    34     MConcentration *fConc;          //! output container to store result
     31    MHillas           *fHillas;     //! output container to store result
     32    MHillasExt        *fHillasExt;  //! output container to store result
     33    MNewImagePar      *fNewImgPar;  //! output container to store result
     34    MConcentration    *fConc;       //! output container to store result
    3535
    36     TString      fHilName;          // name of the 'MHillas' container
    37     TString      fHilExtName;      // name of the 'MHillasExt' container
    38     TString      fImgParName;      // name of the 'MNewImagePar' container
    39     TString      fConcName;         // name of the 'MConcentration' container
     36    TString            fNameHillas;    // name of the 'MHillas' container
     37    TString            fNameHillasExt; // name of the 'MHillasExt' container
     38    TString            fNameNewImgPar; // name of the 'MNewImagePar' container
     39    TString            fNameConc;      // name of the 'MConcentration' container
    4040
    41     Int_t        fFlags;            // Flags defining the behaviour of MHillasCalc
     41    Int_t              fFlags;      // Flags defining the behaviour of MHillasCalc
    4242
    43     TArrayL      fErrors;           //! Error counter. Do we have to change to Double?
     43    TArrayL            fErrors;     //! Error counter. Do we have to change to Double?
    4444
    45     void PrintSkipped(int i, const char *str) const;
     45    void  PrintSkipped(int i, const char *str) const;
    4646
    4747    Int_t PreProcess(MParList *pList);
     
    6060    MHillasCalc(const char *name=NULL, const char *title=NULL);
    6161
    62     void SetNameHillas(const char *name)    { fHilName = name;    }
    63     void SetNameHillasExt(const char *name) { fHilExtName = name; }
    64     void SetNameNewImgPar(const char *name) { fImgParName = name; }
    65     void SetNameConc(const char *name) { fConcName = name; }
     62    void   SetNameHillas(const char *name)    { fNameHillas = name;    }
     63    void   SetNameHillasExt(const char *name) { fNameHillasExt = name; }
     64    void   SetNameNewImgPar(const char *name) { fNameNewImgPar = name; }
     65    void   SetNameConc(const char *name)      { fNameConc = name;      }
    6666
    67     void SetFlags(Int_t f) { fFlags  =  f; }
    68     void Enable(Int_t f)   { fFlags |=  f; }
    69     void Disable(Int_t f)  { fFlags &= ~f; }
     67    void   SetFlags(Int_t f) { fFlags  =  f; }
     68    void   Enable(Int_t f)   { fFlags |=  f; }
     69    void   Disable(Int_t f)  { fFlags &= ~f; }
    7070    Bool_t TestFlag(CalcCont_t i) const { return fFlags&i; }
    7171
Note: See TracChangeset for help on using the changeset viewer.