Index: trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 6358)
+++ trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 6365)
@@ -138,6 +138,7 @@
 static int Data_From_STDIN = FALSE;
 
-//@: flag: TRUE: write all images to output; FALSE: only triggered showers
-static int Write_All_Images = FALSE;
+//@: flag: TRUE: write the event headers of all events to output; 
+//@:       FALSE: only triggered showers
+static int Write_All_Event_Headers = FALSE;
 
 static int Write_McEvt  = TRUE;
@@ -638,5 +639,5 @@
   // write all images, even those without trigger?
 
-  Write_All_Images = get_write_all_events();
+  Write_All_Event_Headers = get_write_all_event_headers();
 
   Write_McEvt  = get_write_McEvt()  ; 
@@ -806,8 +807,8 @@
   
   log(SIGNATURE,
-      "%s:\n\t%20s: %s\n\t%20s: %s\n\t%20s: %s\n\t%20s: %s\n\t\t %s %3.2f,\n\t\t %s %3.2f (%s), %3.2f (%s) \n\t\t + %3.2f (%s)\n\n",
+      "%s:\n\t%23s: %s\n\t%23s: %s\n\t%23s: %s\n\t%23s: %s\n\t\t %s %3.2f,\n\t\t %s %3.2f (%s), %3.2f (%s) \n\t\t + %3.2f (%s)\n\n",
       "Flags",
       "Data_From_STDIN",   ONoff(Data_From_STDIN),  
-      "Write_All_Events",  ONoff(Write_All_Images), 
+      "Write_All_Event_Headers",  ONoff(Write_All_Event_Headers), 
       "Rotate Starfield",  ONoff(Starfield_rotate),
       "Electronic Noise",  ONoff(addElecNoise), 
@@ -2206,5 +2207,5 @@
 
 		    Lev0=(Short_t) Trigger_CT[0]->ZeroLevel();
-		    if (Lev0>0 || Write_All_Images || btrigger)
+		    if (Lev0>0 || Write_All_Event_Headers || btrigger)
 		      {
 		
@@ -2246,5 +2247,5 @@
 			    Lev0=1;
 			    Int_t NumImages = Lev1;
-			    if(Lev1==0 && (Write_All_Images || btrigger))
+			    if(Lev1==0 && (Write_All_Event_Headers || btrigger))
 			      {
 				btrigger= 1;
@@ -2281,5 +2282,5 @@
 				      SetTriggerPattern((UInt_t)MTriggerPattern::kTriggerLvl1);
 				    //   fill pixel information
-				    if (Lev1 || Write_All_Images){
+				    if (Lev1 /*|| Write_All_Event_Headers AMTEST*/){
 				      if (addElecNoise) Fadc_CT[0]->DigitalNoise();
 				      for(UInt_t i=0;
@@ -2473,5 +2474,5 @@
 	    //
 	  
-	    if ( Lev0MT[ict] > 0 || Write_All_Images)
+	    if ( Lev0MT[ict] > 0 /*|| Write_All_Event_Headers*/)
 	      Lev1MT[ict]= Trigger_CT[ict]->FirstLevel();
 
@@ -2490,5 +2491,5 @@
 	      Lev0MT[ict]=1;
 
-	      if (Lev1MT[ict]==0 && Write_All_Images)
+	      if (Lev1MT[ict]==0 && Write_All_Event_Headers)
 		{
 		  NumImages=1;
@@ -2540,5 +2541,5 @@
 		//   fill pixel information
 	      
-		if (Lev1MT[ict] || Write_All_Images){
+		if (Lev1MT[ict] /* || Write_All_Event_Headers */){
 		   if (addElecNoise) Fadc_CT[ict]->DigitalNoise();
 		  for(UInt_t i=0;
@@ -2823,5 +2824,5 @@
 		    ftime,
 		    icontrigger,
-		    !Write_All_Images,
+		    !Write_All_Event_Headers,
 		    Write_McEvt,
 		    Write_McTrig,
@@ -2860,5 +2861,5 @@
 		    ftime,
 		    icontrigger,
-		    !Write_All_Images,
+		    !Write_All_Event_Headers,
 		    Write_McEvt,
 		    Write_McTrig,
@@ -4982,4 +4983,11 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.86  2005/02/10 14:49:21  moralejo
+//
+// Added setting of trigger flags in MRawEvtHeader::fTriggerPattern:
+// Lvl1 flag for normal shower runs, Calibration flag for calibration
+// runs and Pedestal flag for "calibration runs" in which the number
+// of photons per pixel is set to 0.
+//
 // Revision 1.85  2005/02/10 12:00:32  moralejo
 //
Index: trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 6358)
+++ trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 6365)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.cxx,v $
-//= $Revision: 1.35 $
-//= $Author: MAGIC $ 
-//= $Date: 2004-12-15 01:56:39 $
+//= $Revision: 1.36 $
+//= $Author: moralejo $ 
+//= $Date: 2005-02-10 19:28:10 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -62,5 +62,5 @@
 static int nSkip=0;
 static int Data_From_STDIN = FALSE;
-static int Write_All_Images = FALSE;
+static int Write_All_Event_Headers = FALSE;
 static int Write_McEvt  = TRUE;
 static int Write_McTrig = FALSE;
@@ -424,8 +424,8 @@
       break;
 
-    case write_all_events:    //@< to write ALL the images
+    case write_all_event_headers:  //@< to write ALL the event headers
           
       // change boolean value
-      Write_All_Images = TRUE;
+      Write_All_Event_Headers = TRUE;
 
       break;
@@ -1092,7 +1092,8 @@
 
 //!-----------------------------------------------------------
-// @name write_all_events
-//                                                
-// @desc write all images to .phe, even those without trigger
+// @name write_all_event_headers
+//                                                
+// @desc write all event headers to output, even those without
+// trigger
 //
 // @return  TRUE: we'll write everything; FALSE: we won't
@@ -1104,7 +1105,7 @@
 //!@{
 int
-get_write_all_events(void)
-{
-  return ( Write_All_Images );
+get_write_all_event_headers(void)
+{
+  return ( Write_All_Event_Headers );
 }
 //!@}
@@ -1444,4 +1445,12 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.35  2004/12/15 01:56:39  MAGIC
+//
+//  Added input card option pmt_jitter_ns to simulate the time jitter of
+//  PMTs. The input parameter is the sigma of a gaussian, which by
+//  default is sigma=0.25 ns. This jitter is applied to each phe-
+//  independently. We have not applied this to the NSB noise, since the
+//  arrival time of NSB photons is random and nothing would change.
+//
 // Revision 1.34  2004/11/17 11:36:07  moralejo
 // *** empty log message ***
Index: trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h	(revision 6358)
+++ trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h	(revision 6365)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.h,v $
-//= $Revision: 1.31 $
-//= $Author: MAGIC $ 
-//= $Date: 2004-12-15 01:56:39 $
+//= $Revision: 1.32 $
+//= $Author: moralejo $ 
+//= $Date: 2005-02-10 19:28:10 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -91,5 +91,5 @@
 T(data_from_stdin), /* to read data from STDIN */ \
 T(skip),            /* skip pathological showers */ \
-T(write_all_events),/* write to file .phe ALL images (even w.o. trigger)*/ \
+T(write_all_event_headers),/* write to file .phe ALL event headers (even w.o. trigger)*/ \
 T(nowrite_McEvt),   /* nowrite to file .root McEvt infos */ \
 T(write_McTrig),    /* write to file .root McTrig infos */ \
@@ -171,5 +171,5 @@
 int get_nskip_showers( void ); 
 int get_data_from_stdin(void);
-int get_write_all_events(void);
+int get_write_all_event_headers(void);
 int get_write_McEvt(void);
 int get_write_McTrig(void);
@@ -216,4 +216,12 @@
 /*
  * $Log: not supported by cvs2svn $
+ * Revision 1.31  2004/12/15 01:56:39  MAGIC
+ *
+ *  Added input card option pmt_jitter_ns to simulate the time jitter of
+ *  PMTs. The input parameter is the sigma of a gaussian, which by
+ *  default is sigma=0.25 ns. This jitter is applied to each phe-
+ *  independently. We have not applied this to the NSB noise, since the
+ *  arrival time of NSB photons is random and nothing would change.
+ *
  * Revision 1.30  2004/11/17 11:36:07  moralejo
  * *** empty log message ***
