StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtStatusReader.h
1 /***************************************************************************
2  *
3  * $Id: StFgtStatusReader.h,v 1.1 2012/01/31 08:59:43 sgliske Exp $
4  * Author: C. K. Riley, Nov 2011
5  *
6  ***************************************************************************
7  *
8  * Description: Reads the elecId status from file, and provide querying of
9  * pedestals in a similar manner as the DB. Note: this is not a Maker.
10  *
11  ***************************************************************************
12  *
13  * $Log: StFgtStatusReader.h,v $
14  * Revision 1.1 2012/01/31 08:59:43 sgliske
15  * moved StFgtStatus maker to StFgtPool
16  *
17  * Revision 1.3 2012/01/27 13:38:08 sgliske
18  * updated to correspond with new StatusMakers,
19  * Now keyed by elecId
20  *
21  * Revision 1.2 2011/12/01 00:41:34 ckriley
22  * make compatible with db stuff
23  *
24  * Revision 1.1 2011/11/25 20:22:37 ckriley
25  * creation of statusmaker
26  *
27  *
28  *
29  **************************************************************************/
30 
31 
32 #ifndef _ST_FGT_STATUS_READER_
33 #define _ST_FGT_STATUS_READER_
34 
35 #include <string>
36 #include <map>
37 #include <Rtypes.h>
38 
40  public:
41  // constructors
42  StFgtStatusReader( const Char_t* filename = "" );
43 
44  // default OK
45  // StFgtStatusReader(const StFgtStatusReader&);
46 
47  // equals operator -- default OK
48  // StFgtStatusReader& operator=(const StFgtStatusReader&);
49 
50  // deconstructor
51  virtual ~StFgtStatusReader();
52 
53  // initialize
54  Int_t Init();
55 
56  // accessor: input is elecId, output is status of strip
57  Int_t getStatus( Int_t elecId ) const;
58 
59  protected:
60  // input file
61  std::string mFilename;
62 
63  typedef std::vector< Int_t > StatusVec_t;
64  StatusVec_t mStatusVec;
65 
66  private:
67  ClassDef(StFgtStatusReader,1);
68 
69 };
70 
71 // inline functions
72 
73 // accessor: input is elecId, output is status
74 inline Int_t StFgtStatusReader::getStatus( Int_t elecId ) const { return mStatusVec.at( elecId ); };
75 
76 // deconstructor
77 inline StFgtStatusReader::~StFgtStatusReader(){ /* */ };
78 
79 #endif