/[PAMELA software]/yoda/techmodel/CalAlarmReader.cpp
ViewVC logotype

Annotation of /yoda/techmodel/CalAlarmReader.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6.1 - (hide annotations) (download)
Fri Sep 29 10:19:16 2006 UTC (18 years, 2 months ago) by mocchiut
Branch: MAIN
CVS Tags: YODA6_3/19, YODA6_3/18, YODA6_3/13, YODA6_3/12, YODA6_3/11, YODA6_3/17, YODA6_3/16, YODA6_3/15, YODA6_3/14, YODA6_3/20, HEAD
Changes since 6.0: +1 -0 lines
Last event bug fixed, compilation warnings/errors fixed

1 kusanagi 1.1
2     // Implementation of the CalAlarmReader class.
3    
4     #include "ReaderAlgorithms.h"
5    
6     using namespace pamela::techmodel;
7    
8     static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalAlarmReader"));
9    
10     /**
11     * Constructor.
12     */
13     CalAlarmReader::CalAlarmReader(void):
14     TechmodelAlgorithm(PacketType::CalAlarm, "TechmodelCalAlarmReader") {
15     logger->debug(_T("Constructor"));
16     calAlarm = new CalAlarmEvent();
17     }
18    
19     /**
20     * Get a string with the version info of the algorithm.
21     */
22     std::string CalAlarmReader::GetVersionInfo(void) const {
23     return
24 kusanagi 5.3 "$Trailer: /home/cvsmanager/yoda/techmodel/CalAlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n";
25 kusanagi 1.1 }
26    
27     /**
28     * Initialize the algorithm with a special run. This will initialize the
29     * event reader routines for all packet types.
30     */
31     void CalAlarmReader::Init(PamelaRun *run) {
32     SetInputStream(run);
33     run->WriteSubPacket(this, &calAlarm, calAlarm->Class());
34     logger->debug(_T("Initialize"));
35     }
36    
37     /**
38     * Unpack the CalAlarm event from an input file.
39 kusanagi 5.1 * The CPU does not add any CRC control at the packet end.
40     * @param EventNumber
41     * @param dataLength
42 kusanagi 1.1 */
43 kusanagi 5.1 void CalAlarmReader::RunEvent(int EventNumber, long int dataLength) throw (WrongCRCException){
44     char subData[dataLength];
45 mocchiut 6.1 memset(subData, 0, dataLength*sizeof(char));
46 kusanagi 5.1 InputFile->read(subData, sizeof(subData));
47     calAlarm->calAlarmData = new TArrayC(dataLength, subData);
48 kusanagi 1.1 }
49    

  ViewVC Help
Powered by ViewVC 1.1.23