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

Annotation of /yoda/techmodel/Ac1InitReader.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6.1 - (hide annotations) (download)
Fri Sep 29 10:19:15 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: +3 -2 lines
Last event bug fixed, compilation warnings/errors fixed

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

  ViewVC Help
Powered by ViewVC 1.1.23