当前位置: 首页>>代码示例>>C++>>正文


C++ StIOMaker::SetNotify方法代码示例

本文整理汇总了C++中StIOMaker::SetNotify方法的典型用法代码示例。如果您正苦于以下问题:C++ StIOMaker::SetNotify方法的具体用法?C++ StIOMaker::SetNotify怎么用?C++ StIOMaker::SetNotify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StIOMaker的用法示例。


在下文中一共展示了StIOMaker::SetNotify方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RunStiMaker


//.........这里部分代码省略.........
    }
  
    //Make Control Window if not batch
    MainFrame* sti=0;
    StiGuiIOBroker* guiIO=0;
    
    if (gROOT->IsBatch()==false) {
	
	cout <<"No batch option detected.  Run Integrated Tracker in Gui Mode."<<endl;
	
	sti = new MainFrame(gClient->GetRoot(), 400, 220);
	
	sti->setStChain(chain);
	sti->setIoMaker(IOMk);
	
	//we're in batch mode
	stiIO->setUseGui(true);
	
	//Maker io gateway
	guiIO = StiGuiIOBroker::instance();
	
	//Values for hits not assigned to tracks
	guiIO->setUnMarkedHitSize(.3);
	guiIO->setUnMarkedHitColor(4);
	guiIO->setUnMarkedHitStyle(8);
	guiIO->setUpdateEachTrack(false);
	
	//Values for hits assigned to tracks
	guiIO->setMarkedHitSize(.3);
	guiIO->setMarkedHitColor(2);
	guiIO->setMarkedHitStyle(3);
    }
    else {
	cout <<"Batch option detector.  Run Integrated Tracker in non-Gui Mode."<<endl;
	stiIO->setUseGui(false);
    }

    cout <<"\n --- Done setting up StiIOBroker --- \n"<<endl;
    
    // WriteOut StEvent
    if (wrStEOut) {
	cout << "!!!! doEvents: will write out .event.root file !!" << endl << endl;
	StIOMaker *outMk = new StIOMaker("EvOut","w","test.event.root","bfcTree");
	//        outMk->SetBranch("eventBranch","test.event.root","w");
	outMk->IntoBranch("evtselBranch","StEvent");
	IOMk->SetNotify("CloseFile",outMk);
	IOMk->SetNotify("OpenFile" ,outMk);
    }


    //
    // test the Ittf tracks in StEvent
    //
    StItTestMaker* itTest = new StItTestMaker("StItTestMaker");
    
    /*
      dbaseMk->Init();
      svtDbMk->setSvtDb_Reader();
      dbaseMk->Make();
      svtDbMk->readSvtConfig();
      svtDbMk->readSvtGeometry();
    */
    
    //
    // Initialize chain
    //

    Int_t iInit = chain->Init();
    if (iInit) chain->Fatal(iInit,"on init");
    //chain->PrintInfo();
    chain->InitRun(theRunNumber);

    //
    // Event loop
    //
    int istat=0,i=1;
 EventLoop: if (i <= nevents && istat!=2) {

     cout << endl << "============================ Event " << i
	  << " start ============================" << endl;

     chain->Clear();
     istat = chain->Make(i);

     if (istat==2) 
         {cout << "Last  event processed. Status = " << istat << endl;}
     if (istat==3) 
         {cout << "Error event processed. Status = " << istat << endl;}

     i++;
     goto EventLoop;
 }

    //chain->Finish();

    i--;
    cout << endl << "============================ Event " << i
	 << " finish ============================" << endl;

}
开发者ID:star-bnl,项目名称:star-sti,代码行数:101,代码来源:RunStiMaker.C


注:本文中的StIOMaker::SetNotify方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。