Index: trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc	(revision 3389)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc	(revision 3483)
@@ -84,5 +84,5 @@
 // Trigger Pattern used for this event
 // Each event triggers for a particular configuration and each  
-// configuration shoul have an ID (which is not fixed yet).
+// configuration should have an ID (which is not fixed yet).
 //
 // UShort_t fAllLowGainOn
@@ -332,2 +332,31 @@
 }
 
+// --------------------------------------------------------------------------
+//
+//   Low level decoding of the trigger pattern.
+//   The trigger pattern consists of 16 bits (8+8 bits) generated by the 
+//   trigger system.
+//   The first 8 bits correspond to the trigger configuration before the
+//   prescaling, the others after prescaling.
+//   The meaning of the configuration depends on the chosen trigger table
+//   (that is how the trigger has been programmed) and must be interpreted 
+//    at higher level by the analysis. 
+//   Bit structure:
+//          not prscd | prscaled
+//           xxxx xxxx xxxx xxxx    <-- pattern (x=0,1)
+//     bit   7654 3210 7654 3210
+//          H                   L
+//
+//    e.g.   1000 0000 1000 1000 (hex: 8080) is the pattern when no
+//         L2 trigger selection and no prescaling is applied. 
+//       
+//    Up to now only fTrigPattern[0] is used.
+//
+UInt_t MRawEvtHeader::GetTriggerID() const
+{
+  UInt_t trigID=0;
+
+  trigID = fTrigPattern[0];
+
+  return trigID;
+}
Index: trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h	(revision 3389)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h	(revision 3483)
@@ -62,4 +62,6 @@
     UInt_t   GetNumTrigLvl2() const  { return fNumTrigLvl2; }
     UInt_t   GetDAQEvtNumber() const { return fDAQEvtNumber; }
+    
+    UInt_t GetTriggerID() const;
 
     int ReadEvt(istream& fin, UShort_t ver);
