/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventFilter/OnlineJointer/ESController/ESController-00-01-05/src/SC.cxx

Go to the documentation of this file.
00001 // Dear emacs, this is -*- c++ -*-
00002 
00003 #include "ESController/SC.h"
00004 #include "ESController/error.h"
00005 #include "EFServices/IEFEventLoopMgr.h"
00006 #include "HltTools/PathResolver.h"
00007 
00008 //#include <Python.h>
00009 #include <stdint.h>
00010 #include <cmath>
00011 #include <cstdio>
00012 #include <string>
00013 
00014 //hxt #include <df_allocator>
00015 //#include "RawDataFormat/FragmentType.h"
00016 //#include "RawDataFormat/AbstractFragment.h"
00017 //#include "RawDataFormat/minimal.h"
00018 
00019 // Include files for Gaudi
00020 #include "GaudiKernel/SmartIF.h"
00021 #include "GaudiKernel/Bootstrap.h"
00022 #include "GaudiKernel/IAppMgrUI.h"
00023 #include "GaudiKernel/ISvcLocator.h"
00024 #include "GaudiKernel/IProperty.h"
00025 #include "GaudiKernel/Property.h"
00026 #include "GaudiKernel/IService.h"
00027 #include "GaudiKernel/IMessageSvc.h"
00028 #include "GaudiKernel/IClassManager.h"
00029 
00030 //#include "HltConfig/MyFrame.h"
00031 
00032 #include <list>
00033 
00034 efpsc::SC::SC () :
00035   m_eventLoopMgr(0),
00036   m_config(0),
00037   m_pesaAppMgr(0),
00038   m_isCreated(false),
00039   m_outLev(5),
00040   m_nameEventLoopMgr("EFEventLoopMgr")
00041 {
00042    ::setenv("SCOutputLevel","3",1);
00043    char* ss=::getenv("SCOutputLevel");
00044    //if(ss!=NULL)std::cout<<ss<<std::endl;
00045    //else std::cout<<"****************"<<std::endl;
00046     //char* outlev=::getenv("SCOutputLevel");
00047     //std::cout<<outlev<<std::endl;
00048     //m_outLev=atoi(outlev);    
00049     //std::cout<<m_outLev<<std::endl;
00050     //Hlt::MyFrame::instance();
00051 }
00052 
00053 efpsc::SC::~SC ()
00054 {
00055   //delete Hlt::MyFrame::instance();
00056   m_pesaAppMgr->release() ;
00057 }
00058 
00059 bool efpsc::SC::configure (const std::string& config)
00060 { 
00061   static bool first_call_configure = true;
00062   if(first_call_configure){
00063     first_call_configure = false;
00064   }
00065   else{
00066     return true;
00067   }
00068   //if(0==Hlt::MyFrame::instance()){
00069   //    std::cout<<"Error while create MyFrame"<<std::endl;
00070       //exit(1);
00071   //}
00072 
00073   //EFPSC_DBG1("efpsc::SC::configure", 
00074     // "SC configuration started.");
00075   if(m_outLev<=3) std::cout<<"efpsc::SC::configure  "<<"SC configuration started."<<std::endl;
00076   m_config = new efpsc::Config(config);
00077 
00078   // Create an instance of the Pesa application manager
00079   //EFPSC_DBG1("efpsc::SC::configure", 
00080 //           "---> Create Pesa Application Manager");
00081   if(m_outLev<=2) std::cout<<"efpsc::SC::configure  "<<"---> Create Pesa Application Manager:"
00082           <<m_isCreated<<std::endl;
00083   if(!m_isCreated){
00084     if ((m_config->dllName().size() != 0) &&  (m_config->factoryName().size() != 0)) {
00085       m_pesaAppMgr = Gaudi::createApplicationMgr(m_config->dllName(),m_config->factoryName());
00086       if(m_outLev<=3)std::cout<<"Gaudi::createApplicationMgr(m_config->dllName(),m_config->factoryName())"
00087                                    <<std::endl;
00088     } else {
00089       m_pesaAppMgr = Gaudi::createApplicationMgr();
00090       if(m_outLev<=3)std::cout<<"Gaudi::createApplicationMgr()"<<std::endl;
00091     }
00092   }
00093  
00094   // configure Pesa
00095 //  EFPSC_DBG1("efpsc::SC::configure", 
00096 //           "---> Configure Pesa Property Manager");
00097   if(m_outLev<=2) std::cout<<"efpsc::SC::configure  "<<"---> Configure Pesa Property Manager"<<std::endl;
00098   StatusCode sc ;
00099   SmartIF<IProperty> propMgr ( m_pesaAppMgr );
00100   SmartIF<IAppMgrUI> appMgr  ( m_pesaAppMgr );
00101   if( !appMgr.isValid() || !propMgr.isValid() ) {
00102     //EFPSC_ERROR("efpsc::SC::configure",
00103     //          "While creating the ApplicationMgr");
00104     if(m_outLev<=5) std::cout<<"efpsc::SC::configure  "<<"While creating the ApplicationMgr"<<std::endl;
00105     return false;
00106   }
00107 
00108   // Get the input configuration file from arguments (default "jobOptions.txt")
00109   std::string opts = "jobOptions.txt";
00110   ::setenv("efJobPath","",1);
00111   if (m_config->jobOptionsPath().size() != 0) {
00112     opts = m_config->jobOptionsPath() ;
00113     if (opts.rfind("/") < opts.size()) {
00114       ::setenv("efJobPath",opts.substr(0,opts.rfind("/")).c_str(),1);
00115     }
00116   }
00117   //EFPSC_DBG1("efpsc::SC::configure", "---> Pesa JobOptions file is = " << opts);
00118   //EFPSC_DBG1("efpsc::SC::configure", "---> Pesa JobOptions path    = " << ::getenv("efJobPath"));
00119   if(m_outLev<=2) std::cout<<"efpsc::SC::configure  "<<"---> Pesa JobOptions file is = " << opts<<std::endl
00120                                 <<"                      "<<"---> Pesa JobOptions path    = " 
00121                                 << ::getenv("efJobPath")<<std::endl;
00122   propMgr->setProperty( "JobOptionsPath", opts );
00123 
00124   propMgr->setProperty( "EventLoop",m_nameEventLoopMgr );     
00125 
00126   
00127 
00128   // Select the MessageSvc Type
00129   if (m_config->messageSvcType().size() != 0) {
00130     propMgr->setProperty( "MessageSvcType", m_config->messageSvcType());
00131   }
00132 
00133   // No EventSelector will be used
00134   if (m_config->evtSel().size() != 0) {
00135     propMgr->setProperty( "EvtSel", m_config->evtSel());
00136   } else {
00137     propMgr->setProperty( "EvtSel", "NONE" );
00138   }
00139   //EFPSC_DBG1("efpsc::SC::configure", "finish property set--->start configure ");
00140   //EFPSC_DBG1("efpsc::SC::configure", "Configuring ApplicationMgr: "
00141 //           << appMgr->stateName() << " Status : " << sc.getCode());
00142   if(m_outLev<=3) std::cout<<"efpsc::SC::configure  "<<"finish property set--->start configure"<<std::endl;
00143   if(m_outLev<=2) std::cout<<"efpsc::SC::configure  "<<"Configuring ApplicationMgr: "
00144                            << appMgr->FSMState() << " Status : " << sc.getCode()<<std::endl;
00145   // Configure the application manager
00146   if( opts.substr( opts.length() - 3, 3 ) == ".py" ) {
00147 
00148      //EFPSC_ERROR("efpsc::SC::configure", 
00149 //               "Error: Don't support python config files");
00150      if(m_outLev<=5) std::cout<<"efpsc::SC::configure  "
00151                                    <<"Error: Don't support python config files"<<std::endl;
00152      return false;
00153     // ----------------------------
00154     // Configuration with .py files
00155     // ----------------------------
00156 
00157     // Try to initialize the Python interpreter
00158     /*if ( ! Py_IsInitialized() ) {
00159       Py_Initialize();
00160 
00161       // check
00162       if ( ! Py_IsInitialized() ) {
00163         EFPSC_ERROR("efpsc::SC::configure",
00164                     "Error: Python could not been intialized.");
00165         Py_Finalize();
00166         return false;
00167       }
00168 
00169       // import basic python modules (used throughout)
00170       std::string pyBasicFile = "SC/SCPythonSetup.py" ;
00171       if (m_config->pythonSetupFile().size() != 0) {
00172         pyBasicFile = m_config->pythonSetupFile() ;
00173       }
00174 
00175       pyBasicFile = PathResolver::find_file(pyBasicFile, "PYTHONPATH");
00176       FILE* infile = fopen( pyBasicFile.c_str() , "r" );
00177       if ( PyRun_SimpleFile(infile,const_cast<char*>(pyBasicFile.c_str())) != 0 ) {
00178         EFPSC_ERROR("efpsc::SC::configure",
00179                     "Error: Basic Python configuration failed.");
00180         Py_Finalize();
00181         return false;
00182       }
00183 
00184       std::string pyExecFile = "include( \""+std::string(opts)+"\" )" ;
00185       if ( PyRun_SimpleString(const_cast<char*>(pyExecFile.c_str())) != 0 ) {
00186         EFPSC_ERROR("efpsc::SC::configure",
00187                     "Error: Python job configuration script failed.");
00188         Py_Finalize();
00189         return false;
00190       }
00191     }*/
00192   } else {
00193     // -----------------------------
00194     // Configuration with .txt files
00195     // -----------------------------
00196     sc = appMgr->configure();
00197     if( sc.isFailure() ) {
00198       //EFPSC_DBG1("efpsc::SC::configure",
00199 //                "While configuring the ApplicationMgr");
00200       if(m_outLev<=5) std::cout<<"efpsc::SC::configure  "<<"While configuring the ApplicationMgr"<<std::endl;
00201       return false;
00202     }
00203   }
00204  // EFPSC_DBG1("efpsc::SC::configure", "Configuring ApplicationMgr: "
00205 //           << appMgr->stateName() << " Status : " << sc.getCode());
00206   if(m_outLev<=2) std::cout<<"efpsc::SC::configure  "<<"Configuring ApplicationMgr: "
00207                            << appMgr->FSMState() << " Status : " << sc.getCode()<<std::endl;
00208   // Initialize the application manager
00209   sc = appMgr->initialize();
00210   //EFPSC_DBG1("efpsc::SC::configure", "Initialize ApplicationMgr : " 
00211 //           << appMgr->stateName() 
00212 //           << " Status : " << sc.getCode());
00213   if(m_outLev<=2) std::cout<<"efpsc::SC::configure  "<<"Initialize ApplicationMgr : " 
00214                            << appMgr->FSMState() << " Status : " << sc.getCode()<<std::endl;
00215   if( sc.isFailure() ) {
00216     EFPSC_ERROR("efpsc::SC::configure", "While intializing the ApplicationMgr");
00217     return false;
00218   }
00219 
00220   // Find the basename for the EventLoopMgr  
00221   std::string value ;
00222   //std::cout<<"value = "<<value<<std::endl;
00223   sc = propMgr->getProperty( "EventLoop", value );
00224   //std::cout<<"value = "<<value<<std::endl;
00225   if( sc.isFailure() ) {
00226     //EFPSC_DBG1("efpsc::SC::configure", "While retrieving Property EventLoop ");
00227     if(m_outLev<=4) std::cout<<"efpsc::SC::configure  "<<"While retrieving Property EventLoop "<<std::endl;
00228   } else {
00229     m_nameEventLoopMgr.assign(value, value.find_first_of("\"")+1,
00230                               value.find_last_of("\"")-value.find_first_of("\"")-1) ;
00231   }
00232 
00233   SmartIF<ISvcLocator> svcLoc( m_pesaAppMgr );
00234   if (svcLoc.isValid()) {
00235     //EFPSC_DBG1("efpsc::SC::configure","Name for EventLoopManager:"<<m_nameEventLoopMgr);
00236     if(m_outLev<=2) std::cout<<"efpsc::SC::configure  "<<"Name for EventLoopManager:"
00237                                   <<m_nameEventLoopMgr<<std::endl;
00238     StatusCode sc ;
00239     IEventProcessor* processingMgr = 0 ;
00240     
00241     sc = svcLoc->service( m_nameEventLoopMgr , processingMgr);
00242     m_eventLoopMgr=processingMgr;
00243 
00244     if( !sc.isSuccess() )  {
00245       //EFPSC_ERROR("efpsc::SC::configure", " Error Retrieving Processing manager!") ;
00246       if(m_outLev<=5) std::cout<<"efpsc::SC::configure  "<<"Error Retrieving Processing manager!"<<std::endl;
00247       return false;
00248     }
00249 
00250   } else {
00251     //EFPSC_ERROR("efpsc::SC::configure", " Error Retrieving Service Locator!") ;
00252     if(m_outLev<=5) std::cout<<"efpsc::SC::configure  "<<"Error Retrieving Service Locator!"<<std::endl;
00253     return false;
00254   }
00255 
00256   m_isCreated=true;
00257   //EFPSC_DBG1("efpsc::SC::configure","SC configuration finished.");
00258   if(m_outLev<=3) std::cout<<"efpsc::SC::configure  "<<"SC configuration finished."<<std::endl;
00259   return true;
00260 }
00261 
00262 bool efpsc::SC::unconfigure (void)
00263 {
00264   return true;
00265   //EFPSC_DBG1("efpsc::SC::unconfigure",
00266 //           "SC UNconfiguration started.");
00267   if(m_outLev<=3) std::cout<<"efpsc::SC::unconfigure  "<<"SC UNconfiguration started."<<std::endl;
00268   StatusCode sc ;
00269   SmartIF<IAppMgrUI> appMgr  ( m_pesaAppMgr );
00270   if( !appMgr.isValid() ) {
00271 //    EFPSC_ERROR("efpsc::SC::unconfigure",
00272 //              "While unconfiguring the ApplicationMgr, no valid interface");
00273       if(m_outLev<=5) std::cout<<"efpsc::SC::unconfigure  "
00274                                     <<"While unconfiguring the ApplicationMgr, no valid interface"<<std::endl;
00275       return false;
00276   }
00277   SmartIF<ISvcLocator> svcLoc( m_pesaAppMgr );
00278 
00279   //const std::list<IService*>* svclist=svcLoc->getServices();
00280   //for(std::list<IService*>::iterator it = svclist->begin(); it != svclist->end(); it++ ) {
00281   //     std::cout<<(*it)->name()<<std::endl;
00282   //}
00283 
00284   // Finalize the application manager
00285   sc = appMgr->finalize();
00286 
00287 //  EFPSC_DBG1("efpsc::SC::unconfigure", "Finalize ApplicationMgr: " 
00288 //           << appMgr->stateName() << " Status : " << sc.getCode());
00289   if(m_outLev<=2) std::cout<<"efpsc::SC::unconfigure  "<<"Finalize ApplicationMgr: " 
00290                            << appMgr->FSMState() << " Status : " << sc.getCode()<<std::endl;
00291   if( sc.isFailure() ) {
00292 //    EFPSC_ERROR("efpsc::SC::unconfigure",
00293 //              "---> While finalizing the ApplicationMgr ");
00294     if(m_outLev<=5) std::cout<<"efpsc::SC::unconfigure  "<<"While finalizing the ApplicationMgr"<<std::endl;
00295     return false;
00296   }
00297 
00298   // Terminate the application manager
00299   sc = appMgr->terminate();
00300 //  EFPSC_DBG1("efpsc::SC::unconfigure", "Terminate ApplicationMgr : " 
00301 //           << appMgr->stateName() << " Status : " << sc.getCode());
00302   if(m_outLev<=2) std::cout<<"efpsc::SC::unconfigure  "<<"Terminate ApplicationMgr : " 
00303                            << appMgr->FSMState() << " Status : " << sc.getCode()<<std::endl;
00304   if( sc.isFailure() ) {
00305     //EFPSC_ERROR("efpsc::SC::unconfigure","While terminating the ApplicationMgr");
00306     if(m_outLev<=5) std::cout<<"efpsc::SC::unconfigure  "<<"While terminating the ApplicationMgr"<<std::endl;
00307     return false;
00308   } 
00309 
00310   //IService* msgSvc=0;
00311   //svclist=svcLoc->getServices();
00312   //svclist->erase(svclist.begin(), svclist.end() );
00313   //std::cout<<svclist->size()<<std::endl;
00314   //if(svcLoc->existsService("MessageSvc")){
00315   //     svcLoc->getService("MessageSvc",msgSvc);
00316   //     std::cout<<"111"<<msgSvc->name()<<std::endl;
00317   //     std::list<IService*> svclist=svcLoc->getServices();
00318   //     for(std::list<IService*>::iterator it = svclist.begin(); it != svclist.end(); it++ ) {
00319   //         //std::cout<<(*it)->name()<<std::endl;
00320   //     }
00321   //     int a1=svclist.size();
00322   //     svclist->remove(msgSvc);
00323   //     int a2=svclist.size();
00324   //    if(svcLoc->existsService("MessageSvc"))std::cout<<"exist"<<a1<<","<<a2<<std::endl;
00325   //}
00326   //appMgr->release();   
00327   //if(msgSvc) msgSvc->release();
00328   //svcMgr->removeService("MessageSvc");
00329 
00330   delete m_config;
00331   m_config = 0;
00332   //EFPSC_DBG2("efpsc::SC::unconfigure", "SC UNconfiguration finished.");
00333   if(m_outLev<=3) std::cout<<"efpsc::SC::unconfigure  "<<"SC UNconfiguration finished."<<std::endl;
00334   return true;
00335 }
00336 
00337 bool efpsc::SC::prepareForRun(int run_number=0)
00338 {
00339   // This is a placeholder method
00340   if(m_eventLoopMgr){
00341     SmartIF<IEFEventLoopMgr> processor_psc( m_eventLoopMgr);
00342     StatusCode sc = processor_psc->prepareForRun(run_number);
00343     std::cout << "=================" << m_eventLoopMgr << std::endl;
00344     if(sc.isSuccess()) return true;
00345   }
00346   return false;
00347 }
00348 
00349 bool efpsc::SC::process(const uint32_t *&feStore, const uint32_t *&sdStore,std::string &efDecision_s,std::vector<uint32_t> &efBitPattern)
00350 {
00351   //std::cout<<"jak:"<<__FILE__<<std::endl;
00352   //EFPSC_DBG1("efpsc::SC::process", "***********************************************");
00353   //EFPSC_DBG1("efpsc::SC::process", "****************** NEW EVENT ******************");
00354   //EFPSC_DBG1("efpsc::SC::process", "***********************************************");
00355   if(m_outLev<=3)std::cout<<"efpsc::SC::process"<<" **************** NEW EVENT ****************"<<std::endl;
00356   //Test if FullEventFragment is valid
00357  // if(!fe->is_valid()){
00358  //   EFPSC_ERROR("efpsc::SC::process","FullEventFragment NOT valid! This event is not going to be processed!");
00359  //   return false;
00360  // }  else {
00361  //   EFPSC_DBG1("efpsc::SC::process", " FullEventFragment is valid." );
00362  // }
00363 
00364 
00365   // ExecuteEvent from the application manager
00366   StatusCode sc ;
00367   if ( 0 != m_eventLoopMgr ) {
00368     SmartIF<IEventProcessor> processor( m_eventLoopMgr);
00369     
00370     if ( processor.isValid() ) {
00371       SmartIF<IService> processor_s( m_eventLoopMgr);
00372       //EFPSC_DBG1("efpsc::SC::process", " ---> Executing events for processor"<<processor_s->name());
00373       //std::cout<<"jak:"<<__FILE__<<std::endl;
00374 
00375       sc = processor->executeEvent((void*)feStore);
00376       
00377       //EFPSC_DBG1("efpsc::SC::Process","after executeEvent(fe)");
00378 
00379       //std::cout<<"jak:"<<__FILE__<<std::endl;
00380       if(m_outLev<=2)std::cout<<"efpsc::SC::process  "<<"after executeEvent(fe)"<<std::endl;
00381       if( sc.isFailure() ) {
00382         //EFPSC_DBG1("efpsc::SC::process", "Error for executeEvent in the ApplicationMgr " << processor_s->name());
00383         if(m_outLev<=4)std::cout<<"efpsc::SC::process  "<<"Error for executeEvent in the ApplicationMgr "
00384                                      << processor_s->name()<<std::endl;
00385       }
00386       else {
00387         SmartIF<IEFEventLoopMgr> processor_psc( m_eventLoopMgr);
00388         //
00389         //--- ef Decision and Result from Pesa
00390         //
00391         //std::cout<<"jak:"<<__FILE__<<std::endl;
00392         efDecision_s = processor_psc->EF_Decision();
00393 
00394         //std::cout<<"jak:"<<__FILE__<<std::endl;
00395         //EFPSC_DBG1("efpsc::SC::Process","after EF_Decision. EFdecision is: "<<efDecision_s);
00396         if(m_outLev<=3)std::cout<<"efpsc::SC::process  "<<"after EF_Decision. EFdecision is: "
00397                                      <<efDecision_s<<std::endl;
00398         sdStore=(uint32_t*)processor_psc->EF_Fragment_Address();
00399         //std::cout<<"jak:"<<__FILE__<<std::endl;
00400         if(sdStore==NULL){
00401           //EFPSC_DBG1("efpsc::SC::process","EF_Fragment_Address() returns NULL pointer");
00402           if(m_outLev<=2)std::cout<<"efpsc::SC::process  "
00403                                        <<"EF_Fragment_Address() returns NULL pointer"<<std::endl;
00404         }
00405         //Hard coded (One must change it in the future):
00406         //EF_Decision==Accepted--> efDecision=2
00407         //EF_Decision==Rejected--> efDecision=1
00408         //EF_Decision==Error--> efDecision=0
00409         /*
00410         if(efDecision_s=="Accepted"){
00411           //efDecision=2;
00412           //Append EFResult to the Event Fragment
00413           EFPSC_DBG1("efpsc::SC::process", "EFResult is going to be appended to the Event Fragment");
00414         }else if(efDecision_s=="Rejected"){ 
00415           //efDecision=1;
00416           EFPSC_DBG1("efpsc::SC::process", "No EFResult is going to be appended to the Event Fragment");
00417 
00418         }else{
00419           //efDecision=0;
00420           EFPSC_DBG1("efpsc::SC::process", "an Error was obtained when running algorithms on the Event.");
00421           EFPSC_DBG1("efpsc::SC::process", "No EFResult is going to be appended to the Event Fragment");
00422         }
00423         */
00424         efBitPattern.resize(4, 0);  //zoujh: Just a place holder
00425         if(efDecision_s=="Junk") efBitPattern[0]=1<<0;
00426         //else if(efDecision_s=="GJunk") efBitPattern[0]=(1<<0)+(1<<1);
00427         else if(efDecision_s=="GJunk") efBitPattern[0]=(1<<1);
00428         else if(efDecision_s=="Beamgas") efBitPattern[0]=1<<2;
00429         //else if(efDecision_s=="GBeamgas") efBitPattern[0]=(1<<2)+(1<<3);
00430         else if(efDecision_s=="GBeamgas") efBitPattern[0]=(1<<3);
00431         else if(efDecision_s=="Cosmic") efBitPattern[0]=1<<4;
00432         //else if(efDecision_s=="GCosmic") efBitPattern[0]=(1<<4)+(1<<5);
00433         else if(efDecision_s=="GCosmic") efBitPattern[0]=(1<<5);
00434         else if(efDecision_s=="EBhabha") efBitPattern[0]=1<<6;
00435         //else if(efDecision_s=="GEBhabha") efBitPattern[0]=(1<<6)+(1<<7);
00436         else if(efDecision_s=="GEBhabha") efBitPattern[0]=(1<<7);
00437         else if(efDecision_s=="BBhabha") efBitPattern[0]=1<<8;
00438         //else if(efDecision_s=="GBBhabha") efBitPattern[0]=(1<<8)+(1<<9);
00439         else if(efDecision_s=="GBBhabha") efBitPattern[0]=(1<<9);
00440         else if(efDecision_s=="Dimuon") efBitPattern[0]=1<<10;
00441         //else if(efDecision_s=="GDimuon") efBitPattern[0]=(1<<10)+(1<<11);
00442         else if(efDecision_s=="GDimuon") efBitPattern[0]=(1<<11);
00443         else if(efDecision_s=="Diphoton") efBitPattern[0]=1<<12;
00444         //else if(efDecision_s=="GDiphoton") efBitPattern[0]=(1<<12)+(1<<13);
00445         else if(efDecision_s=="GDiphoton") efBitPattern[0]=(1<<13);
00446         else if(efDecision_s=="Hadron") efBitPattern[0]=1<<14;
00447         //else if(efDecision_s=="GHadron") efBitPattern[0]=(1<<14)+(1<<15);
00448         else if(efDecision_s=="GHadron") efBitPattern[0]=(1<<15);
00449         else if(efDecision_s=="Twophoton") efBitPattern[0]=1<<16;
00450         //else if(efDecision_s=="GTwophoton") efBitPattern[0]=(1<<16)+(1<<17);
00451         else if(efDecision_s=="GTwophoton") efBitPattern[0]=(17);
00452         else if(efDecision_s=="RandomTrg") efBitPattern[0]=1<<31;
00453         else if(efDecision_s=="Error")     efBitPattern[0]=1<<30;
00454         else if(efDecision_s=="Other")     efBitPattern[0]=1<<29;
00455         else  efBitPattern[0]=1<<28;
00456         efBitPattern[1]=processor_psc->EF_Algorithm_Tag();
00457         efBitPattern[2]=processor_psc->EF_Version();
00458         efBitPattern[3]=processor_psc->EF_Total_Energy();
00459         //EFPSC_DBG1("efpsc::SC::process", "**************end of psc process!**************"<<std::endl);
00460         if(m_outLev<=2)std::cout<<"efpsc::SC::process  "
00461                                      <<"**************end of psc process!**************"<<std::endl;
00462       }
00463     } 
00464     else {
00465       //EFPSC_DBG1("efpsc::SC::process", "executeEvent ApplicationMgr : no valid event processor ");
00466       if(m_outLev<=5)std::cout<<"efpsc::SC::process  "
00467                                    <<"executeEvent ApplicationMgr : no valid event processor "<<std::endl;
00468       return false;
00469     }
00470     
00471   } 
00472   else {
00473     return false;
00474   }
00475   return true;
00476 }
00477 

Generated on Tue Nov 29 23:12:08 2016 for BOSS_7.0.2 by  doxygen 1.4.7