Ignore:
Timestamp:
01/11/05 16:46:58 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtrigger
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtrigger/MTriggerPattern.h

    r5725 r5803  
    2727
    2828public:
    29     MTriggerPattern(const char *name, const char *title);
     29    MTriggerPattern(const char *name=0, const char *title=0);
     30
     31    void Reset() { fPrescaled=0; fUnprescaled=0; }
    3032
    3133    Byte_t GetPrescaled() const   { return fPrescaled; }
  • trunk/MagicSoft/Mars/mtrigger/MTriggerPatternDecode.cc

    r5725 r5803  
    1717!
    1818!   Author(s): Nicola Galante  12/2004 <mailto:nicola.galante@pi.infn.it>
    19 !   Author(s): Nicola Galante 12/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!   Author(s): Thomas Bretz 12/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    2020!
    2121!   Copyright: MAGIC Software Development, 2004
     
    4343#include "MParList.h"
    4444#include "MRawEvtHeader.h"
     45#include "MRawRunHeader.h"
    4546#include "MTriggerPattern.h"
    4647
     
    5455//
    5556MTriggerPatternDecode::MTriggerPatternDecode(const char *name, const char *title)
     57    : fRunHeader(0), fEvtHeader(0), fPattern(0)
    5658{
    5759    fName  = name  ? name  : "MTriggerPatternDecode";
     
    6365Int_t MTriggerPatternDecode::PreProcess(MParList *pList)
    6466{
     67    fRunHeader = (MRawRunHeader*)pList->FindCreateObj("MRawRunHeader");
     68    if (!fRunHeader)
     69    {
     70        *fLog << err << "MRawRunHeader not found... abort." << endl;
     71        return kFALSE;
     72    }
     73
    6574    fEvtHeader = (MRawEvtHeader *)pList->FindObject("MRawEvtHeader");
    6675    if (!fEvtHeader)
     
    8493Int_t MTriggerPatternDecode::Process()
    8594{
     95    if (fRunHeader->GetFormatVersion()<5)
     96        return kTRUE;
     97
    8698    UInt_t pattern = ~fEvtHeader->GetTriggerID();
    8799
  • trunk/MagicSoft/Mars/mtrigger/MTriggerPatternDecode.h

    r5725 r5803  
    22#define MARS_MTriggerPatternDecode
    33
    4 /////////////////////////////////////////////////////////////////////////////
    5 //                                                                         //
    6 // MTriggerPatternDecode
    7 //
    8 // auth. N.Galante
    9 // created 17.11.04                                                       //
    10 //                                                                         //
    11 /////////////////////////////////////////////////////////////////////////////
    12 
    13 #ifndef MARS_MFilter
    14 #include "MFilter.h"
     4#ifndef MARS_MTask
     5#include "MTask.h"
    156#endif
    167
    178class MParList;
    189class MRawEvtHeader;
     10class MRawRunHeader;
    1911class MTriggerPattern;
    2012
    21 class MTriggerPatternDecode : public MFilter
     13class MTriggerPatternDecode : public MTask
    2214{
    2315private:
    24 //  enum pattern {PLT1=1, PCAL=2, PLT2=4, PPED=8, PPIND=16,
    25 //              ULT1=256, UCAL=512, ULT2=1024, UPED=2048, UPIND=4096};
     16    MRawRunHeader   *fRunHeader;
     17    MRawEvtHeader   *fEvtHeader;
     18    MTriggerPattern *fPattern;
    2619
    27    MRawEvtHeader   *fEvtHeader;
    28    MTriggerPattern *fPattern;
    29 
    30 //  UInt_t fMaskAllowed;   // Mask for filtering Trigger Pattern allowed
    31 //  UInt_t fMaskDenied;    // Mask for filtering Trigger Pattern denied
    32 //  UInt_t fPattern;       // Trigger Pattern stored into event
    33 //  UInt_t fMachArch;     
    34 
    35 //  Bool_t fBitInv;        // Flag to invert bits of Pattern (1=yes,0=no)
    36                          // default 1=yes
    37   //Bool_t fPrescaled;     // Flag to set if using prescaled (=1) or
    38                          // unprescaled (=0) pattern. Default 1
    39 //  Bool_t fResult;
    40 
    41   Int_t PreProcess(MParList *pList);
    42   Int_t Process();
     20    Int_t PreProcess(MParList *pList);
     21    Int_t Process();
    4322
    4423public:
     24    MTriggerPatternDecode(const char *name=0, const char *title=0);
    4525
    46   MTriggerPatternDecode(const char *name, const char *title);
    47   MTriggerPatternDecode(MTriggerPatternDecode &trigpatt);
    48 
    49 //  Bool_t IsExpressionTrue() const;
    50 
    51 //  void AllowPresTrigger(TString patt);
    52 //  void DenyPresTrigger(TString patt);
    53 //  void AllowUnpresTrigger(TString patt);
    54 //  void DenyUnpresTrigger(TString patt);
    55 //
    56 ////  UInt_t GetMaskAllowed() const { return fMaskAllowed; };
    57 //  UInt_t GetMaskDenied() const { return fMaskDenied; };
    58   //Bool_t GetPrescaled() const { return fPrescaled; };
    59 //  Bool_t GetBitInv() const { return fBitInv; }
    60 
    61 //  void SetBitInv(const Bool_t inv) { fBitInv = inv; }
    62   //void SetPrescaled() { fPrescaled = kTRUE; };
    63   //void SetUnprescaled() { fPrescaled = kFALSE; };
    64 
    65   // Low level settings. USE THESE ONLY IF YOU ARE AN EXPERT!
    66 //  void SetMaskAllowed(const UInt_t mask) { fMaskAllowed = mask; }
    67 //  void SetMaskDenied(const UInt_t mask) { fMaskDenied = mask; }
    68 
    69   ClassDef(MTriggerPatternDecode, 1) // Task to decode the Trigger Pattern
     26    ClassDef(MTriggerPatternDecode, 1) // Task to decode the Trigger Pattern
    7027};
    7128
Note: See TracChangeset for help on using the changeset viewer.