/** @file * $Source: /home/cvsmanager/yoda/techmodel/physics/S4Reader.cpp,v $ * $Id: S4Reader.cpp,v 2.0 2004/09/21 20:51:22 kusanagi Exp $ * $Author: kusanagi $ * * Implementation of the S4Reader class. */ #include #include #include "S4Reader.h" using namespace pamela; using namespace pamela::S4; static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.S4.S4Reader")); /** * Constructor. */ S4Reader::S4Reader(void): TechmodelAlgorithm(PacketType::Physics, "TechmodelS4Reader") { logger->debug(_T("Constructor")); s4 = new S4Event(); } /** * Get a string with the version info of the algorithm. */ std::string S4Reader::GetVersionInfo(void) const { return "$Header: /home/cvsmanager/yoda/techmodel/physics/S4Reader.cpp,v 2.0 2004/09/21 20:51:22 kusanagi Exp $"; } /** * Initialize the algorithm with a special run. This will initialize the * event reader routines for all packet types. */ void S4Reader::Init(PamelaRun *run) { logger->debug(_T("Initialize")); SetInputStream(run); run->WriteSubPacket(this, &s4, s4->Class()); } /** * Unpack the S4 event from an input file. */ void S4Reader::RunEvent(int EventNumber) { } /** * Unpack the S4 data event from the physical packet. */ void S4Reader::RunEvent(int EventNumber, const char subData[], long int length) { /* char *data = new char[length]; memcpy(data, subData, length); int ERROR; delete[] data; */ }