Ignore:
Timestamp:
07/04/00 15:13:02 (24 years ago)
Author:
MagicSol
Message:
It reads from the general input card the parameters for the
trigger analysi.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx

    r390 r409  
    1919//=
    2020//= $RCSfile: creadparam.cxx,v $
    21 //= $Revision: 1.4 $
    22 //= $Author: blanch $
    23 //= $Date: 2000-05-11 14:22:33 $
     21//= $Revision: 1.5 $
     22//= $Author: MagicSol $
     23//= $Date: 2000-07-04 14:13:02 $
    2424//=
    2525//=//////////////////////////////////////////////////////////////////////
     
    7171static char Starfield_filename[PATH_MAX_LENGTH]; //@< starfield input filename
    7272static char Data_filename[PATH_MAX_LENGTH];   //@< data filename
    73 static char DIAG_filename[PATH_MAX_LENGTH];  //@< data filename
    7473static char ROOT_filename[PATH_MAX_LENGTH];   //@< data filename
     74static char Loop_filename[PATH_MAX_LENGTH];   //@< special data filename
    7575static char CT_filename[PATH_MAX_LENGTH];     //@< name of the CT def. file
    7676static int simulateNSB = TRUE;                //@< Will we simulate NSB?
     
    8989static int Write_All_Images = FALSE;
    9090static int Write_McEvt  = TRUE;
    91 static int Write_McTrig = FALSE;
     91static int Write_McTrig = TRUE;
    9292static int Write_RawEvt = FALSE;
    9393static int Write_All_Data = FALSE;
     
    102102static int FADC_Scan = FALSE;
    103103static int Trigger_Loop = FALSE;
     104static float Trigger_gate_length = 3.0;
     105static float Trigger_response_ampl = 1.0;
     106static float Trigger_response_fwhm = 2.0;
     107static float Trigger_threshold = 7.0;
     108static int Trigger_multiplicity = 4;
     109static int Trigger_topology = 2;
    104110static int Trigger_loop_lthres = 0;
    105111static int Trigger_loop_uthres = 10;
     
    206212      break;
    207213
    208     case diag_file:          //@< name of the DIAG file
    209          
    210       // get the name of the data_file from the line
    211       sscanf(line, "%s %s", token, DIAG_filename);
    212       cout << '[' << DIAG_filename << ']' << endl << flush;
    213 
    214       break;
    215 
    216214    case root_file:          //@< name of the ROOT file
    217215         
     
    355353      break;
    356354
    357     case write_RawEvt:    //@< to write the RawEvt data
    358          
    359       // change boolean value
    360       Write_RawEvt = TRUE;
    361 
    362       break;
    363 
    364355    case write_all_data:      //@< to write single pixel data
    365356         
     
    406397
    407398      break;
     399    case trigger_prop:
     400
     401      //  Get parameters for the diskriminator and the electronic
     402      //  response for one phe
     403      sscanf(line, "%s %f %f %f", token, &Trigger_gate_length, &Trigger_response_ampl,&Trigger_response_fwhm);
     404
     405      break;
    408406
    409407    case trigger_loop:
     
    417415      break;
    418416
     417    case trigger_single:
     418
     419      //  Get trigger conditions
     420      sscanf(line, "%s %f %d %d", token, &Trigger_threshold, &Trigger_multiplicity, &Trigger_topology);
     421
     422      // change boolean value
     423      Trigger_Loop = FALSE;
     424
     425      break;
     426
     427    case Trigger_Loop_Output_Only_Specialists:
     428
     429      // get the name of the data_file from the line
     430      sscanf(line, "%s %s", token, Loop_filename);
     431      cout << '[' << Loop_filename << ']' << endl << flush;
     432         
     433      // change boolean value
     434      Write_RawEvt = TRUE;
     435     
     436      break;
     437
    419438    case end_file:            //@< end of the parameters file
    420439
     
    495514
    496515//!-----------------------------------------------------------
    497 // @name get_diag_filename
    498 //                                               
    499 // @desc get name of the diagnostic output file
    500 //
    501 // @return   Name of the DIAG file
    502 //
    503 // @date Mon Sep 14 13:27:56 MET DST 1998
    504 //------------------------------------------------------------
    505 // @function
    506 
    507 //!@{
    508 char *
    509 get_diag_filename(void)
    510 {
    511   return (DIAG_filename);
    512 }
    513 //!@}
    514 
    515 
    516 //!-----------------------------------------------------------
    517516// @name get_root_filename
    518517//                                               
     
    532531}
    533532//!@}
    534 
    535 
     533//!-----------------------------------------------------------
     534// @name get_loop_filename
     535//                                               
     536// @desc get name of the special ROOT file
     537//
     538// @return   Name of the special ROOT file
     539//
     540// @date Fri Jun 23 17:34:19 CEST 2000
     541//------------------------------------------------------------
     542// @function
     543
     544//!@{
     545
     546char *
     547get_loop_filename(void)
     548{
     549  return (Loop_filename);
     550}
    536551
    537552//!-----------------------------------------------------------
     
    973988{
    974989  return ( Trigger_Scan );
     990}
     991//!@}
     992
     993//!-----------------------------------------------------------
     994// @name Trigger_Propeties
     995//                                               
     996// @desc fix properties of the diskriminator and amplifier for Trigger
     997//
     998//------------------------------------------------------------
     999// @function
     1000
     1001//!@{
     1002void
     1003get_Trigger_properties(float *gl, float *ra, float *rf)
     1004{
     1005  *gl=Trigger_gate_length;
     1006  *ra=Trigger_response_ampl;
     1007  *rf=Trigger_response_fwhm;
    9751008}
    9761009//!@}
     
    10001033//!@}
    10011034
     1035//!-----------------------------------------------------------
     1036// @name Trigger_Single
     1037//                                               
     1038// @desc fix Trigger conditions
     1039//
     1040//------------------------------------------------------------
     1041// @function
     1042
     1043//!@{
     1044void
     1045get_Trigger_Single(float *t, int *m, int *g)
     1046{
     1047  *t=Trigger_threshold;
     1048  *m=Trigger_multiplicity;
     1049  *g=Trigger_topology;
     1050
     1051}
     1052//!@}
    10021053
    10031054//=------------------------------------------------------------
     
    10071058//
    10081059// $Log: not supported by cvs2svn $
     1060// Revision 1.4  2000/05/11 14:22:33  blanch
     1061// New input card option has been introduced:
     1062//      trigger_loop lt ut lm um lg ug
     1063// It forces the camera program to study several condition trigger implementations. Integers after key word fix limits of loop over thershold, multiplicity and topology.
     1064//
    10091065// Revision 1.3  2000/03/24 18:14:05  blanch
    10101066// Parameters that tell as if we are going to see the diskriminator and/or FADC signal have been included.
Note: See TracChangeset for help on using the changeset viewer.