// Author: Edward Brash February 15, 2005 // revised severely 2006-2007 David Lawrence // // // MyProcessor.cc // #include using namespace std; #include #include #include "MyProcessor.h" vector toprint; bool ACTIVATE_ALL=false; extern string OUTPUT_FILENAME; #define ansi_escape ((char)0x1b) #define ansi_bold ansi_escape<<"[1m" #define ansi_black ansi_escape<<"[30m" #define ansi_red ansi_escape<<"[31m" #define ansi_green ansi_escape<<"[32m" #define ansi_blue ansi_escape<<"[34m" #define ansi_normal ansi_escape<<"[0m" #define ansi_up(A) ansi_escape<<"["<<(A)<<"A" #define ansi_down(A) ansi_escape<<"["<<(A)<<"B" #define ansi_forward(A) ansi_escape<<"["<<(A)<<"C" #define ansi_back(A) ansi_escape<<"["<<(A)<<"D" //------------------------------------------------------------------ // MyProcessor //------------------------------------------------------------------ MyProcessor::MyProcessor() { ROOTfile = NULL; } //------------------------------------------------------------------ // ~MyProcessor //------------------------------------------------------------------ MyProcessor::~MyProcessor() { //Close the ROOT file if(ROOTfile!=NULL){ ROOTfile->Write(); ROOTfile->Close(); delete ROOTfile; ROOTfile=NULL; cout< factory_names; eventLoop->GetFactoryNames(factory_names); usleep(100000); //this just gives the Main thread a chance to finish printing the "Launching threads" message cout< really_toprint; for(unsigned int i=0; iGetFactory(name,tag.c_str()); if(!factory)factory = eventLoop->GetFactory("D" + name,tag.c_str()); if(factory){ try{ factory->GetNrows(); }catch(...){ // someone threw an exception } } } return NOERROR; } //------------------------------------------------------------------ // fini //------------------------------------------------------------------ jerror_t MyProcessor::fini(void) { return NOERROR; }