// $Id$ // // File: JEventProcessor_dumpbcal.cc // Created: Wed May 11 11:42:06 EDT 2011 // Creator: davidl (on Linux ifarm1101 2.6.18-128.7.1.el5 x86_64) // #include #include using namespace std; #include "JEventProcessor_dumpbcal.h" using namespace jana; #include #include #include #include // Routine used to create our JEventProcessor #include extern "C"{ void InitPlugin(JApplication *app){ InitJANAPlugin(app); app->AddProcessor(new JEventProcessor_dumpbcal()); jout.SetTag(""); // supress "JANA >>" gPARMS->SetParameter("JANA:BATCH_MODE", true); gPARMS->SetParameter("THREAD_TIMEOUT", 1000000); } } // "C" //------------------ // JEventProcessor_dumpbcal (Constructor) //------------------ JEventProcessor_dumpbcal::JEventProcessor_dumpbcal() { } //------------------ // ~JEventProcessor_dumpbcal (Destructor) //------------------ JEventProcessor_dumpbcal::~JEventProcessor_dumpbcal() { } //------------------ // init //------------------ jerror_t JEventProcessor_dumpbcal::init(void) { return NOERROR; } //------------------ // brun //------------------ jerror_t JEventProcessor_dumpbcal::brun(JEventLoop *eventLoop, int runnumber) { // This is called whenever the run number changes return NOERROR; } //------------------ // evnt //------------------ jerror_t JEventProcessor_dumpbcal::evnt(JEventLoop *loop, int eventnumber) { // Get objects so loop->Print() will work below vector throwns; vector truthcells; vector showers; loop->Get(throwns); loop->Get(truthcells); loop->Get(showers, "KLOE"); // Print Thrown (Generated) objects loop->Print("DMCThrown"); // Print DBCALTruthCell objects loop->Print("DBCALTruthCell"); // Print Shower objects loop->Print("DBCALShower", "KLOE"); // Print associated objects for the shower objects for(unsigned int i=0; i hits; showers[i]->Get(hits); cout< > items; hits[j]->toStrings(items); // Print headers on first DBCAL hit unsigned int colwidth = 10; if(j==0){ for(unsigned int k=0; k