Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:14:01

0001 #include "Fun4All_InttTriggerTiming.hh"
0002 
0003 int Fun4All_InttTriggerTiming( int run_num = 50377,
0004                  int trigger_bit = -1  // -1 means no requirement
0005                  )
0006 {
0007   
0008   int nevents = 0;
0009   //gSystem->ListLibraries();
0010 
0011   int skip_num = 0;
0012   Fun4AllServer *se = Fun4AllServer::instance();
0013   // se->Verbosity(5);
0014   
0015   // just if we set some flags somewhere in this macro
0016   recoConsts *rc = recoConsts::instance();
0017   
0018   Enable::CDB = true;
0019   rc->set_StringFlag("CDB_GLOBALTAG", CDB::global_tag);
0020   rc->set_uint64Flag("TIMESTAMP", CDB::timestamp);
0021   rc->set_IntFlag("RUNNUMBER", run_num ); // needed for the analysis modules
0022   
0023   //////////////////////////////////////////////////////////////////
0024   // DST input section                                           //
0025   //////////////////////////////////////////////////////////////////
0026   Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTin");
0027   string data = string("results/DST_physics_intt-000") + to_string(run_num) + "_no_hot.root";  
0028   in->fileopen( data );
0029   se->registerInputManager(in);
0030   
0031   //////////////////////////////////////////////////////////////////
0032   // Analysis moduel                                              //
0033   //////////////////////////////////////////////////////////////////
0034   // for #hit correlation
0035   InttTriggerTiming* itt = new InttTriggerTiming();
0036   itt->SetTriggerRequirement( trigger_bit );
0037   se->registerSubsystem( itt );
0038   
0039   //////////////////////////////////////////////////////////////////
0040   // Analyze!                                                     //
0041   //////////////////////////////////////////////////////////////////
0042   se->skip( skip_num );
0043   se->run( nevents );
0044   se->End();
0045 
0046   itt->Print();
0047     
0048   delete se;
0049   return 0;
0050 }