// -*- C++/l -*- // // Description: Beam and cosmic data quality // // Author: Nick Hastings // Created: Fri Jul 23 14:38:59 JST 2010 // // COMET Include Files #include #include // SOFF include files #include "ISOFFTaskManager.hxx" #include "IFGDHitCountingTask.hxx" #include "ITriggerInfo.hxx" #include "ITPCdEdxCalib.hxx" #include "IFGDDataQuality.hxx" #include "IECALTrackFit.hxx" class IBeamCosmicDQsoff : public COMET::ICOMETEventLoopFunction { private: ISOFFTaskManager *manager; public: IBeamCosmicDQsoff(); virtual ~IBeamCosmicDQsoff() { delete manager; } bool operator () (COMET::ICOMETEvent& event); void Initialize(); void Finalize(COMET::ICOMETOutput* output); using COMET::ICOMETEventLoopFunction::Finalize; bool SetOption( std::string option, std::string value ); }; IBeamCosmicDQsoff::IBeamCosmicDQsoff() { COMETLog("IBeamCosmicDQsoff::IBeamCosmicDQsoff()"); manager = new ISOFFTaskManager(); // Add the FGD hit counting task // manager->AddTask(new IFGDHitCountingTask()); // Add the missing spill and record triggers for each run // manager->AddTask(new ITriggerInfo()); // Add the dE/dX calibration information manager->AddTask(new ITPCdEdxCalib()); // Add the FGD beam/cosmic data quality module manager->AddTask(new IFGDDataQuality()); //COMETLog("manager->AddTask(new IECALTrackFit());"); // Add the FGD cosmic data quality module //manager->AddTask(new IECALTrackFit()); } /// At Initialize call the manager initialization. void IBeamCosmicDQsoff::Initialize() { manager->Initialize(); } // Main processing method bool IBeamCosmicDQsoff::operator () (COMET::ICOMETEvent& event) { manager->Process(event); return true; } /// Finalize method void IBeamCosmicDQsoff::Finalize(COMET::ICOMETOutput* output) { manager->Finalize(); } bool IBeamCosmicDQsoff::SetOption( std::string option, std::string value ) { return manager->SetOption( option, value ); } int main(int argc, char *argv[]) { IBeamCosmicDQsoff userCode; cometEventLoop(argc,argv,userCode); } // Local Variables: // c-basic-offset: 8 // c-file-offsets: ((access-label . -2)(inclass . 4)(innamespace . 2)) // End: