]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSProcessor.cxx
Coding conventions and minor fixes
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSProcessor.cxx
1 /**************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project        * 
3  * All rights reserved.                                                   *
4  *                                                                        *
5  * Primary Author:  Per Thomas Hille  <perthi@fys.uio.no>                 *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          * 
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 #include "AliHLTPHOSProcessor.h"
17 #include "unistd.h"
18
19
20 const AliHLTComponentDataType AliHLTPHOSProcessor::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
21
22
23 AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), AliHLTPHOSBase(), fModuleID(0), fPrintInfoFrequncy(1000), fRunNumber(0)
24 {
25   ScanRunNumberFromFile();
26 }
27
28
29
30 AliHLTPHOSProcessor::~AliHLTPHOSProcessor()
31 {
32
33 }
34
35
36 void 
37 AliHLTPHOSProcessor::ScanRunNumberFromFile()
38 {
39   char tmpDirectory[512];
40   char tmpFileName[512];
41   sprintf(tmpDirectory, "%s", getenv("HOME"));  
42   sprintf(tmpFileName, "%s%s", tmpDirectory, "/rundir/runNumber.txt");
43
44   if(CheckFile(tmpFileName, "r") == true)
45     {
46       FILE *fp = fopen(tmpFileName, "r");
47       fscanf(fp, "%d", &fRunNumber);
48       fclose(fp);
49     }
50
51   else
52     {
53       cout << "ERROR, could not find file  " << tmpFileName <<endl;
54     }
55 }